Downsample audio to 48000 Khz if the input has a bigger sample rate.

This commit is contained in:
Damiano Galassi committed 2016-08-29 16:00:28 +02:00
1 parent bbc16bce68
commit 04c20bbc67
6 files changed
+62 -12

No files matched your search

+8
View File
@@ -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];