diff options
| author | Christoph Berg <myon@debian.org> | 2021-01-05 22:10:30 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2021-01-05 22:10:30 +0100 |
| commit | 8e43a898258cdf4a3eaec64f06069017b2d24a4d (patch) | |
| tree | 82cfd1cbc20f8a219522a8036e8a3622eec44440 /Audio | |
| parent | a42d3323808f2f57138c4a636db7f9f78c30c59f (diff) | |
| parent | 061dc1a349738747489ef0c0ebeeb4443e369501 (diff) | |
Update upstream source from tag 'upstream/2.3.0_rc3+repack'
Update to upstream version '2.3.0~rc3+repack'
with Debian dir 5129b722b4b0bb33d8e8b0c41dd5606650a3ee38
Diffstat (limited to 'Audio')
| -rw-r--r-- | Audio/soundin.cpp | 11 | ||||
| -rw-r--r-- | Audio/soundout.cpp | 7 |
2 files changed, 8 insertions, 10 deletions
diff --git a/Audio/soundin.cpp b/Audio/soundin.cpp index 581f1a92..53a29799 100644 --- a/Audio/soundin.cpp +++ b/Audio/soundin.cpp @@ -88,17 +88,16 @@ void SoundInput::start(QAudioDeviceInfo const& device, int framesPerBuffer, Audi //qDebug () << "SoundIn default buffer size (bytes):" << m_stream->bufferSize () << "period size:" << m_stream->periodSize (); // the Windows MME version of QAudioInput uses 1/5 of the buffer // size for period size other platforms seem to optimize themselves -#if defined (Q_OS_WIN) - m_stream->setBufferSize (m_stream->format ().bytesForFrames (framesPerBuffer * 5)); -#else - Q_UNUSED (framesPerBuffer); -#endif + if (framesPerBuffer > 0) + { + m_stream->setBufferSize (m_stream->format ().bytesForFrames (framesPerBuffer)); + } if (m_sink->initialize (QIODevice::WriteOnly, channel)) { m_stream->start (sink); checkStream (); cummulative_lost_usec_ = -1; - //qDebug () << "SoundIn selected buffer size (bytes):" << m_stream->bufferSize () << "peirod size:" << m_stream->periodSize (); + LOG_DEBUG ("Selected buffer size (bytes): " << m_stream->bufferSize () << " period size: " << m_stream->periodSize ()); } else { diff --git a/Audio/soundout.cpp b/Audio/soundout.cpp index fe7c58fb..f3ec3dce 100644 --- a/Audio/soundout.cpp +++ b/Audio/soundout.cpp @@ -7,6 +7,7 @@ #include <qmath.h> #include <QDebug> +#include "Logger.hpp" #include "Audio/AudioDevice.hpp" #include "moc_soundout.cpp" @@ -104,15 +105,13 @@ void SoundOutput::restart (QIODevice * source) // Windows implementation seems to forget the buffer size after a // stop. //qDebug () << "SoundOut default buffer size (bytes):" << m_stream->bufferSize () << "period size:" << m_stream->periodSize (); - if (m_framesBuffered) + if (m_framesBuffered > 0) { -#if defined (Q_OS_WIN) m_stream->setBufferSize (m_stream->format().bytesForFrames (m_framesBuffered)); -#endif } m_stream->setCategory ("production"); m_stream->start (source); - // qDebug () << "SoundOut selected buffer size (bytes):" << m_stream->bufferSize () << "period size:" << m_stream->periodSize (); + LOG_DEBUG ("Selected buffer size (bytes): " << m_stream->bufferSize () << " period size: " << m_stream->periodSize ()); } void SoundOutput::suspend () |
