So I am working on some audio processing software and I'm kinda confused on some of the ASIO audio processing. From what I'm reading, It seems like when the buffer switch callback is made, I need to process the "input" into the "output". But what if I have a different number of input and output channels? And I'm guessing I need to do the format conversions if my input and output format do not match right?
Asked
Active
Viewed 644 times
2
-
What kind of plug-in are you developing? I'm guessing an effect plug-in if you've got inputs and outputs? – marko Mar 29 '15 at 21:56
-
Yes essentially. I'm just confused on how it wants to me to process the data. I know when it needs to be done but I don't know which buffers I need to process and which ones to write it back to. – Caleb Merchant Mar 29 '15 at 23:43
1 Answers
0
What you have to do is access to asioDriverInfo.inputsChannels and asioDriverInfo.inputBuffers. I used this code snippet to figure out my device input/ output enumeration. I Hope it helps.
string cad;
if (ASIOStart() == ASE_OK)
{
for (int i = 0; i < asioDriverInfo.inputChannels + asioDriverInfo.outputChannels; i++)
{
cad = asioDriverInfo.channelInfos[i].isInput? "input" : "output ";
cout<<"Chanel "<<i<<" : "<<asioDriverInfo.channelInfos[i].name<<" "<<cad<<endl;
}
for (int i = 0; i < asioDriverInfo.inputBuffers + asioDriverInfo.outputBuffers; i++)
{
cad = asioDriverInfo.bufferInfos[i].isInput? "input" : "output ";
cout<<"Buffer "<<i<<asioDriverInfo.bufferInfos[i].buffers<<" : " << cad <<" chanel "<<asioDriverInfo.bufferInfos[i].channelNum<<endl;
}
...and rest of stuff