[openal] openal Digest, Vol 31, Issue 2
Chris Robinson
chris.kcat at gmail.com
Thu Aug 11 20:10:11 EDT 2016
On 08/11/2016 03:10 PM, Matthew Swartz wrote:
> Stereo sources for pretty much everything would
> be great if possible.
Stereo doesn't really work well for 3D sounds. Given that a stereo sound
defines a pseduo-2D front ~60-degree soundfield for the listener, it'd
be pretty limited for positioning cues outside of that. Especially when
you have full 3D output, it wouldn't be that great to have the sound
only come from the front, and not from the sides, back, up, or down (and
even if you could move it, the irregular shape of the human head
prevents a stereo sound 'image' from being perceived well when coming
from the sides, or vertically).
What could be interesting and perhaps more useful is an option to fade
between multichannel and 3D mono given the distance to the source. So
for instance, when a source and listener have the same position, it's a
normal multichannel sound. When the source is at its reference distance,
it's monoized and positioned in 3D space (or perhaps using something
like the radius property to determine how much it's monoized at a given
distance by its spread). Could be particularly useful with B-Format 3D
buffers, so the listener is fully enveloped when at the sound, which
also rotates with the listener's head, and fades to a point sound as it
moves away.
> Also, I may be wrong here, but do you support the
> Opus format (I'm feeling too lazy to check atm)?
OpenAL doesn't directly support compressed formats. It's up to the app
to decide what formats it wants to use and how to decode them, whether
it wants to stream longer tracks or fully decode shorter sound effects,
and OpenAL will gladly play the decoded PCM samples regardless of where
they came from.
There are/were a few extensions for OpenAL to handle compressed formats
like Vorbis and MP3, but those are deprecated given that they don't give
the app a lot of control (decode on the fly? pre-decode? require a
container? multi-stream containers?). OpenAL Soft has never supported those.
The only compression format extensions OpenAL Soft has are for IMA4
ADPCM (which was already there in the original code I started with), and
MSADPCM... and I'd probably get rid of them if I could, except I know
the latter is used by at least one thing and I don't want to break it.
More information about the openal
mailing list