diff options
| author | Christoph Berg <myon@debian.org> | 2020-09-28 23:28:13 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2020-09-28 23:28:13 +0200 |
| commit | 7aa3c56b01768ba7d38fccedc17b30a4046b3fbb (patch) | |
| tree | da509a2cf3667b6f9855ea811f4a1f95d9e6f5ef /Audio/AudioDevice.hpp | |
| parent | 28f34ff4908a90b1a7323b2988c33cdb1779fa06 (diff) | |
New upstream version 2.3.0~rc1+repackupstream/2.3.0_rc1+repack
Diffstat (limited to 'Audio/AudioDevice.hpp')
| -rw-r--r-- | Audio/AudioDevice.hpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/Audio/AudioDevice.hpp b/Audio/AudioDevice.hpp index c4354687..2d47af89 100644 --- a/Audio/AudioDevice.hpp +++ b/Audio/AudioDevice.hpp @@ -33,8 +33,8 @@ public: Channel channel () const {return m_channel;} protected: - AudioDevice (QObject * parent = 0) - : QIODevice (parent) + AudioDevice (QObject * parent = nullptr) + : QIODevice {parent} { } @@ -43,23 +43,23 @@ protected: qint16 const * begin (reinterpret_cast<qint16 const *> (source)); for ( qint16 const * i = begin; i != begin + numFrames * (bytesPerFrame () / sizeof (qint16)); i += bytesPerFrame () / sizeof (qint16)) { - switch (m_channel) - { - case Mono: - *dest++ = *i; - break; - - case Right: - *dest++ = *(i + 1); - break; - - case Both: // should be able to happen but if it - // does we'll take left - Q_ASSERT (Both == m_channel); - case Left: - *dest++ = *i; - break; - } + switch (m_channel) + { + case Mono: + *dest++ = *i; + break; + + case Right: + *dest++ = *(i + 1); + break; + + case Both: // should be able to happen but if it + // does we'll take left + Q_ASSERT (Both == m_channel); + case Left: + *dest++ = *i; + break; + } } } @@ -68,23 +68,23 @@ protected: switch (m_channel) { case Mono: - *dest++ = sample; - break; + *dest++ = sample; + break; case Left: - *dest++ = sample; - *dest++ = 0; - break; + *dest++ = sample; + *dest++ = 0; + break; case Right: - *dest++ = 0; - *dest++ = sample; - break; + *dest++ = 0; + *dest++ = sample; + break; case Both: - *dest++ = sample; - *dest++ = sample; - break; + *dest++ = sample; + *dest++ = sample; + break; } return dest; } |
