Allow slow-motion sound effect for OpenAL sounds

This commit is contained in:
Robert Beckebans 2013-05-24 18:55:56 +02:00
parent e7ffc153c2
commit bdfc2aadb1
2 changed files with 13 additions and 4 deletions

View file

@ -56,6 +56,13 @@ public:
alSourcef( openalSource, AL_GAIN, ( gain ) < ( 1.0f ) ? ( gain ) : ( 1.0f ) );
}
void SetPitch( float p )
{
idSoundVoice_Base::SetPitch( p );
alSourcef( openalSource, AL_PITCH, p );
}
void Create( const idSoundSample* leadinSample, const idSoundSample* loopingSample );
// Start playing at a particular point in the buffer. Does an Update() too

View file

@ -54,16 +54,18 @@ public:
{
gain = g;
}
virtual void SetPitch( float p )
{
pitch = p;
}
// RB end
void SetCenterChannel( float c )
{
centerChannel = c;
}
void SetPitch( float p )
{
pitch = p;
}
void SetInnerRadius( float r )
{
innerRadius = r;