mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-10-04 13:27:14 +00:00
Implement stereo to mono mixing for proper L/R separation even for stereo samples.
This mixes only those sounds that are supposed to be played positional. All centered (default) sounds are played in stereo, as usual.
This commit is contained in:
parent
66802e1935
commit
cf6556b94d
5 changed files with 51 additions and 14 deletions
|
@ -106,7 +106,7 @@ struct PlaySfx
|
|||
{
|
||||
PlaySfx() : priority(0.5), handle(0), vol(1), fade(SFT_NONE),
|
||||
time(0), freq(1), loops(0), channel(BBGE_AUDIO_NOCHANNEL),
|
||||
maxdist(0), x(0), y(0), relative(true) {}
|
||||
maxdist(0), x(0), y(0), relative(true), positional(false) {}
|
||||
|
||||
std::string name;
|
||||
intptr_t handle;
|
||||
|
@ -119,7 +119,8 @@ struct PlaySfx
|
|||
float maxdist; // distance gain attenuation. if 0: use default value, -1: don't attenuate at all
|
||||
SoundFadeType fade;
|
||||
float x, y;
|
||||
bool relative;
|
||||
bool relative; // relative to listener?
|
||||
bool positional; // if true, this indicates that we want positional sound (stereo will be downmixed to mono to make OpenAL happy)
|
||||
};
|
||||
|
||||
class SoundHolder; // defined below
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue