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

Author Topic: Help with 3D sound.  (Read 2030 times)

0 Members and 1 Guest are viewing this topic.

Not Given

  • Newbie
  • *
  • Posts: 1
    • View Profile
Help with 3D sound.
« on: March 08, 2014, 07:56:23 pm »
Hello, I am using the 3D sound with SFML, I have had no major problems with it until now. The problem I am having is when I play a sound directly behind the listener it plays in on the rear speaker channel, exactly like its supposed to. The problem with this is that if you are using a headset, hooked up to the standard green port (front) you will not hear anything from rear, this sounds completely obvious and normal, but unless you hook up another speaker you cannot normally hear rear sounds. What I want to know is how to make a sound that would normally play on the real channel  play on the other channels at a lesser volume, If this is possible.
                                                                                                                                                  Thanks in advance!

EDIT: To clarify, i would like to make the audio playing in the rear channel also play in the side channels at a lesser volume.
« Last Edit: March 10, 2014, 09:42:47 pm by Not Given »

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Help with 3D sound.
« Reply #1 on: May 23, 2014, 07:49:12 pm »
Let me state clearly up front that I have no experience with 3D sound, so what I'm about to say may be complete nonsense.

Why don't you simply always play the "back" sound at full volume and at the same time in other channels also play the sound at low volume?
I'd guess that in a proper setup with back speakers no one would notice that the sound also plays in the side/front channels, but if back speakers are not available then you at least hear a weak sound...
Yeah, kind of a hack, but couldn't it work?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: Help with 3D sound.
« Reply #2 on: May 23, 2014, 08:02:33 pm »
Can't you achieve what you want by placing the listener accordingly in 3D space (probably by changing the Z value)?

"Rear" is not a fixed channel, everything depends on the coordinate system as specified in sf::Listener.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10846
    • View Profile
    • development blog
    • Email
AW: Help with 3D sound.
« Reply #3 on: May 23, 2014, 08:07:39 pm »
Most games use options to choose between stereo, 5.1, 7.1, etc. and as such one can differentiate between the settings.

How sound positioning now gets actually implemented in bigger games, I don't know.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 878
    • View Profile
Re: Help with 3D sound.
« Reply #4 on: June 05, 2014, 02:39:45 pm »
If 3D sound works properly without the headphones connected, I'd assume some hardware or driver issue. Once you connect headphones, it should be mixed properly for (typically) two channels/stereo. Since this doesn't happen, are you sure the port is indeed intended for headphones? If it is, can you make sure that you've connected the correct front panel connector (most offer a HDAudio compatible connector as well as a AC97 compatible connector - they're similar, but not exactly the same).

 

anything