SFML community forums

Help => Audio => Topic started by: chriss on October 14, 2009, 08:24:55 am

Title: Lack with Music and spatialization
Post by: chriss on October 14, 2009, 08:24:55 am
Hi.

First I hope this wasn't a topic before, but i couldn't find anything similar.

Ok, my goal is to implement a voicechat to a game, where players can hear their group members in the 3d environment.
To test if it is possible with something that is no sf::Sound, I tested it with Music first.

It works quite well but I think there is an issue.
With the Listener at 0,0,0 and the Music at 1,0,0 I hear the Music from the right speaker an with the Music at -1,0,0 from the left speaker.
So far so good. Then I extended the loop (check if the sound is still playing and wait) to let the sound move from x = -1 to 1.
Then I realized that 1. The sound doesn't move. It just hops from one speaker to the other then it switches from 0.1 to -0.1 and other wise.
I'm not really sure what happens at 0,0,0 but I can hear exactly the jump point.

Well I would expect that the Music will smothely switch the speakers.

Some details to the example. The sound goes from -1 to 1 and back. The Position switches every 100ms with the stepsize 0.1. I also tried with the Stepsize 0.01.


It meight be an OpenAL Problem. So I hope someone had the same issue and propably knows a workaround.


Regards Chriss


EDIT:
I'm using SFML 1.5 and extended this example:
http://www.sfml-dev.org/tutorials/1.5/audio-spatialization.php
Title: Lack with Music and spatialization
Post by: Laurent on October 14, 2009, 08:45:32 am
Hi

There's no bug, this is the expected behaviour.

You should read this:
http://blog.tbam.com.ar/2009/05/sound-spatiaiization-for-2d-games-in.html
Title: Lack with Music and spatialization
Post by: chriss on October 14, 2009, 12:18:50 pm
How stupid.

Thanks a lot for the Link.
That made it clear (first i couldn't understand why that should be expected).
Title: Re: Lack with Music and spatialization
Post by: er4zox on February 15, 2015, 09:41:57 pm
Damn, the link isn't working anymore. Does somebody have a working link to that article?
Because I'm stuggeling with 3D sound too and I'm sure that blog could help me.

Greetings
er4zox
Title: Re: Lack with Music and spatialization
Post by: Hiura on February 15, 2015, 09:52:45 pm
http://web.archive.org/web/20120120232320/http://blog.tbam.com.ar/2009/05/sound-spatiaiization-for-2d-games-in.html ?
Title: Re: Lack with Music and spatialization
Post by: er4zox on February 16, 2015, 12:24:15 am
Exactly! Thank you so much, I'm sure this will help others too! :)

Greetings
Blackanges