How can I create a multichannel file?

Hi everybody!
I know that joal primary is used for playing sounds in applications.
But in my case it is necessary to generate a multichannel file… lets say a .wav (should be the easiest task).
Can somebody help me finding the right way?
Can I use the OpenAL-Extension for Multi-Channel Buffers (I’m working on a mac) ? And how can I store these buffers in a readable format on my hd?

Thanks
Chris

When you say ‘generate a multichannel file’ do you mean it like generating textures dynamically? It should be possible, but I wouldn’t know where to begin.

If the Multi-Channel Buffers extension is available on your platform, then all you have to do is specify one of the multi-channel enum values when using alBufferData(). As for saving them to disk… you’ll need to find some documentation on a multi-channel format that you can save to, so you can write an app which knows what order the data has to be translated from the ByteBuffer storing your multi-channel data to disk (OpenAL won’t do this for you).

Ok. Maybe ‘generate’ was not what I meant. I want to set up a static 3D-Audio-Scene (with ‘static’ I mean no source or listener is moving) and save the output to disk (as a multichannel file, if possible).
So I think I need to read a kind of ‘ListenerBuffer’ for saving the result…
Am I right? Can I manage that task with JOAL?

Thanks
Chris

Let me try to understand what you’re after:

  • you’ve got several stationary sources positioned around a stationary listener
  • monophonic sounds will be output from those sources
  • you want to record what is heard from the listener, to a multi-channel file

If I’ve got that right, then this might be possible, although I don’t know if the alcCaptureOpenDevice() function has limitations on the buffer format for which it can record to. The description for the multi-channel buffers extension which I’m looking at, doesn’t look promising though: “…provides a mechanism to play multi-channel data via OpenAL.” (emphasis mine). It might be worth your time experimenting with this to find-out if it can also record to a multi-channel format.

The result can definitely be saved to disk though.