X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/e426463355b8516a442c01e0e6b4a574c39fc0f4..3472af91a5c167cf243335fa32b5284a4a796e39:/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c diff --git a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c index bbcd2fd7c..9a63af68a 100644 --- a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c +++ b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c @@ -103,8 +103,10 @@ void ProcessNextSample(void) int8_t LeftSample_8Bit = (LeftSample_16Bit >> 8); int8_t RightSample_8Bit = (RightSample_16Bit >> 8); +#if !defined(AUDIO_OUT_STEREO) /* Mix the two channels together to produce a mono, 8-bit sample */ int8_t MixedSample_8Bit = (((int16_t)LeftSample_8Bit + (int16_t)RightSample_8Bit) >> 1); +#endif #if defined(AUDIO_OUT_MONO) /* Load the sample into the PWM timer channel */