|
Args | addReqArg (argtFileName, "in-file", "The input WAV/Wave64/AIF filename.") |
|
Args | addReqArg (argtFileName, "out-file", "The output WAV filename.") |
|
Args | addReqArg (argtDouble, "out-sample-rate", "The output sample rate " "(e.g. 96000).") |
|
Args | addOptArg (argtDouble, "trans-band", "t", "2.0", "Transition band in percent.") |
|
| VOXCHECK (Args.checkArgs()) |
|
| VOXCHECK (inf.loadFile(*Args.getArgValue("in-file").ValueStr)) |
|
| if (OutSampleRate<=0.0) |
|
| if (d >=(1<< 29)) |
|
outf | inheritFormat (inf) |
|
outf | inheritCuePoints (inf) |
|
outf | inheritInfo (inf) |
|
| VOXCHECK (outf.saveFile(*Args.getArgValue("out-file").ValueStr)) |
|
CInitArray< CFixedBuffer< double > > | InBufs (inf.ChannelCount) |
|
CInitArray< CPtrKeeper< r8b ::CDSPResampler24 *> > | Resamps (inf.ChannelCount) |
|
| if (tb< r8b ::CDSPFIRFilter ::getLPMinTransBand()||tb > r8b ::CDSPFIRFilter ::getLPMaxTransBand()) |
|
| for (i=0;i< inf.ChannelCount;i++) |
|
CArray< double *> | opp (inf.ChannelCount) |
|
| while (ol > 0) |
|
| VOXCHECK (outf.finalize()) |
|
| printf ("Resampled in %.4f s, %.3f Mflops (excluding IO operations)\, srct, 1e-6 *ool/srct) |
|
$ bin "Win64/r8bfreesrc"
Test/benchmarking utility.
This is an example file which you won't be able to compile as it includes some undisclosed program code. Please consider this example as a pseudo-code demonstrating the use of the library. Here you can find an example implementation of the simplest sample rate converter utility.
r8brain-free-src Copyright (c) 2013-2019 Aleksey Vaneev See the "License.txt" file for license.