Create and apply 16bit patch

This commit is contained in:
Leland Lucius 2019-12-15 02:52:20 -06:00
parent 605a64f935
commit 47ed207581
2 changed files with 32 additions and 0 deletions

View File

@ -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 );
}

View File

@ -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 );
}