mirror of
https://github.com/Ryujinx/libsoundio.git
synced 2024-12-22 22:45:28 +00:00
WASAPI: support exclusive mode capture
This commit is contained in:
parent
8c9c4f85c2
commit
418904abd3
|
@ -1628,7 +1628,23 @@ static int instream_do_open(struct SoundIoPrivate *si, struct SoundIoInStreamPri
|
|||
}
|
||||
|
||||
static void instream_raw_run(SoundIoInStreamPrivate *is) {
|
||||
soundio_panic("TODO instream_raw_run");
|
||||
SoundIoInStreamWasapi *isw = &is->backend_data.wasapi;
|
||||
SoundIoInStream *instream = &is->pub;
|
||||
|
||||
HRESULT hr;
|
||||
|
||||
if (FAILED(hr = IAudioClient_Start(isw->audio_client))) {
|
||||
instream->error_callback(instream, SoundIoErrorStreaming);
|
||||
return;
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
WaitForSingleObject(isw->h_event, INFINITE);
|
||||
if (!isw->thread_exit_flag.test_and_set())
|
||||
return;
|
||||
|
||||
instream->read_callback(instream, isw->buffer_frame_count, isw->buffer_frame_count);
|
||||
}
|
||||
}
|
||||
|
||||
static void instream_shared_run(SoundIoInStreamPrivate *is) {
|
||||
|
|
Loading…
Reference in a new issue