summaryrefslogtreecommitdiffstats
path: root/src/sources/soundsourceproxy.cpp
diff options
context:
space:
mode:
authorUwe Klotz <uklotz@mixxx.org>2020-05-01 10:00:40 +0200
committerUwe Klotz <uklotz@mixxx.org>2020-05-01 10:00:40 +0200
commit0dd8887576ce97e51402b805434276ccd559d997 (patch)
treee95679d7a30620cbca89816fed9b97ff01f7cee9 /src/sources/soundsourceproxy.cpp
parent804e01f4359619d0a9a3d8238eec7b886c56a4a1 (diff)
Improve readability and documentation
Diffstat (limited to 'src/sources/soundsourceproxy.cpp')
-rw-r--r--src/sources/soundsourceproxy.cpp23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/sources/soundsourceproxy.cpp b/src/sources/soundsourceproxy.cpp
index cc2b21d9d3..99bb7c01a5 100644
--- a/src/sources/soundsourceproxy.cpp
+++ b/src/sources/soundsourceproxy.cpp
@@ -512,13 +512,22 @@ mixxx::AudioSourcePointer SoundSourceProxy::openAudioSource(const mixxx::AudioSo
<< getUrl().toString()
<< "with provider"
<< getSoundSourceProvider()->getName();
- if (openMode == mixxx::SoundSource::OpenMode::Permissive &&
- openResult == mixxx::SoundSource::OpenResult::Failed) {
- // Do NOT retry with the next SoundSource provider if the file
- // itself seems to be the cause when opening fails during the
- // 2nd (= permissive) round.
- DEBUG_ASSERT(!m_pAudioSource);
- return m_pAudioSource;
+ if (openMode == mixxx::SoundSource::OpenMode::Permissive) {
+ if (openResult == mixxx::SoundSource::OpenResult::Failed) {
+ // Do NOT retry with the next SoundSource provider if the file
+ // itself seems to be the cause when opening still fails during
+ // the 2nd (= permissive) round.
+ DEBUG_ASSERT(!m_pAudioSource);
+ return m_pAudioSource;
+ } else {
+ // Continue and give other providers the chance to open the file
+ // in turn.
+ DEBUG_ASSERT(openResult == mixxx::SoundSource::OpenResult::Aborted);
+ }
+ } else {
+ // Continue and give other providers the chance to open the file
+ // in turn, independent of why opening the file failed.
+ DEBUG_ASSERT(openMode == mixxx::SoundSource::OpenMode::Strict);
}
}
kLogger.warning() << "Unable to open file"