Browse Source

Fix the Audio.NextDebugPlate console command

Adam Johnson 9 years ago
parent
commit
99e77e6695
  1. 11
      Sources/Plasma/PubUtilLib/plAudio/plSound.cpp
  2. 4
      Sources/Plasma/PubUtilLib/plAudio/plSound.h
  3. 2
      Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp
  4. 2
      Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.h

11
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();
}
}

4
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;

2
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 )

2
Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.h

@ -111,7 +111,7 @@ protected:
hsTArray<plSoundEvent *> 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 );

Loading…
Cancel
Save