Hi OF,
Another beginner question that I have not been able to figure out (sorry) … I’m trying to get simple playback from the soundstream that has a Soundflower channel routed in. The Soundflower part works, its the playing back from another (output) soundstream that does not. I’ve looked through threads like this:
http://forum.openframeworks.cc/t/managing-buffersrecording-audio/3240/0
but quite honestly am not entirely sure what I need to do.
I do an input soundstream and output soundstream in setup:
int bufferSize = 512;
left.assign(bufferSize, 0.0);
right.assign(bufferSize, 0.0);
leftOut.assign (bufferSize, 0.0);
rightOut.assign (bufferSize, 0.0);
sfDeviceID = 2;
outputDeviceID = 1;
soundStream.listDevices();
inputSoundStream.setDeviceID(sfDeviceID); //this now uses the soundflower input rather than mic input for mac
inputSoundStream.setup(this, 0, 2, 44100, bufferSize, 4);
outputSoundStream.setDeviceID(outputDeviceID); //standard mac output
outputSoundStream.setup(this, 2, 0, 44100, bufferSize, 4);
in audio in:
for (int i = 0; i < bufferSize; i++) {
left[i] = input[i\*2]*0.5;
right[i] = input[i\*2+1]*0.5;
//numCounted+=2;
bufferCounter ++;
}
}
in audio requested:
for (int i = 0; i < bufferSize; i++){
leftOut[i] = output[i\*nChannels ] ;
rightOut[i] = output[i\*nChannels + 1] ;
}
would appreciate any guidance… thank you in advance!