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

Author Topic: Lack with Music and spatialization  (Read 3797 times)

0 Members and 1 Guest are viewing this topic.

chriss

  • Newbie
  • *
  • Posts: 7
    • View Profile
Lack with Music and spatialization
« 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

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Lack with Music and spatialization
« Reply #1 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
Laurent Gomila - SFML developer

chriss

  • Newbie
  • *
  • Posts: 7
    • View Profile
Lack with Music and spatialization
« Reply #2 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).

er4zox

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Lack with Music and spatialization
« Reply #3 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

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
SFML / OS X developer

er4zox

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Lack with Music and spatialization
« Reply #5 on: February 16, 2015, 12:24:15 am »
Exactly! Thank you so much, I'm sure this will help others too! :)

Greetings
Blackanges