From 2448229b46299c0f2d2d9f37801c729bc9fdc8ae Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Wed, 27 Aug 2014 16:03:53 -0700 Subject: [PATCH] fix for crash in Audio --- interface/src/Audio.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/interface/src/Audio.cpp b/interface/src/Audio.cpp index 4fdf048756..8a788df831 100644 --- a/interface/src/Audio.cpp +++ b/interface/src/Audio.cpp @@ -1313,7 +1313,10 @@ void Audio::freeScope() { int Audio::addBufferToScope(QByteArray* byteArray, int frameOffset, const int16_t* source, int sourceSamplesPerChannel, unsigned int sourceChannel, unsigned int sourceNumberOfChannels, float fade) { - + if (!_scopeEnabled || _scopeEnabledPause) { + return 0; + } + // Constant multiplier to map sample value to vertical size of scope float multiplier = (float)MULTIPLIER_SCOPE_HEIGHT / logf(2.0f);