Skip to content

Commit 9807085

Browse files
committed
WIP
1 parent 43fd893 commit 9807085

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/backends/wasapi/stream.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,11 @@ impl<Callback: AudioInputCallback> AudioThread<Callback, Audio::IAudioCaptureCli
394394
impl<Callback: AudioOutputCallback> AudioThread<Callback, Audio::IAudioRenderClient> {
395395
fn run(mut self) -> Result<Callback, error::WasapiError> {
396396
set_thread_priority();
397+
398+
// Prime the buffer with initial data before starting the stream.
399+
// This is necessary to prevent a deadlock in event-driven mode.
400+
self.process()?;
401+
397402
unsafe {
398403
self.audio_client.Start()?;
399404
}

0 commit comments

Comments
 (0)