exceptions
This commit is contained in:
@@ -62,11 +62,14 @@ RageSound_DSound_Software::RageSound_DSound_Software()
|
|||||||
{
|
{
|
||||||
shutdown_mixer_thread = false;
|
shutdown_mixer_thread = false;
|
||||||
pcm = NULL;
|
pcm = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
CString RageSound_DSound_Software::Init()
|
||||||
|
{
|
||||||
/* If we're emulated, we're better off with the WaveOut driver; DS
|
/* If we're emulated, we're better off with the WaveOut driver; DS
|
||||||
* emulation tends to be desynced. */
|
* emulation tends to be desynced. */
|
||||||
if( ds.IsEmulated() )
|
if( ds.IsEmulated() )
|
||||||
RageException::ThrowNonfatal( "Driver unusable (emulated device)" );
|
return "Driver unusable (emulated device)";
|
||||||
|
|
||||||
max_writeahead = safe_writeahead;
|
max_writeahead = safe_writeahead;
|
||||||
if( PREFSMAN->m_iSoundWriteAhead )
|
if( PREFSMAN->m_iSoundWriteAhead )
|
||||||
@@ -92,17 +95,22 @@ RageSound_DSound_Software::RageSound_DSound_Software()
|
|||||||
|
|
||||||
MixingThread.SetName("Mixer thread");
|
MixingThread.SetName("Mixer thread");
|
||||||
MixingThread.Create( MixerThread_start, this );
|
MixingThread.Create( MixerThread_start, this );
|
||||||
|
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
RageSound_DSound_Software::~RageSound_DSound_Software()
|
RageSound_DSound_Software::~RageSound_DSound_Software()
|
||||||
{
|
{
|
||||||
/* Signal the mixing thread to quit. */
|
/* Signal the mixing thread to quit. */
|
||||||
|
if( MixingThread.IsCreated() )
|
||||||
|
{
|
||||||
shutdown_mixer_thread = true;
|
shutdown_mixer_thread = true;
|
||||||
LOG->Trace("Shutting down mixer thread ...");
|
LOG->Trace("Shutting down mixer thread ...");
|
||||||
LOG->Flush();
|
LOG->Flush();
|
||||||
MixingThread.Wait();
|
MixingThread.Wait();
|
||||||
LOG->Trace("Mixer thread shut down.");
|
LOG->Trace("Mixer thread shut down.");
|
||||||
LOG->Flush();
|
LOG->Flush();
|
||||||
|
}
|
||||||
|
|
||||||
delete pcm;
|
delete pcm;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ public:
|
|||||||
|
|
||||||
RageSound_DSound_Software();
|
RageSound_DSound_Software();
|
||||||
virtual ~RageSound_DSound_Software();
|
virtual ~RageSound_DSound_Software();
|
||||||
|
CString Init();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user