Skip to content

Commit

Permalink
OboeTester: divide oscillator amplitude by channel count
Browse files Browse the repository at this point in the history
  • Loading branch information
robertwu1 committed Feb 27, 2025
1 parent 8fb3073 commit 56ea672
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/OboeTester/app/src/main/cpp/NativeAudioContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,10 +430,10 @@ void ActivityTestOutput::configureAfterOpen() {
// Go up by a minor third or a perfect fourth just intoned interval.
const float interval = (mChannelCount > 8) ? (6.0f / 5.0f) : (4.0f / 3.0f);
for (int i = 0; i < mChannelCount; i++) {
sineOscillators[i].setSampleRate(outputStream->getSampleRate());
sineOscillators[i].setSampleRate(outputStream->getSampleRate() / mChannelCount);
sineOscillators[i].frequency.setValue(frequency);
sineOscillators[i].amplitude.setValue(AMPLITUDE_SINE);
sawtoothOscillators[i].setSampleRate(outputStream->getSampleRate());
sawtoothOscillators[i].setSampleRate(outputStream->getSampleRate() / mChannelCount);
sawtoothOscillators[i].frequency.setValue(frequency);
sawtoothOscillators[i].amplitude.setValue(AMPLITUDE_SAWTOOTH);

Expand Down

0 comments on commit 56ea672

Please sign in to comment.