From e96c709856bf1af9946abdf662ecffff3eb3bd2c Mon Sep 17 00:00:00 2001 From: dawsh Date: Mon, 14 Jul 2025 14:33:20 -0500 Subject: [PATCH] Wow, multithreaded audio?? --- main.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/main.cpp b/main.cpp index 89648a9..2f0dfa2 100644 --- a/main.cpp +++ b/main.cpp @@ -35,13 +35,9 @@ << "default source" << info->default_source_name << std::endl; }; - - PulseStream test_stream = server.CreateStream("Test Stream"); PulseStream second_stream = server.CreateStream("Second Stream"); - //PulseStream test_stream2 = test.CreateStream("Another Test Stream"); - //Sound test_sound = Sound::FromPCMFile("output.raw"); Sound test_sound = Sound::FromOGGVorbisFile("../test-sounds/wind.ogg"); Sound wav_sound = Sound::FromWAVFile("../test-sounds/robodeath.wav"); @@ -56,7 +52,8 @@ server.Play(second_stream, test_sound); }}; - th.join(); + th.detach(); + server.Play(test_stream, wav_sound); server.Play(test_stream, sine_sound);