mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2024-12-03 09:22:45 +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 ) );
|
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 );
|
void Create( const idSoundSample* leadinSample, const idSoundSample* loopingSample );
|
||||||
|
|
||||||
// Start playing at a particular point in the buffer. Does an Update() too
|
// Start playing at a particular point in the buffer. Does an Update() too
|
||||||
|
|
|
@ -54,16 +54,18 @@ public:
|
||||||
{
|
{
|
||||||
gain = g;
|
gain = g;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void SetPitch( float p )
|
||||||
|
{
|
||||||
|
pitch = p;
|
||||||
|
}
|
||||||
// RB end
|
// RB end
|
||||||
|
|
||||||
void SetCenterChannel( float c )
|
void SetCenterChannel( float c )
|
||||||
{
|
{
|
||||||
centerChannel = c;
|
centerChannel = c;
|
||||||
}
|
}
|
||||||
void SetPitch( float p )
|
|
||||||
{
|
|
||||||
pitch = p;
|
|
||||||
}
|
|
||||||
void SetInnerRadius( float r )
|
void SetInnerRadius( float r )
|
||||||
{
|
{
|
||||||
innerRadius = r;
|
innerRadius = r;
|
||||||
|
|
Loading…
Reference in a new issue