mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-24 06:10:09 +01:00
Bug 193 - Audacity can't record at > 16-bit under MME or Windows DirectSound
Fix by Uwe and Carsten of DirectSound issue (only). We can't interrogate for formats, so we use userData to tell PortAudio what the format should be. I have a 16 bit built in sound device and that continues to function correctly at 16 bit with 24 bit requested. Unable to test on a 24 bit device.
This commit is contained in:
@@ -2046,9 +2046,18 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||
if( inputParameters )
|
||||
{
|
||||
/* IMPLEMENT ME - establish which host formats are available */
|
||||
/* JKC: CAN'T IMPLEMENT. DirectSound does not have a way */
|
||||
/* to interrogate for formats */
|
||||
PaSampleFormat nativeInputFormats = paInt16;
|
||||
/* PaSampleFormat nativeFormats = paUInt8 | paInt16 | paInt24 | paInt32 | paFloat32; */
|
||||
|
||||
/* July 2016 (Carsten and Uwe)
|
||||
* http://bugzilla.audacityteam.org/show_bug.cgi?id=193
|
||||
* Now we may over ride the paInt16.
|
||||
*/
|
||||
if (userData && *((int*)userData) == 24)
|
||||
nativeInputFormats = paInt24;
|
||||
|
||||
hostInputSampleFormat =
|
||||
PaUtil_SelectClosestAvailableFormat( nativeInputFormats, inputParameters->sampleFormat );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user