Downsample audio to 48000 Khz if the input has a bigger sample rate.
This commit is contained in:
1 parent
bbc16bce68
commit
04c20bbc67
6 files changed
+62
-12
No files matched your search
@@ -97,6 +97,14 @@
|
||||
return _encoder.magicCookie;
|
||||
}
|
||||
|
||||
- (double)sampleRate {
|
||||
double sampleRate = self.decoder.outputFormat.mSampleRate;
|
||||
if (sampleRate > 48000) {
|
||||
return 48000;
|
||||
}
|
||||
return sampleRate;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[_decoder release];
|
||||
[_encoder release];
|
||||
|
||||
Reference in new issue
Block a user