awesome fix for sounds: this is possible now
This commit is contained in:
+1
-8
@@ -14,14 +14,7 @@ void ActorSound::Load( const RString &sPath )
|
|||||||
|
|
||||||
void ActorSound::Play()
|
void ActorSound::Play()
|
||||||
{
|
{
|
||||||
// This fix makes it possible to stop and pause ActorSounds. (Also,
|
m_Sound.Play();
|
||||||
// sometimes stacking sounds is annoying.) -DaisuMaster
|
|
||||||
if( m_Sound.IsPlaying() )
|
|
||||||
{
|
|
||||||
m_Sound.PlayCopy();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
m_Sound.StartPlaying();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActorSound::Pause( bool bPause )
|
void ActorSound::Pause( bool bPause )
|
||||||
|
|||||||
@@ -667,6 +667,24 @@ public:
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Rename me and deprecate the above one? -DaisuMaster
|
||||||
|
static int SetParam( T* p, lua_State *L )
|
||||||
|
{
|
||||||
|
RageSoundParams params( p->GetParams() );
|
||||||
|
|
||||||
|
RString val = SArg(1);
|
||||||
|
if( val == "StartSecond" ) params.m_StartSecond = FArg(2);
|
||||||
|
else if( val == "LengthSeconds" ) params.m_LengthSeconds = FArg(2);
|
||||||
|
else if( val == "FadeInSeconds" ) params.m_fFadeInSeconds = FArg(2);
|
||||||
|
else if( val == "FadeSeconds" ) params.m_fFadeOutSeconds = FArg(2);
|
||||||
|
else if( val == "Pitch" ) params.m_fPitch = FArg(2);
|
||||||
|
else if( val == "Speed" ) params.m_fSpeed = FArg(2);
|
||||||
|
else if( val == "Volume" ) params.m_Volume = FArg(2);
|
||||||
|
|
||||||
|
p->SetParams( params );
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
static int SetStopMode( T* p, lua_State *L )
|
static int SetStopMode( T* p, lua_State *L )
|
||||||
{
|
{
|
||||||
@@ -681,6 +699,7 @@ public:
|
|||||||
ADD_METHOD( speed );
|
ADD_METHOD( speed );
|
||||||
ADD_METHOD( volume );
|
ADD_METHOD( volume );
|
||||||
ADD_METHOD( SetProperty );
|
ADD_METHOD( SetProperty );
|
||||||
|
ADD_METHOD( SetParam );
|
||||||
//ADD_METHOD( SetStopMode );
|
//ADD_METHOD( SetStopMode );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user