// static AudioConverter* AudioConverter::Create(AudioEncoding source, AudioEncoding target) { uint32_t sourceSampleSize = getAudioSampleSize(source); uint32_t targetSampleSize = getAudioSampleSize(target); if (sourceSampleSize && targetSampleSize && sourceSampleSize != targetSampleSize) { return new AudioConverter(source, sourceSampleSize, target, targetSampleSize); } return NULL; }
int AudioFormat::dump(DumpContext& dc) { // throws IOException dc.indent(); dc.getPs().print("AudioFormat\n"); dc.increaseIndent(); int retVal= 0; // write bf1 { dc.indent(); dc.getPs().print("audioSampleSize: "); dc.getPs().printlnBin(getAudioSampleSize(),2); dc.indent(); dc.getPs().print("audioFormat: "); dc.getPs().printlnBin(getAudioFormat(),3); dc.indent(); dc.getPs().print("audioSamplefreq: "); dc.getPs().printlnBin(getAudioSamplefreq(),3); } dc.decreaseIndent(); return retVal; }