From 1b02c6d494913a881cb3cb1d62d64e7eb064e033 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 23 Sep 2004 12:23:24 +0000 Subject: [PATCH] remove m_FadedOutAt; didn't like the effect produced --- stepmania/src/RageSound.cpp | 10 ++-------- stepmania/src/RageSound.h | 4 ---- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/stepmania/src/RageSound.cpp b/stepmania/src/RageSound.cpp index 45185396ec..f9597e9460 100644 --- a/stepmania/src/RageSound.cpp +++ b/stepmania/src/RageSound.cpp @@ -49,7 +49,6 @@ RageSoundParams::RageSoundParams(): m_StartSecond = 0; m_LengthSeconds = -1; m_FadeLength = 0; - m_FadedOutAt = -1; m_Volume = -1.0f; // use SOUNDMAN->GetMixVolume() m_Balance = 0; // center speed_input_samples = speed_output_samples = 1; @@ -558,14 +557,9 @@ bool RageSound::GetDataToPlay( int16_t *buffer, int size, int &sound_frame, int * m_LengthFrames is -1, we don't know the length we're playing. * (m_LengthFrames is the length to play, not the length of the * source.) If we don't know the length, don't fade. */ - if( m_Param.m_FadeLength != 0 && (m_Param.m_LengthSeconds != -1 || m_Param.m_FadedOutAt != -1) ) + if( m_Param.m_FadeLength != 0 && m_Param.m_LengthSeconds != -1 ) { - float fFinishFadingOutAt; - if( m_Param.m_FadedOutAt != -1 ) - fFinishFadingOutAt = m_Param.m_FadedOutAt; - else - fFinishFadingOutAt = m_Param.m_StartSecond + m_Param.m_LengthSeconds; - + const float fFinishFadingOutAt = m_Param.m_StartSecond + m_Param.m_LengthSeconds; const float fStartFadingOutAt = fFinishFadingOutAt - m_Param.m_FadeLength; const float fStartSecond = float(decode_position) / samplerate(); const float fEndSecond = float(decode_position+got_frames) / samplerate(); diff --git a/stepmania/src/RageSound.h b/stepmania/src/RageSound.h index 29e0b8575b..322125d652 100644 --- a/stepmania/src/RageSound.h +++ b/stepmania/src/RageSound.h @@ -38,10 +38,6 @@ struct RageSoundParams /* Number of seconds to spend fading out. */ float m_FadeLength; - /* If set, the sound will be completely faded out at this position; otherwise, - * m_LengthSeconds is used. */ - float m_FadedOutAt; - void SetNoFade() { m_FadeLength = 0; } float m_Volume;