Jules, could you add theese two callbacks to the AudioDeviceManger so that someone could implement a master-VU Meter, to detect the sum of all Audio-Data.
Yes i could use a FilterGraph but this will generate a overhead, and also it won’t get the current number of audiochannels (or the filtergraph has to be reconfigured everytime when the number of channels changing, which is inefficient.)
something like
virtual void AudioDeviceManager::VUCallbackInput(int numInputChannels, int numSamples, float** audioChannelData) {};
virtual void AudioDeviceManager::VUCallbackOutput(int numOutputChannels, int numSamples, float** audioChannelData); {};
and then simple add these Callbacks to void AudioDeviceManager::audioDeviceIOCallbackInt
i think this would be very easy to implement, and a big help for me…
hmm… I understand the problem, but don’t like that as a solution. Subclassing the AudioDeviceManager is not something I want to encourage, so there’d need to be a more elaborate solution, and it seems like a lot of mess to me, when there are other ways to do the same thing…
AudioDeviceManager::addVUAudioThreadListener(VUAudioThreadListener*) // i use AudioThreadListener instead of Listener to clarify it won’t run at the message-thread
and then
[code]
class VUAudioThreadListener*
{
public :
virtual void VUAudioThreadListener::VUCallbackInput(int numInputChannels, int numSamples, float** audioChannelData) {};
virtual void VUAudioThreadListener::VUCallbackOutput(int numOutputChannels, int numSamples, float** audioChannelData); {};
(and of course calling it a ‘VU’ callback would be a rather strange name, when it’s really just an ‘overall’ callback, and not something whose only purpose would be to drive one specific type of level meter!)