diff --git a/Sources/Plasma/PubUtilLib/plAudio/plSound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plSound.cpp index 5974ff99..12b39c91 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plSound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plSound.cpp @@ -163,10 +163,10 @@ void plSound::IUpdateDebugPlate( void ) fDebugPlate->SetPosition( -0.5, 0 ); fDebugPlate->SetDataRange( 0, 100, 100 ); fDebugPlate->SetColors( 0x80202000 ); - fDebugPlate->SetTitle( GetKeyName().c_str() ); // Bleah fDebugPlate->SetLabelText( "Desired", "Curr", "Soft", "Dist" ); } + fDebugPlate->SetTitle(GetKeyName().c_str()); // Bleah fDebugPlate->SetVisible( true ); fDebugPlate->AddData( (int32_t)( fDesiredVol * 100.f ), (int32_t)( fCurrVolume * 100.f ), @@ -175,7 +175,7 @@ void plSound::IUpdateDebugPlate( void ) } } -void plSound::SetCurrDebugPlate( const plKey soundKey ) +void plSound::SetCurrDebugPlate( const plKey& soundKey ) { if( soundKey == nil ) { @@ -186,12 +186,7 @@ void plSound::SetCurrDebugPlate( const plKey soundKey ) else { fCurrDebugPlateSound = plSound::ConvertNoRef( soundKey->GetObjectPtr() ); - if( fDebugPlate != nil ) - { - fDebugPlate->ClearData(); - fDebugPlate->SetVisible( true ); - fDebugPlate->SetTitle( fCurrDebugPlateSound->GetKeyName().c_str() ); // Bleah - } + fCurrDebugPlateSound->IUpdateDebugPlate(); } } diff --git a/Sources/Plasma/PubUtilLib/plAudio/plSound.h b/Sources/Plasma/PubUtilLib/plAudio/plSound.h index 56df0c8d..b9606488 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plSound.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plSound.h @@ -260,7 +260,7 @@ public: virtual void ForceUnload( void ); // Note: ONLY THE AUDIOSYS SHOULD CALL THIS. If you're not the audioSys, get lost. - static void SetCurrDebugPlate( const plKey soundKey ); + static void SetCurrDebugPlate( const plKey& soundKey ); void RegisterOnAudioSys( void ); void UnregisterOnAudioSys( void ); @@ -343,7 +343,7 @@ protected: void IUpdateDebugPlate( void ); void IPrintDbgMessage( const char *msg, bool isErr = false ); - virtual void ISetActualVolume(const float v) = 0; + virtual void ISetActualVolume(float v) = 0; virtual void IActuallyStop( void ); virtual bool IActuallyPlaying( void ) = 0; virtual void IActuallyPlay( void ) = 0; diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp index b33ca3fa..eb317fab 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp @@ -274,7 +274,7 @@ void plWin32Sound::SetPosition( const hsPoint3 pos ) } } -void plWin32Sound::ISetActualVolume(const float volume) +void plWin32Sound::ISetActualVolume(float volume) { float vol = IAttenuateActualVolume( volume ) * IGetChannelVolume(); if( fDSoundBuffer ) diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.h b/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.h index 36faf357..ec8fedc4 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.h @@ -111,7 +111,7 @@ protected: hsTArray fSoundEvents; - virtual void ISetActualVolume(const float v); + virtual void ISetActualVolume(float v); virtual void IActuallyStop( void ); virtual bool IActuallyPlaying( void ) { return fReallyPlaying; } virtual void IActuallyPlay( void );