View Issue Details

IDProjectCategoryView StatusLast Update
0001418OpenMPTAudio I/Opublic2021-02-18 09:39
Reportermanx Assigned Tomanx  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionOpenMPT 1.30.00.* (old testing) 
Target VersionOpenMPT 1.30.01.00 / libopenmpt 0.6.0 (upgrade first)Fixed in VersionOpenMPT 1.29.08.00 / libopenmpt 0.5.6/0.5.7 (upgrade first) 
Summary0001418: Simplify output sample format
Description

SoundDevice currently (and historically) defines the sample format that client code has to use. This hinders refactoring because it requires client code to be able to generate any possible sample format. SoundDevice::BuferrIO somewhat solves this problem in a way rather specific to the OpenMPT MixSample type. However, this is still in particular problematic when trying to layer stream resampling on top of SoundDevice.

Although the current implementation allows for a zero-copy implementation by facilitating converting to output sample format in class BufferIO, it introduces significant maintenance overhead. In practice, our use of this zero-copy functionality is not even zero-copy because we fill the internal MixSampleBuffer first, and then output.

The way so simplify here, is to use 1 single defined sample format (i.e. float32) in the interface to SoundDevice, and just store it in an internal buffer, which the individual SoundDevice backends convert to the required output format as needed.

TagsNo tags attached.
Has the bug occurred in previous versions?
Tested code revision (in case you know it)

Relationships

child of 0001417 assignedmanx use OpenMPT sound devices in openmpt123 

Activities

manx

manx

2021-02-17 10:08

administrator   ~0004641

r14175 decouples sounddev from MixSampleInt

manx

manx

2021-02-17 17:55

administrator   ~0004642

This is a different approach compared to what I outlined in the issue. Instead of removing BufferIO completely and forcing any particular sample format throughout the entire SoundDevice interface, this extended BufferIO to accept any common sample format. Additionally, we can get rid of the void* buffers and use typed overloads for all sample formats supported by SoundDevice instead.

sounddev-typesafety-v3.patch (63,707 bytes)   
manx

manx

2021-02-18 09:39

administrator   ~0004643

r14177 / 1.30.00.28

Issue History

Date Modified Username Field Change
2021-02-16 08:12 manx New Issue
2021-02-16 08:12 manx Status new => assigned
2021-02-16 08:12 manx Assigned To => manx
2021-02-16 08:13 manx Relationship added child of 0001417
2021-02-17 10:07 manx Description Updated
2021-02-17 10:08 manx Note Added: 0004641
2021-02-17 17:55 manx Note Added: 0004642
2021-02-17 17:55 manx File Added: sounddev-typesafety-v3.patch
2021-02-17 17:55 manx Target Version OpenMPT 1.31.01.00 / libopenmpt 0.7.0 (upgrade first) => OpenMPT 1.30.01.00 / libopenmpt 0.6.0 (upgrade first)
2021-02-18 09:39 manx Status assigned => resolved
2021-02-18 09:39 manx Resolution open => fixed
2021-02-18 09:39 manx Fixed in Version => OpenMPT 1.29.08.00 / libopenmpt 0.5.6/0.5.7 (upgrade first)
2021-02-18 09:39 manx Note Added: 0004643