mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
Expanded variable names.
This commit is contained in:
parent
1ff3b83644
commit
d6e4f217f5
2 changed files with 6 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue