diff --git a/lib-src/portaudio-v19/16bit.patch b/lib-src/portaudio-v19/16bit.patch new file mode 100644 index 000000000..965b027f1 --- /dev/null +++ b/lib-src/portaudio-v19/16bit.patch @@ -0,0 +1,23 @@ +diff --git a/lib-src/portaudio-v19/src/hostapi/dsound/pa_win_ds.c b/lib-src/portaudio-v19/src/hostapi/dsound/pa_win_ds.c +index 63e9984c4..1638a7521 100644 +--- a/lib-src/portaudio-v19/src/hostapi/dsound/pa_win_ds.c ++++ b/lib-src/portaudio-v19/src/hostapi/dsound/pa_win_ds.c +@@ -2049,9 +2049,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 ); + } diff --git a/lib-src/portaudio-v19/src/hostapi/dsound/pa_win_ds.c b/lib-src/portaudio-v19/src/hostapi/dsound/pa_win_ds.c index 63e9984c4..1638a7521 100644 --- a/lib-src/portaudio-v19/src/hostapi/dsound/pa_win_ds.c +++ b/lib-src/portaudio-v19/src/hostapi/dsound/pa_win_ds.c @@ -2049,9 +2049,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 ); }