add null sound driver
This commit is contained in:
@@ -621,6 +621,10 @@ SOURCE=.\arch\Sound\RageSoundDriver_DSound_Software.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\arch\Sound\RageSoundDriver_Null.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\arch\Sound\RageSoundDriver_WaveOut.cpp
|
SOURCE=.\arch\Sound\RageSoundDriver_WaveOut.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|||||||
@@ -773,6 +773,9 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
|||||||
<File
|
<File
|
||||||
RelativePath="arch\Sound\RageSoundDriver_DSound_Software.h">
|
RelativePath="arch\Sound\RageSoundDriver_DSound_Software.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="arch\Sound\RageSoundDriver_Null.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="arch\Sound\RageSoundDriver_WaveOut.cpp">
|
RelativePath="arch\Sound\RageSoundDriver_WaveOut.cpp">
|
||||||
</File>
|
</File>
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
#ifndef RAGE_SOUND_NULL
|
||||||
|
#define RAGE_SOUND_NULL
|
||||||
|
|
||||||
|
#include "RageSound.h"
|
||||||
|
|
||||||
|
class RageSound_Null: public RageSoundDriver
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
/* virtuals: */
|
||||||
|
void StartMixing(RageSound *snd) { }
|
||||||
|
void StopMixing(RageSound *snd) { }
|
||||||
|
int GetPosition(const RageSound *snd) const { return 0; }
|
||||||
|
float GetPlayLatency() const { return 0.0f; } /* silence is fast! */
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2003 by the person(s) listed below. All rights reserved.
|
||||||
|
*
|
||||||
|
* Glenn Maynard
|
||||||
|
*/
|
||||||
@@ -41,8 +41,10 @@ RageSoundDriver *MakeRageSoundDriver(CString drivers)
|
|||||||
else if(DriversToTry[i] == "DirectSound-sw") ret = new RageSound_DSound_Software;
|
else if(DriversToTry[i] == "DirectSound-sw") ret = new RageSound_DSound_Software;
|
||||||
else if(DriversToTry[i] == "WaveOut") ret = new RageSound_WaveOut;
|
else if(DriversToTry[i] == "WaveOut") ret = new RageSound_WaveOut;
|
||||||
#else
|
#else
|
||||||
#error No sound drivers defined!
|
#warn No sound drivers defined!
|
||||||
|
if(0) ;
|
||||||
#endif
|
#endif
|
||||||
|
else if(DriversToTry[i] == "Null") ret = new RageSound_Null;
|
||||||
else
|
else
|
||||||
LOG->Warn("Unknown sound driver name: %s", DriversToTry[i].GetString());
|
LOG->Warn("Unknown sound driver name: %s", DriversToTry[i].GetString());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,7 @@
|
|||||||
#include "LoadingWindow/LoadingWindow_SDL.h"
|
#include "LoadingWindow/LoadingWindow_SDL.h"
|
||||||
#include "ErrorDialog/ErrorDialog_stdout.h"
|
#include "ErrorDialog/ErrorDialog_stdout.h"
|
||||||
#include "ArchHooks/ArchHooks_none.h"
|
#include "ArchHooks/ArchHooks_none.h"
|
||||||
|
#include "Sound/RageSoundDriver_Null.h"
|
||||||
/* no default sound driver */
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user