Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Implementing an audio visualiser with A5

This thread is locked; no one can reply to it. rss feed Print
Implementing an audio visualiser with A5
dthompson
Member #5,749
April 2005
avatar

I've often wondered whether this'd be particularly suited to Allegro. Has anybody written anything that displays output corresponding to audio input events?

The first thing that came to mind was the usage of ALLEGRO_AUDIO_STREAM, but after looking at the manual, I can't see that it (or anything else within the audio addon) concerns the buffering of audio from a stream external to the program, or any kind of complex DSP for that matter.

So, could anyone recommend a C library for reading and processing audio input streams? Or is there a way to do this with the Allegro audio addon that I'm missing?

______________________________________________________
Website. It was freakdesign.bafsoft.net.
This isn't a game!

beoran
Member #12,636
March 2011

You probably have to use an allegro mixer and a third party fast Fourier transform library like http://fftw.org/. But I definitely think it is possible with the audio add-on.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

I don't think that Allegro is what you're looking for.

What you need is to be able to read the sound hardware buffer as it streams real time, or shortly behind. This means OS specific code. A library like FMOD probably already does what you need sans the visualization code.

Elias
Member #358
May 2000

Look at the ex_mixer_pp example.

--
"Either help out or stop whining" - Evert

dthompson
Member #5,749
April 2005
avatar

I've also found the Juce library, which has this example, which appears to demonstrate the handling of input streams (even via ASIO) and built-in FFT.

(it seems to provide its own graphics library too, though I'd obviously prefer Allegro)

______________________________________________________
Website. It was freakdesign.bafsoft.net.
This isn't a game!

Go to: