mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-25 20:02:33 +01:00
- [Psy-X] fix setting SPU pitch=0 not doing anything
This commit is contained in:
parent
cc9daa6ca1
commit
35b21611de
@ -665,6 +665,14 @@ void SpuSetVoiceAttr(SpuVoiceAttr *arg)
|
|||||||
// update pitch
|
// update pitch
|
||||||
if (arg->mask & SPU_VOICE_PITCH)
|
if (arg->mask & SPU_VOICE_PITCH)
|
||||||
{
|
{
|
||||||
|
ALint state;
|
||||||
|
alGetSourcei(alSource, AL_SOURCE_STATE, &state);
|
||||||
|
|
||||||
|
if (arg->pitch == 0 && state == AL_PLAYING)
|
||||||
|
alSourcePause(alSource);
|
||||||
|
else if (voice->attr.pitch == 0 && state == AL_PAUSED)
|
||||||
|
alSourcePlay(alSource);
|
||||||
|
|
||||||
voice->attr.pitch = arg->pitch;
|
voice->attr.pitch = arg->pitch;
|
||||||
|
|
||||||
pitch = (float)(voice->attr.pitch) / 4096.0f;
|
pitch = (float)(voice->attr.pitch) / 4096.0f;
|
||||||
|
Loading…
Reference in New Issue
Block a user