[Openal] Using ffmpeg

Alberto Luaces aluaces at udc.es
Mon Jul 21 00:55:22 PDT 2008


Chris,

thank you for this great piece of code. I find it very instructive.

Regards,

Alberto

El Domingo 20 Julio 2008ES 04:55:43 Chris Robinson escribió:
> I've put up a simple program on the OpenAL Soft site showing how you can
> use ffmpeg to load/stream any format its capable of decoding (which can be
> quite a few, including Ogg, MP3, AC3, WMA..).
>
> http://kcat.strangesoft.net/openal.html#tutorials
>
> The code (alFFmpeg.c) is basically split into two parts. The first is the
> helper functions which handles dealing with ffmpeg, its packet and decode
> functions, opting to expose a simpler interface to get an audio stream in a
> file and getting specified amounts of uncompressed data from it. These
> functions are largely copyable as-is for use in other programs.
>
> The second part is the app itself, which implements a streaming player
> using the helper functions. The player itself shows how to accurately time
> from an OpenAL stream, and features gapless playback between multiple files
> that use the same output format (yay feature creep). It is also able to
> handle 4 and 5.1 channel source playback via AL_EXT_MCFORMATS.
>
> While the code may not be too basic, it is filled with comments, so it
> should make following and understanding it somewhat easier.
>
> Comments/critique about the code are welcome.
> _______________________________________________
> Openal mailing list
> Openal at opensource.creative.com
> http://opensource.creative.com/mailman/listinfo/openal





More information about the Openal mailing list