AudioSampleBuffer Question?


#1

I’m trying to create 24 AudioSampleBuffers but having no luck

[code]AudioSampleBuffer *channels[24];

for(int i=0;i<24;i++){
channels[i] = new AudioSampleBuffer(2,buffer.getNumSamples());
}

//Do some stuff
channels[0]->copyFrom(0,0,buffer,0,0,ns);
channels[0]->copyFrom(1,0,buffer,1,0,ns);

//Delete the AudioSampleBuffer Channels[/code]

This compiles ok, but crashes, any ideas?


#2

If you try to copy an out-of-range section of the data, it should be throwing an assertion to help show you what you’re doing wrong…


#3

Thanx jules got it sorted, the problem was actually somewhere else.


#4