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

Author Topic: short delays on playing wav/ogg  (Read 11920 times)

0 Members and 2 Guests are viewing this topic.

mweb

  • Newbie
  • *
  • Posts: 13
    • View Profile
short delays on playing wav/ogg
« on: August 14, 2007, 11:11:36 pm »
Hi first thanks for this lib. Im only using the audio part but it looks good.

I wrote a few swig files to use your audio lib with python. It works but i got a small problem that sometimes i get slowdown of the music it is playing. The same for wave effects. It will last usually for a second and then it will play normal again. Do you have any idea what this could be?
Here my sys specs:
I'm using Gentoo Linux with openal 0.8, libvorbis 1.1.2.
I also just get stereo even if i have a 5.1 setup. I got this problem with several linux programs but some can handle it (for example VLC). But shuldn't openal be able to use it?

My second question is would it not by nice to change the listener position i have seen that you set the camera position on the creation of the sfAudioDevice. I think it is easier to change the listener position than to change all the Sound objects.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
short delays on playing wav/ogg
« Reply #1 on: August 14, 2007, 11:42:32 pm »
Quote
I wrote a few swig files to use your audio lib with python

Do you mean you created a Python binding for SFML-Audio ? So you could create bindings for other SFML packages and other languages ? :D

Quote
It works but i got a small problem that sometimes i get slowdown of the music it is playing. The same for wave effects. It will last usually for a second and then it will play normal again. Do you have any idea what this could be?

No idea, maybe your hardware or drivers ? The music class could have some issues, as it's using streaming, but wave sounds just use the basic OpenAL functions so it would be more surprising. By the way, OpenAL 0.8 looks a bit old, current versoin is 1.1 (or 1.2 ?).

Quote
I also just get stereo even if i have a 5.1 setup. I got this problem with several linux programs but some can handle it (for example VLC). But shuldn't openal be able to use it?

OpenAL is supposed to handle it, yes.

Quote
My second question is would it not by nice to change the listener position i have seen that you set the camera position on the creation of the sfAudioDevice. I think it is easier to change the listener position than to change all the Sound objects.

Yes, I should really create an interface to expose the listener properties.
Laurent Gomila - SFML developer

mweb

  • Newbie
  • *
  • Posts: 13
    • View Profile
short delays on playing wav/ogg
« Reply #2 on: August 15, 2007, 01:49:37 am »
Quote
Do you mean you created a Python binding for SFML-Audio ? So you could create bindings for other SFML packages and other languages ?  


Yes, but it is not finished, i just did the fastest possible solution. I just added for each public header file a SWIG interface file. The disadvantage is that it is not a very pythonic implementation, but it works.
This way it should be quite easy to do it for the howl library and this would work for almost all the suportet languages from SWIG.

Quote
No idea, maybe your hardware or drivers ? The music class could have some issues, as it's using streaming, but wave sounds just use the basic OpenAL functions so it would be more surprising. By the way, OpenAL 0.8 looks a bit old, current version is 1.1 (or 1.2 ?).


I will check the drivers, but since i never got any problem with any other software i may have to see if i really got the errors with playing the wave sounds.
OpenAL 0.0.8 is the current version you get from the OpenAL site. The Version 1.1 is for ALUT.

Quote
Yes, I should really create an interface to expose the listener properties.

Sounds great, thanks.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
short delays on playing wav/ogg
« Reply #3 on: August 15, 2007, 08:37:50 am »
Quote
Yes, but it is not finished, i just did the fastest possible solution. I just added for each public header file a SWIG interface file. The disadvantage is that it is not a very pythonic implementation, but it works.
This way it should be quite easy to do it for the howl library and this would work for almost all the suportet languages from SWIG.

Interesting. Would you like to help provide such bindings ? Otherwise I'll do it anyway, it was one of the next priorities.

Quote
OpenAL 0.0.8 is the current version you get from the OpenAL site. The Version 1.1 is for ALUT.

Yes, you're right. OpenAL 1.1 is only available for Windows.
Laurent Gomila - SFML developer

mweb

  • Newbie
  • *
  • Posts: 13
    • View Profile
short delays on playing wav/ogg
« Reply #4 on: August 15, 2007, 11:22:28 am »
I can create the first very basic bindings as described above but since my interested is only on the audio part. So I may help with creating more advanced bindings but won't do it through all parts.
But at least this would get you starting with the bindings.
I will rename each class since the prefix is something i don't like on the classes especially since i got a package in the scripting language anyway. This won't affect the C++ implementation.
I hope SWIG is ok for you.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
short delays on playing wav/ogg
« Reply #5 on: August 15, 2007, 11:27:35 am »
Just do what you want / can, and I'll do the rest. It will help me a lot since it's my first experience with creating such bindings.
Laurent Gomila - SFML developer

 

anything