Re: [AD] Callback functionality for audiostreams

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sunday 29 February 2004 17:54, Chris Jones wrote:
> For my application, I needed the ability to have a callback into the
> audiostreams, so that I get notified whenever free_audio_stream is called.
> (This way I can capture the sound output by almp3, alogg, etc and modify it
> before it gets to the speakers).
>
> Anyway, I was wondering whether this would be suitable to add into allegro
> itself. Personally I'd rather it was added so that I didn't have to use a
> patched version of the library, but what do you think?

I think it's a much better idea to add the callback you need to AllegroMP3, 
AllegroOGG and alogg. (Side-note: there are two distinct libraries, one 
called AllegroOGG and one called alogg.) Allegro shouldn't be working around 
bad design* in libraries that are on top of it. If you are releasing source 
code, you might like to include patched versions of Allegro{MP3,OGG} in your 
project, and require that the user have a standard version of Allegro 
available.

*Arguably the design is not that bad, since AllegroMP3 and AllegroOGG are 
actually very simple layers on top of underlying mp3 and ogg decoding 
libraries. If you want something more complex, there is no reason not to just 
use the raw libraries (apart from not having thought of it).

Ben




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/