Skip to content

Commit

Permalink
fixup! convert ScopedTimer constructions to use QStringLiteral to imp…
Browse files Browse the repository at this point in the history
…rove performance
  • Loading branch information
Swiftb0y committed May 17, 2024
1 parent e25bc2c commit 1bf5bce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/soundio/sounddevicenetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ void SoundDeviceNetwork::callbackProcessClkRef() {
m_pSoundManager->readProcess(framesPerBuffer);

{
ScopedTimer t("SoundDevicePortAudio::callbackProcess prepare %1",
ScopedTimer t(QStringLiteral("SoundDevicePortAudio::callbackProcess prepare %1"),
m_deviceId.name);
m_pSoundManager->onDeviceOutputCallback(framesPerBuffer);
}
Expand Down
6 changes: 3 additions & 3 deletions src/soundio/sounddeviceportaudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ int SoundDevicePortAudio::callbackProcessClkRef(

// Send audio from the soundcard's input off to the SoundManager...
if (in) {
ScopedTimer t("SoundDevicePortAudio::callbackProcess input %1",
ScopedTimer t(QStringLiteral("SoundDevicePortAudio::callbackProcess input %1"),
m_deviceId.debugName());
composeInputBuffer(in, framesPerBuffer, 0, m_inputParams.channelCount);
m_pSoundManager->pushInputBuffers(m_audioInputs, framesPerBuffer);
Expand All @@ -985,13 +985,13 @@ int SoundDevicePortAudio::callbackProcessClkRef(
m_pSoundManager->readProcess(framesPerBuffer);

{
ScopedTimer t("SoundDevicePortAudio::callbackProcess prepare %1",
ScopedTimer t(QStringLiteral("SoundDevicePortAudio::callbackProcess prepare %1"),
m_deviceId.debugName());
m_pSoundManager->onDeviceOutputCallback(framesPerBuffer);
}

if (out) {
ScopedTimer t("SoundDevicePortAudio::callbackProcess output %1",
ScopedTimer t(QStringLiteral("SoundDevicePortAudio::callbackProcess output %1"),
m_deviceId.debugName());

if (m_outputParams.channelCount <= 0) {
Expand Down
4 changes: 2 additions & 2 deletions src/waveform/waveformwidgetfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ void WaveformWidgetFactory::notifyZoomChange(WWaveformViewer* viewer) {
}

void WaveformWidgetFactory::renderSelf() {
ScopedTimer t("WaveformWidgetFactory::render() %1 waveforms",
ScopedTimer t(QStringLiteral("WaveformWidgetFactory::render() %1 waveforms"),
m_waveformWidgetHolders.size());

if (!m_skipRender) {
Expand Down Expand Up @@ -762,7 +762,7 @@ void WaveformWidgetFactory::render() {
}

void WaveformWidgetFactory::swapSelf() {
ScopedTimer t("WaveformWidgetFactory::swap() %1waveforms",
ScopedTimer t(QStringLiteral("WaveformWidgetFactory::swap() %1waveforms"),
static_cast<int>(m_waveformWidgetHolders.size()));

// Do this in an extra slot to be sure to hit the desired interval
Expand Down

0 comments on commit 1bf5bce

Please sign in to comment.