remove RageSound::GetAbsoluteVolume; use "Volume" property instead

This commit is contained in:
Glenn Maynard
2007-01-27 07:32:13 +00:00
parent 201cc449bd
commit 322ebd5baa
2 changed files with 4 additions and 9 deletions
+4 -7
View File
@@ -564,13 +564,6 @@ bool RageSound::SetPositionFrames( int iFrames )
return iRet == 1;
}
float RageSound::GetAbsoluteVolume() const
{
float f = m_Param.m_Volume;
f *= SOUNDMAN->GetMixVolume();
return f;
}
float RageSound::GetPlaybackRate() const
{
return m_Param.m_fSpeed;
@@ -597,6 +590,10 @@ void RageSound::ApplyParams()
m_pSource->SetProperty( "StartSecond", m_Param.m_StartSecond );
m_pSource->SetProperty( "LengthSeconds", m_Param.m_LengthSeconds );
m_pSource->SetProperty( "FadeSeconds", m_Param.m_FadeLength );
float fVolume = m_Param.m_Volume * SOUNDMAN->GetMixVolume();
m_pSource->SetProperty( "Volume", fVolume );
switch( GetStopMode() )
{
case RageSoundParams::M_LOOP:
-2
View File
@@ -20,7 +20,6 @@ public:
virtual void CommitPlayingPosition( int64_t iFrameno, int64_t iPosition, int iBytesRead ) = 0;
virtual int GetSampleRate() const = 0;
virtual RageTimer GetStartTime() const { return RageZeroTimer; }
virtual float GetAbsoluteVolume() const = 0;
virtual RString GetLoadedFilePath() const = 0;
};
@@ -139,7 +138,6 @@ public:
float GetPlaybackRate() const;
RageTimer GetStartTime() const;
float GetAbsoluteVolume() const; // factors in SOUNDMAN->GetMixVolume()
void SetParams( const RageSoundParams &p );
const RageSoundParams &GetParams() const { return m_Param; }
bool SetProperty( const RString &sProperty, float fValue );