Skip to content

Commit

Permalink
AudioOutputPWM: added amplification (#605)
Browse files Browse the repository at this point in the history
Co-authored-by: RASMUSSEN Joern <joern.rasmussen-ext@hexagon.com>
  • Loading branch information
jmr-es and RASMUSSEN Joern authored Oct 8, 2024
1 parent 50bc3f7 commit 96dc79c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/AudioOutputPWM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ bool AudioOutputPWM::ConsumeSample(int16_t sample[2]) {
ms[LEFTCHANNEL] = ms[RIGHTCHANNEL] = (ttl>>1) & 0xffff;
}

ms[LEFTCHANNEL] = Amplify(ms[LEFTCHANNEL]);
ms[RIGHTCHANNEL] = Amplify(ms[RIGHTCHANNEL]);

if (pwm.available()) {
pwm.write((int16_t) ms[0]);
pwm.write((int16_t) ms[1]);
Expand Down

0 comments on commit 96dc79c

Please sign in to comment.