diff --git a/mythtv/libs/libmyth/audiooutputbase.cpp b/mythtv/libs/libmyth/audiooutputbase.cpp
index 6db02f2..e77f0b0 100644
a
|
b
|
void AudioOutputBase::Reconfigure(const AudioSettings &orig_settings)
|
305 | 305 | resample = false; |
306 | 306 | } |
307 | 307 | |
| 308 | // Force resampling if we are encoding to AC3 and sr > 48k |
| 309 | if (audio_enc && audio_samplerate > 48000) |
| 310 | { |
| 311 | VERBOSE(VB_AUDIO, LOC + "Forcing resample to 48k for AC3 encode"); |
| 312 | if (src_quality < 0) |
| 313 | src_quality = 1; |
| 314 | resample = true; |
| 315 | } |
| 316 | |
308 | 317 | if (resample && src_quality >= 0) |
309 | 318 | { |
310 | 319 | int error; |
311 | 320 | audio_samplerate = rates.back(); |
| 321 | // Limit sr to 48k if we are encoding to AC3 |
| 322 | if (audio_enc && audio_samplerate > 48000) { |
| 323 | VERBOSE(VB_AUDIO, LOC + "Limiting samplerate to 48k for AC3 encode"); |
| 324 | audio_samplerate = 48000; |
| 325 | } |
312 | 326 | VERBOSE(VB_GENERAL, LOC + QString("Using resampler. From: %1 to %2") |
313 | 327 | .arg(settings.samplerate).arg(audio_samplerate)); |
314 | 328 | src_ctx = src_new(2-src_quality, source_audio_channels, &error); |
… |
… |
void AudioOutputBase::Reconfigure(const AudioSettings &orig_settings)
|
332 | 346 | encoder = new AudioOutputDigitalEncoder(); |
333 | 347 | if (!encoder->Init(CODEC_ID_AC3, 448000, audio_samplerate, audio_channels)) |
334 | 348 | { |
335 | | VERBOSE(VB_AUDIO, LOC + "Can't create AC-3 encoder"); |
| 349 | VERBOSE(VB_IMPORTANT, LOC + "Can't create AC-3 encoder"); |
336 | 350 | delete encoder; |
337 | 351 | encoder = NULL; |
| 352 | audio_enc = false; |
338 | 353 | } |
339 | 354 | } |
340 | 355 | |