diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2021-06-16 23:28:08 +0200 |
---|---|---|
committer | Daniel Schürmann <daschuer@mixxx.org> | 2021-06-16 23:28:08 +0200 |
commit | ed6ab125197428ac8a38092f461f317643d3e8e1 (patch) | |
tree | 5d5b1eb0c14a218980857d9185965077dc7d21d4 /src/sources | |
parent | 513da6dd21621ac10ecd74988d61e55eb517e6ba (diff) | |
parent | 09f6df740694d07b2e7d520621827dc05aeb74ec (diff) |
Merge remote-tracking branch 'upstream/2.3' into main
# Conflicts:
# src/dialog/dlgabout.cpp
Diffstat (limited to 'src/sources')
-rw-r--r-- | src/sources/soundsourcem4a.cpp | 20 | ||||
-rw-r--r-- | src/sources/soundsourcemp3.cpp | 6 |
2 files changed, 14 insertions, 12 deletions
diff --git a/src/sources/soundsourcem4a.cpp b/src/sources/soundsourcem4a.cpp index a1a1c2adbc..ca3b5ec7c5 100644 --- a/src/sources/soundsourcem4a.cpp +++ b/src/sources/soundsourcem4a.cpp @@ -759,19 +759,19 @@ ReadableSampleFrames SoundSourceM4A::readSampleFramesClamped( pDecodeBuffer); // verify the in/out parameter // Verify the decoded sample data for consistency - VERIFY_OR_DEBUG_ASSERT(getSignalInfo().getChannelCount() == - decFrameInfo.channels) { - kLogger.critical() << "Corrupt or unsupported AAC file:" - << "Unexpected number of channels" - << decFrameInfo.channels << "<>" - << getSignalInfo().getChannelCount(); + const auto channelCount = mixxx::audio::ChannelCount(decFrameInfo.channels); + VERIFY_OR_DEBUG_ASSERT(getSignalInfo().getChannelCount() == channelCount) { + kLogger.warning() << "Corrupt or unsupported AAC file:" + << "Unexpected number of channels" + << channelCount << "<>" + << getSignalInfo().getChannelCount(); break; // abort } - VERIFY_OR_DEBUG_ASSERT(getSignalInfo().getSampleRate() == - SINT(decFrameInfo.samplerate)) { - kLogger.critical() + const auto sampleRate = mixxx::audio::SampleRate(decFrameInfo.samplerate); + VERIFY_OR_DEBUG_ASSERT(getSignalInfo().getSampleRate() == sampleRate) { + kLogger.warning() << "Corrupt or unsupported AAC file:" - << "Unexpected sample rate" << decFrameInfo.samplerate + << "Unexpected sample rate" << sampleRate << "<>" << getSignalInfo().getSampleRate(); break; // abort } diff --git a/src/sources/soundsourcemp3.cpp b/src/sources/soundsourcemp3.cpp index 1cee11d94d..844c2d6fd4 100644 --- a/src/sources/soundsourcemp3.cpp +++ b/src/sources/soundsourcemp3.cpp @@ -684,7 +684,8 @@ ReadableSampleFrames SoundSourceMp3::readSampleFramesClamped( DEBUG_ASSERT(isStreamValid(m_madStream)); #ifndef QT_NO_DEBUG_OUTPUT - const SINT madFrameChannelCount = MAD_NCHANNELS(&m_madFrame.header); + const auto madFrameChannelCount = + mixxx::audio::ChannelCount{MAD_NCHANNELS(&m_madFrame.header)}; if (madFrameChannelCount != getSignalInfo().getChannelCount()) { kLogger.warning() << "MP3 frame header with mismatching number of channels" << madFrameChannelCount << "<>" << getSignalInfo().getChannelCount() @@ -696,7 +697,8 @@ ReadableSampleFrames SoundSourceMp3::readSampleFramesClamped( // Once decoded the frame is synthesized to PCM samples mad_synth_frame(&m_madSynth, &m_madFrame); #ifndef QT_NO_DEBUG_OUTPUT - const SINT madSynthSampleRate = m_madSynth.pcm.samplerate; + const auto madSynthSampleRate = + mixxx::audio::SampleRate{m_madSynth.pcm.samplerate}; if (madSynthSampleRate != getSignalInfo().getSampleRate()) { kLogger.warning() << "Reading MP3 data with different sample rate" << madSynthSampleRate << "<>" << getSignalInfo().getSampleRate() |