mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2024-12-02 00:41:51 +00:00
Allow slow-motion sound effect for OpenAL sounds
This commit is contained in:
parent
e7ffc153c2
commit
bdfc2aadb1
2 changed files with 13 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue