Using Sound


limestrael

Still Fresh
Joined
Oct 5, 2008
Messages
73
Hey!

How do you manage to add some sound to your games or such on the Pandora? I know there is SDL-mixer, but it isn't very good.

I especially want to know: is OpenAL usable on Pandora? (I'd like to use a lib which is based on)
 
Limestraël said:
Hey!

How do you manage to add some sound to your games or such on the Pandora? I know there is SDL-mixer, but it isn't very good.

I especially want to know: is OpenAL usable on Pandora? (I'd like to use a lib which is based on)
Yes it is.

And if you're thinking about IrrKlang; no, it won't be available (lots pf people have asked me about this for some reason).
 
Last edited by a moderator:
I've found that Phonon is very good for just saying, "Play that music file!" without any extra work, except for the part where qmake gets involved.
And if we have Qt 4, we should have Phonon, right?

But if you want to mix your own sound effects directly into a buffer, you'll probably want to set up a PulseAudio client. I think PulseAudio will be installed by default, there were a few threads about it somewhere.
 
dflemstr said:
Yes it is.

And if you're thinking about IrrKlang; no, it won't be available (lots pf people have asked me about this for some reason).

Thanks!
No, I don't think about IrrKlang. I had no doubt it wouldn't be available since it's a f**king proprietary library. I think about SFML.
 
Last edited by a moderator:
lulzfish said:
I've found that Phonon is very good for just saying, "Play that music file!" without any extra work, except for the part where qmake gets involved.
And if we have Qt 4, we should have Phonon, right?

But if you want to mix your own sound effects directly into a buffer, you'll probably want to set up a PulseAudio client. I think PulseAudio will be installed by default, there were a few threads about it somewhere.
Isn't Phonon KDE-specific? (EDIT: No, of course it isn't, stupid dflemstr.) However, XINE and GStreamer should of course be available on the Pandora (albeit not simultaneously, probably).

I would also use PulseAudio directly if you need low latency stuff or something.

Also, one very cool advantage if you use PulseAudio directly, is that you can control how PA handles your volume management. You can, for example, add multiple sound streams with multiple volume controls (for a game, you might want to control music volume and effects volume separately for example), thus giving your users a lot of flexibility.

Otherwise, I think that it's possible to use any kind of sound framework really as long as it sooner or later maps to GStreamer (which presumably will be the default sound connection thingie on the Pandora; XINE generally isn't used as much outside of the KDE world even if it IMO is far superior).
 
Last edited by a moderator:
Sphinxter said:
What exactly is SDL_Mixer not very good at? I've always found it rather excellent for playing and mixing buffers of sound.

There are two things I've been unable to work out:

  1. Can you query a playing music track to find out what its position is (so you can stop track A, and play track B at the same timecode)
  2. Can you fade a music track to a specific volume (I can fade up to full, or fade down to silent, but can't fade from full to 50%)
 
Last edited by a moderator:
benjymous said:
Sphinxter said:
What exactly is SDL_Mixer not very good at? I've always found it rather excellent for playing and mixing buffers of sound.

There are two things I've been unable to work out:

  1. Can you query a playing music track to find out what its position is (so you can stop track A, and play track B at the same timecode)
  2. Can you fade a music track to a specific volume (I can fade up to full, or fade down to silent, but can't fade from full to 50%)
I have access to a high resolution timer, can control and incrementally adjust the volume so yes, fading to any percentage is not a problem. I can limit the time a sound plays and start another exactly when it finishes so I'm pretty sure I could at least fake that desired effect. The basics are all in there, you may need to code with a bit of finesse but it works.
 
Last edited by a moderator:
Back
Top