Re: Audio Library Design

Kip Warner <[email protected]>
Newsgroups gmane.comp.lib.openal
Message-ID <[email protected]>
On Thu, 2010-09-23 at 16:24 -0230, Eric Stock wrote:
>         I look forward to getting some feedback on these designs.
>         Note, I am only
>         talking about load and play sounds here.  I think I understand
>         how to handle
>         the streaming of an ogg file, by loading the compressed data
>         into memory and
>         then decompressing and streaming from the location in memory.

Hey Eric. I recently had to design something very similar, the audio
module of my game engine (www.avaneya.com). What I've done, and many
others have, is to make a distinction between static and streaming audio
sources. Static are loaded once in their entirety into a buffer (a short
sound effect), and streaming are loaded a portion at a time from disk
(e.g. music).

I would also recommend you have the SetVolume() behaviour as a method of
the sound object itself, rather than as part of your singleton. That's
subjective, of course, and entirely up to you.

You can take a look at the design I came up with which might be useful
to you here on p12 of the design document PDF:

https://www.avaneya.com/temp/design/

Hope that helps,

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com

_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEABECAAYFAkybp8sACgkQLXnfK7bii21zzACgrJxDfwji/5p5q7C5PvZLC/vI
OjQAn2TN1fSo9rJ1PMBjvL7cA/YFYa4F
=A020
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.