JUCE demo can't execute Recording module


I have just downloaded JUCE and try to run recording module in Demo examples ( JUCE-WINDOWS\examples\Demo\Source\Demos\AudioRecordingDemo ) , but it's fail. In isRecording() method, activeWrite's buffer object has error CXX0030-expression cannot be evaluated. After debugged, I found two problems. The first is sampleRate's value is zero. The second is after I added sampleRate's value is 44100, recording module can run but recording file has only 104 byte and of course it can't be play. What is the reason? Please help me.


That's weird - I just checked the Recording Demo on Windows 8.1 and it works just fine, I could not reproduce any of the problems you are reporting. The audio files written to disk are fine, too.

Maybe it's something with your audio interface? Did you try it with another audio input device?

Hi Timur,

Thank you so much. I'm totally new with sound processing and of course the same with JUCE. So that a lot of weird problem occur for me when I learn how to use JUCE. About abow problem, after I unplug microphone and run recording module I can see recording process and recording file is ok, of course I can hear any thing from it. But when I plug again, error occur again. Problem is method "audioDeviceAboutToStart" can't be executed but It can be executed when I unplug microphone. I really dont know why, please help me!

ps: sorry because of my poor english.


I have known what the reason is and I fixed it. When I debuged, I found a error message is "The input and output devices don't share a common sample rate". This error occur because sample rate of input device(44.1khz) is different to output device sample rate(48khz). Recording module run normally after I make the same sample rate. Thanks Timur so much. Sorry because asking of a question before debug more detail.