SRC_STATE*pSRCStace=src_new(iConverter,1,&iSRCError);// single channel conversion, samplerate expets interleaved. this is not compatible with ITASampleBuffer/Frame
if(pSRCStace==nullptr)
if(pSRCStace==nullptr)
ITA_EXCEPT_INVALID_PARAMETER("Could not create sample rate converter, samplerate error was: "+std::string(src_strerror(iSRCError)));
ITA_EXCEPT_INVALID_PARAMETER("Could not create sample rate converter, samplerate error was: "+std::string(src_strerror(iSRCError)));
SRC_DATAoSRCData;
SRC_DATAoSRCData;
oSRCData.data_in=sfSource[i].GetData();
oSRCData.data_in=sfSource[i].GetData();
oSRCData.data_out=(*this)[i].GetData();
oSRCData.data_out=(*this)[i].GetData();
oSRCData.input_frames=1;
oSRCData.input_frames=sfSource.GetLength();// In samplerate, one frame is "one sample" of multi channel audio