Audio questions

The way I currently handle audio in A3P, is that for each unique sound file, I load four sounds (using Audio3DManager.loadSfx) to serve like channels. So, each sound can have up to four instances playing at a time. So I guess my first question is, is this the acceptable method?

The other problem is, when I use OpenAL, a lot of my sounds (they’re Ogg Vorbis, but it happened with WAV too) get cut off before they’re done playing. sound.status() returns the correct results at the correct times, but the longer sounds get cut off long before they’re done.

When I use FMOD, the problem goes away, but performance goes down the tubes and I get a bunch of these errors:

Any idea what I’m doing wrong?

that OpenAL cuts off some sounds is a known bug:

Okay, I didn’t know about the OpenAL thing.

If anyone else has trouble with FMOD, I think the main slowdown was due to logging all those error messages. I set “notify-level” to “fatal”, thereby eliminating the errors, and it pretty much fixed the performance issue.

A fix for this has been committed to cvs (at the time of writing this the last release is 1.7.0)