diff --git a/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp b/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp index 0905ab27d8..c8ea1315b2 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp @@ -288,12 +288,17 @@ void RageSound_Generic_Software::StopMixing( RageSoundBase *snd ) } +void RageSound_Generic_Software::StartDecodeThread() +{ + ASSERT( !m_DecodeThread.IsCreated() ); + m_DecodeThread.Create( DecodeThread_start, this ); +} + RageSound_Generic_Software::RageSound_Generic_Software() { shutdown_decode_thread = false; m_DecodeThread.SetName("Decode thread"); - m_DecodeThread.Create( DecodeThread_start, this ); } RageSound_Generic_Software::~RageSound_Generic_Software() diff --git a/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.h b/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.h index 97670474e9..1e81438332 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.h +++ b/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.h @@ -86,6 +86,10 @@ class RageSound_Generic_Software: public RageSoundDriver bool GetDataForSound( sound &s ); protected: + /* Start the decoding. This should be called once the hardware is set up and + * GetSampleRate will return the correct value. */ + void StartDecodeThread(); + /* Override this to set the priority of the decoding thread, which should be above * normal priority but not realtime. */ virtual void SetupDecodingThread() { }