1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-10-04 13:27:14 +00:00

Fixed positional audio & pitch shift.

Apparently this was half implemented but not fully finished.
Mono samples work fine, for stereo, L/R panning does not work (due to OpenAL's limitation)
Also fixed: entity sounds should not play if a cutscene is currently skipped.
This commit is contained in:
fgenesis 2011-11-26 21:00:24 +01:00
commit ac2091fb69
8 changed files with 91 additions and 105 deletions

View file

@ -1147,6 +1147,13 @@ void *SoundManager::playSfx(const PlaySfx &play)
checkError();
}
channel->setPan(play.pan);
float freq = play.freq;
if (freq <= 0)
freq = 1;
channel->setFrequency(freq);
result = channel->setPaused(false);
checkError();