Re: [Osalp-dev] aflibConverter question
Status: Abandoned
Brought to you by:
daservis
|
From: Darrick S. <da...@dc...> - 2002-03-05 23:59:45
|
I do agree don't use the class directly. It's based on Julius Smith's resample-1.6 program and is very hacked up to allow for streaming data. http://www-ccrma.stanford.edu/~jos/resample/Available_Software.html What is exactly is it you are trying to do. I've spent a lot of time on this class and the library in general over the past couple of weeks so maybe there is a better way to do what you need with using the aflibConvertor class directly. On Tuesday 05 March 2002 09:52 am, Bruce Forsberg wrote: > Akos Maroy wrote: > > - is inCount an output only parameter, or is it in/out? inCount is the size of the inArray. This value will be also be set by the resample function to the number of samples actually used. > > - in inArray, should I supply a 2 channel input with channels If you have more then one channel the data should be consectutive. i.e. all the data for the first channel then all the data for the second. > > interleaved? - will the outArray contain them interleaved? No. > > - for inCount / outCount and the return value: a value of n means: > > - n * channels values in the actual array? > > - n values in the actual array? > > > > For example: > > > > aflibConverter * converter = new aflibConverter( true, true, false); > > > > converter->initialize( 0.5, 2); > > > > short inArray[2048]; > > short outArray[1024]; > > int inCount = 2048; > > int outCount = 1024; > > > > // suppose inArray contains two channel interleaved raw audio data of > > // 1024 samples > > > > int converted = converter->resample( inCount, > > outCount, > > inArray, > > outArray); > > > > after this call I get 2048 for inCount and 1024 for the return value. > > But the data in outArray[0 ... 1024] is no good, if I save it to a file, > > it's not proper .wav data: inCount is the number of shorts processed. return is the number of samples produced. It doesn't produce a wav file. It's just raw data. |