mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-22 15:10:23 +02:00
Regenerate and reapply WASAPI fix patch
This commit is contained in:
parent
e33dec2e60
commit
2ab02e084e
@ -499,6 +499,9 @@ typedef struct PaWasapiStream
|
||||
// thread is being started
|
||||
volatile BOOL running;
|
||||
|
||||
// stream has not or is no longer started
|
||||
BOOL stopped;
|
||||
|
||||
PA_THREAD_ID dwThreadId;
|
||||
HANDLE hThread;
|
||||
HANDLE hCloseRequest;
|
||||
@ -2882,6 +2885,9 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||
if (framesPerBuffer == 0)
|
||||
framesPerBuffer = ((UINT32)sampleRate / 100) * 2;
|
||||
|
||||
stream->stopped = TRUE;
|
||||
stream->running = FALSE;
|
||||
|
||||
// Try create device: Input
|
||||
if (inputParameters != NULL)
|
||||
{
|
||||
@ -3546,6 +3552,7 @@ static PaError StartStream( PaStream *s )
|
||||
// Signal: stream running.
|
||||
stream->running = TRUE;
|
||||
}
|
||||
stream->stopped = FALSE;
|
||||
|
||||
return result;
|
||||
|
||||
@ -3587,6 +3594,7 @@ void _StreamFinish(PaWasapiStream *stream)
|
||||
_StreamCleanup(stream);
|
||||
|
||||
stream->running = FALSE;
|
||||
stream->stopped = TRUE;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
@ -3620,7 +3628,7 @@ static PaError AbortStream( PaStream *s )
|
||||
// ------------------------------------------------------------------------------------------
|
||||
static PaError IsStreamStopped( PaStream *s )
|
||||
{
|
||||
return !((PaWasapiStream *)s)->running;
|
||||
return ((PaWasapiStream *)s)->stopped;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
|
@ -1,7 +1,8 @@
|
||||
diff -wruN portaudio/src/hostapi/wasapi/pa_win_wasapi.c portaudio-v19/src/hostapi/wasapi/pa_win_wasapi.c
|
||||
--- portaudio/src/hostapi/wasapi/pa_win_wasapi.c 2012-06-29 06:44:12.000000000 -0500
|
||||
+++ portaudio-v19/src/hostapi/wasapi/pa_win_wasapi.c 2012-12-31 14:46:16.533923600 -0600
|
||||
@@ -481,6 +481,9 @@
|
||||
diff --git a/lib-src/portaudio-v19/src/hostapi/wasapi/pa_win_wasapi.c b/lib-src/portaudio-v19/src/hostapi/wasapi/pa_win_wasapi.c
|
||||
index de05d72..0026033 100644
|
||||
--- a/lib-src/portaudio-v19/src/hostapi/wasapi/pa_win_wasapi.c
|
||||
+++ b/lib-src/portaudio-v19/src/hostapi/wasapi/pa_win_wasapi.c
|
||||
@@ -499,6 +499,9 @@ typedef struct PaWasapiStream
|
||||
// thread is being started
|
||||
volatile BOOL running;
|
||||
|
||||
@ -11,7 +12,7 @@ diff -wruN portaudio/src/hostapi/wasapi/pa_win_wasapi.c portaudio-v19/src/hostap
|
||||
PA_THREAD_ID dwThreadId;
|
||||
HANDLE hThread;
|
||||
HANDLE hCloseRequest;
|
||||
@@ -2687,6 +2742,9 @@
|
||||
@@ -2882,6 +2885,9 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||
if (framesPerBuffer == 0)
|
||||
framesPerBuffer = ((UINT32)sampleRate / 100) * 2;
|
||||
|
||||
@ -21,7 +22,7 @@ diff -wruN portaudio/src/hostapi/wasapi/pa_win_wasapi.c portaudio-v19/src/hostap
|
||||
// Try create device: Input
|
||||
if (inputParameters != NULL)
|
||||
{
|
||||
@@ -3337,6 +3398,7 @@
|
||||
@@ -3546,6 +3552,7 @@ static PaError StartStream( PaStream *s )
|
||||
// Signal: stream running.
|
||||
stream->running = TRUE;
|
||||
}
|
||||
@ -29,11 +30,20 @@ diff -wruN portaudio/src/hostapi/wasapi/pa_win_wasapi.c portaudio-v19/src/hostap
|
||||
|
||||
return result;
|
||||
|
||||
@@ -3378,6 +3440,7 @@
|
||||
@@ -3587,6 +3594,7 @@ void _StreamFinish(PaWasapiStream *stream)
|
||||
_StreamCleanup(stream);
|
||||
|
||||
stream->running = FALSE;
|
||||
+ stream->stopped = TRUE;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
@@ -3620,7 +3628,7 @@ static PaError AbortStream( PaStream *s )
|
||||
// ------------------------------------------------------------------------------------------
|
||||
static PaError IsStreamStopped( PaStream *s )
|
||||
{
|
||||
- return !((PaWasapiStream *)s)->running;
|
||||
+ return ((PaWasapiStream *)s)->stopped;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user