SFML community forums

Help => Audio => Topic started by: hello2342 on August 22, 2020, 08:03:43 pm

Title: Why does SFML only support Mono?
Post by: hello2342 on August 22, 2020, 08:03:43 pm
Hello,

to have the sound coming out from left or right speakers, as example based on the camera rotation in the scene, why does the sound have to be mono? Because mono has a bad quality, stereo sounds much better.

In my scene, the sound only comes out from left or right speakers (based on camera rotation) if the ogg file is mono. But as mentioned, mono has a much worse quality. Why not supporting stereo? A stereo sound could be played from left or right speakers only too.  I mean it's not like described in the manual, stereo sounds to not contain the data to know when to play from right or left speakers. The stereo sound just needs to be treated like the mono file.
Title: Re: Why does SFML only support Mono?
Post by: Laurent on August 22, 2020, 09:36:43 pm
Stereo means that the sound itself already uses left and right speakers, which conflicts with what the 3D spatialization would do. It's rather intuitive that only mono sounds can be spatialized.

And no, mono sounds don't have "bad" quality. They just have a single channel, and thus play the same on both left and right speakers (when not spatialized).
Title: Re: Why does SFML only support Mono?
Post by: Hapax on August 23, 2020, 12:37:30 am
Stereo sound is effectively just two mono sounds with automatic spatial placement.