Using AudioRecorder demo with MixerAudioSource

Hello all!

I’m using the audio recorder demo as the base for my project. This contains an AudioSourcePlayer and I set as the source a MixerAudioSource. The MixerAudioSource is working ok, I can mix 2 audio files and the audio recorder creates the file and increases its size during the recording still, when I want to play the recorded wav file it gets no sound output.

Any idea? I’m thinking that the source is not getting set properly or something like that

You cannot play the file while it is being recorded. The reason is, that the audio size in the wav header is only written, once the writer is flushed or destroyed.
The AudioFormatReaderSource sees the file as zero sized.

The writer is flushed after that i got a wav file size 3MB and no sounds because it is full of 0 data

void AudioRecorder::audioDeviceIOCallback (const float** inputChannelData, int numInputChannels,
                            float** outputChannelData, int numOutputChannels,
                            int numSamples)```



The inputChannelData is always getting me a float value 0

5249 4646 609a 1a00 5741 5645 4a55 4e4b
3400 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000

So I’m creating a file with no data to play