Skip to content

Commit

Permalink
Fix overflow warning
Browse files Browse the repository at this point in the history
  • Loading branch information
tfry-git committed Feb 11, 2024
1 parent 6fd5290 commit 0f31419
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AudioOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

template<typename T> constexpr AudioOutputStorage_t SCALE_AUDIO(T x, byte bits) { return (bits > MOZZI_AUDIO_BITS ? (x) >> (bits - MOZZI_AUDIO_BITS) : (x) << (MOZZI_AUDIO_BITS - bits)); }
template<typename T> constexpr AudioOutputStorage_t SCALE_AUDIO_NEAR(T x, byte bits) { return (bits > MOZZI_AUDIO_BITS_OPTIMISTIC ? (x) >> (bits - MOZZI_AUDIO_BITS_OPTIMISTIC) : (x) << (MOZZI_AUDIO_BITS_OPTIMISTIC - bits)); }
template<typename T> constexpr AudioOutputStorage_t CLIP_AUDIO(T x) { return (constrain((x), (-(AudioOutputStorage_t) MOZZI_AUDIO_BIAS), (AudioOutputStorage_t) MOZZI_AUDIO_BIAS-1)); }
template<typename T> constexpr AudioOutputStorage_t CLIP_AUDIO(T x) { return (constrain((x), (-(AudioOutputStorage_t) MOZZI_AUDIO_BIAS), (AudioOutputStorage_t) (MOZZI_AUDIO_BIAS-1))); }

struct MonoOutput;
struct StereoOutput;
Expand Down

0 comments on commit 0f31419

Please sign in to comment.