1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-07-03 06:24:32 +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
parent ff195c6b16
commit ac2091fb69
8 changed files with 91 additions and 105 deletions

View file

@ -583,6 +583,7 @@ public:
FMOD_RESULT isPlaying(bool *isplaying);
FMOD_RESULT setChannelGroup(ChannelGroup *channelgroup);
FMOD_RESULT stop();
FMOD_RESULT setPan(const float pan);
void setGroupVolume(const float _volume);
void setSourceName(const ALuint _sid) { sid = _sid; }
ALuint getSourceName() const { return sid; }
@ -807,6 +808,14 @@ FMOD_RESULT OpenALChannel::setPriority(int _priority)
return FMOD_OK;
}
ALBRIDGE(Channel,setPan,(float volume),(volume))
FMOD_RESULT OpenALChannel::setPan(const float pan)
{
alSource3f(sid, AL_POSITION, pan, 0, 0);
SANITY_CHECK_OPENAL_CALL();
return FMOD_OK;
}
// FMOD::ChannelGroup implementation...