Michael Sweet wrote: >> Interesting. In theory would it be possible to use libogg (or libvorbis) >> to get the samples from an OGG file[1] and pass it to Fl_Audio::add()? > > Yes, absolutely. > >> And/Or would there be classes like Fl_OGG_Audio, Fl_WAV_Audio, etc. >> Similar to how there is Fl_PNG_Image, FL_RGB_Image, etc. I could also >> imaging a Fl_Shared_Audio and a fl_register_audio()? > > I don't think we'd do a "shared audio" class, just because audio tends > to be larger and we'll likely stream the audio from the file rather > than load it all into memory and play it. > > That said, Fl_WAV_File and other similar classes could be made from > a common Fl_Audio_File base class, similar to how Fl_Shared_Image > works but optimized for streaming of audio data. >
Yeah, I was thinking that Fl_Shared_Audio would be a class that would load a file path and figure out what specific object to make (Fl_WAV_, Fl_OGG_, etc.). Kind of like how Fl_Shared_Image::get(...) can load any image .png, .jpg, etc. I guess that's technically not "sharing" at all. -- Alvin _______________________________________________ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev