From d6e4f217f5adeb7ee26e6e3a05cba405e1a31d43 Mon Sep 17 00:00:00 2001 From: matsukaze Date: Tue, 22 Apr 2014 21:57:41 -0400 Subject: [PATCH] Expanded variable names. --- interface/src/Audio.cpp | 8 ++++---- interface/src/Audio.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/interface/src/Audio.cpp b/interface/src/Audio.cpp index 29aaa3b34b..eb4a751356 100644 --- a/interface/src/Audio.cpp +++ b/interface/src/Audio.cpp @@ -1075,7 +1075,7 @@ void Audio::toggleScope() { } void Audio::addBufferToScope( - QByteArray& byteArray, unsigned int frameOffset, const int16_t* src, unsigned int srcChannel, unsigned int srcNumChannels) { + QByteArray& byteArray, unsigned int frameOffset, const int16_t* source, unsigned int sourceChannel, unsigned int sourceNumberOfChannels) { // Constant multiplier to map sample value to vertical size of scope float multiplier = (float)MULTIPLIER_SCOPE_HEIGHT / logf(2.0f); @@ -1087,11 +1087,11 @@ void Audio::addBufferToScope( int16_t value; // Short int pointer to mapped samples in byte array - int16_t* tgt = (int16_t*) byteArray.data(); + int16_t* destination = (int16_t*) byteArray.data(); for (int i = 0; i < NETWORK_SAMPLES_PER_FRAME; i++) { - sample = (float)src[i * srcNumChannels + srcChannel]; + sample = (float)source[i * sourceNumberOfChannels + sourceChannel]; if (sample > 0) { value = (int16_t)(multiplier * logf(sample)); @@ -1101,7 +1101,7 @@ void Audio::addBufferToScope( value = 0; } - tgt[i + frameOffset] = value; + destination[i + frameOffset] = value; } } diff --git a/interface/src/Audio.h b/interface/src/Audio.h index c42b442a81..ebd7f8612a 100644 --- a/interface/src/Audio.h +++ b/interface/src/Audio.h @@ -201,7 +201,8 @@ private: float calculateDeviceToNetworkInputRatio(int numBytes); // Audio scope methods for data acquisition - void addBufferToScope(QByteArray& byteArray, unsigned int frameOffset, const int16_t* src, unsigned int srcChannel, unsigned int srcNumChannels); + void addBufferToScope( + QByteArray& byteArray, unsigned int frameOffset, const int16_t* source, unsigned int sourceChannel, unsigned int sourceNumberOfChannels); // Audio scope methods for rendering void renderBackground(const float* color, int x, int y, int width, int height);