Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Why does SFML only support Mono?  (Read 5214 times)

0 Members and 1 Guest are viewing this topic.

hello2342

  • Newbie
  • *
  • Posts: 1
    • View Profile
Why does SFML only support Mono?
« 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Why does SFML only support Mono?
« Reply #1 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).
Laurent Gomila - SFML developer

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Why does SFML only support Mono?
« Reply #2 on: August 23, 2020, 12:37:30 am »
Stereo sound is effectively just two mono sounds with automatic spatial placement.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*