mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
plgAudioSys doesn't need to take hsWindowHndl.
This commit is contained in:
@ -264,7 +264,7 @@ void plAudioSystem::IEnumerateDevices()
|
||||
}
|
||||
|
||||
//// Init ////////////////////////////////////////////////////////////////////
|
||||
bool plAudioSystem::Init( hsWindowHndl hWnd )
|
||||
bool plAudioSystem::Init()
|
||||
{
|
||||
plgAudioSys::fRestarting = false;
|
||||
static bool firstTimeInit = true;
|
||||
@ -996,7 +996,6 @@ bool plgAudioSys::fUseHardware = false;
|
||||
bool plgAudioSys::fMuted = true;
|
||||
bool plgAudioSys::fDelayedActivate = false;
|
||||
bool plgAudioSys::fEnableEAX = false;
|
||||
hsWindowHndl plgAudioSys::fWnd = nil;
|
||||
float plgAudioSys::fChannelVolumes[ kNumChannels ] = { 1.f, 1.f, 1.f, 1.f, 1.f, 1.f };
|
||||
float plgAudioSys::f2D3DBias = 0.75f;
|
||||
uint32_t plgAudioSys::fDebugFlags = 0;
|
||||
@ -1010,13 +1009,12 @@ std::string plgAudioSys::fDeviceName;
|
||||
bool plgAudioSys::fRestarting = false;
|
||||
bool plgAudioSys::fMutedStateChange = false;
|
||||
|
||||
void plgAudioSys::Init(hsWindowHndl hWnd)
|
||||
void plgAudioSys::Init()
|
||||
{
|
||||
fSys = new plAudioSystem;
|
||||
fSys->RegisterAs( kAudioSystem_KEY );
|
||||
plgDispatch::Dispatch()->RegisterForExactType( plAudioSysMsg::Index(), fSys->GetKey() );
|
||||
plgDispatch::Dispatch()->RegisterForExactType( plRenderMsg::Index(), fSys->GetKey() );
|
||||
fWnd = hWnd;
|
||||
|
||||
if(fMuted)
|
||||
SetGlobalFadeVolume(0.0f);
|
||||
@ -1143,7 +1141,7 @@ void plgAudioSys::Activate(bool b)
|
||||
if( b )
|
||||
{
|
||||
plStatusLog::AddLineS( "audio.log", plStatusLog::kBlue, "ASYS: -- Attempting audio system init --" );
|
||||
if( !fSys->Init( fWnd ) )
|
||||
if( !fSys->Init() )
|
||||
{
|
||||
// Cannot init audio system. Don't activate
|
||||
return;
|
||||
|
@ -94,7 +94,7 @@ public:
|
||||
kRefEAXRegion
|
||||
};
|
||||
|
||||
bool Init(hsWindowHndl hWnd);
|
||||
bool Init();
|
||||
void Shutdown();
|
||||
|
||||
void SetActive( bool b );
|
||||
@ -189,7 +189,7 @@ public:
|
||||
kHardware,
|
||||
kHardwarePlusEAX,
|
||||
};
|
||||
static void Init(hsWindowHndl hWnd);
|
||||
static void Init();
|
||||
static bool Hardware() { return fUseHardware; }
|
||||
static void SetUseHardware(bool b);
|
||||
static void SetActive(bool b);
|
||||
@ -199,7 +199,6 @@ public:
|
||||
static void Shutdown();
|
||||
static void Activate(bool b);
|
||||
static bool IsMuted( void ) { return fMuted; }
|
||||
static hsWindowHndl hWnd() { return fWnd; }
|
||||
static plAudioSystem* Sys() { return fSys; }
|
||||
static void Restart( void );
|
||||
static bool UsingEAX( void ) { return fSys->fUsingEAX; }
|
||||
@ -259,7 +258,6 @@ private:
|
||||
static bool fInit;
|
||||
static bool fActive;
|
||||
static bool fMuted;
|
||||
static hsWindowHndl fWnd;
|
||||
static bool fUseHardware;
|
||||
static bool fDelayedActivate;
|
||||
static float fChannelVolumes[ kNumChannels ];
|
||||
|
@ -447,7 +447,7 @@ unsigned plWin32StreamingSound::GetByteOffset()
|
||||
unsigned offset = fDSoundBuffer->GetByteOffset();
|
||||
long byteoffset = ((fDataStream->GetDataSize() - fDataStream->NumBytesLeft()) - bytesQueued) + offset;
|
||||
|
||||
return byteoffset < 0 ? fDataStream->GetDataSize() - abs(byteoffset) : byteoffset;
|
||||
return byteoffset < 0 ? fDataStream->GetDataSize() - std::abs(byteoffset) : byteoffset;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user