Getting Sound Level

Hi,
I’ve been trying to print the audio level of a sound file while playing in Panda.

I’ve tried using “mySound.getSpeakerMix(index)” on the sound file but no index integer gives any result and all of them return 0.0

Does anyone have an idea if this is possible? :slight_smile:

I don’t believe there is any function that will do what you want, but if you want to get your hands dirty you could add it to the C++ source, for example using Channel::getSpectrum in FMOD or whatever equivalent in OpenAL. I’ll probably be adding this eventually myself, atleast for FMOD, but it might not be until some months later.

Thanks TeeDee, is there any way though that it’s possible to do this with some python library for example win32?

Not that I know of, but it may be possible!
You might try using the pygame library for sound.

Just in case anyone needs this I found the solution:

Use pyaudio:
people.csail.mit.edu/hubert/pyaudio/

And SoundAnalyse:

code.google.com/p/pygalaxy/wiki/SoundAnalyse

Works like a charm :slight_smile: