Hi,
I’m trying to build a simple project which takes an audio input stream, process it and then
play the proccessed sound. In my top-level component class I’ve added the code below and when
running i get an unhandled exception; the call stack window of visual express 2005 prompts the
following error:
[quote]juce_application.exe!_VEC_memzero(void * dst=0xcdcdcdcd, int val=0, int len=926365492) + 0x6a bytes C
juce_application.exe!VstAnalyzer::audioDeviceAboutToStart(double sampleRate=44100.000000000000, int numSamplesPerBlock=960) Line 144 + 0x18 bytes C++[/quote]
Can anyone please tell me what I’ve done wrong?
[code]public:
audioDeviceManager = new AudioDeviceManager();
audioDeviceManager->initialise(1,2,0,true);
audioDeviceManager->setAudioCallback(this);
void audioDeviceIOCallback (const float** inputChannelData,
int totalNumInputChannels,
float** outputChannelData,
int totalNumOutputChannels,
int numSamples)
{
/for (int i = 0; i < totalNumInputChannels; ++i)
{
if (inputChannelData [i] != 0)
{
for (int j = 0; j < numSamples; ++j)
outputChannelData[i][j] = inputChannelData [i][j];
break;
}
}/
}
void audioDeviceAboutToStart (double sampleRate, int numSamplesPerBlock){
zeromem (circularBuffer, sizeof (float) * bufferSize); }
void audioDeviceStopped() {
zeromem (circularBuffer, sizeof (float) * bufferSize); }
private:
float* circularBuffer;
float currentInputLevel;
int volatile bufferPos, bufferSize, numSamplesIn;[/code]