Changed Audio Class driver sample read/write functions to be inline, to reduce the number of cycles needed to transfer samples to and from the device (allowing more time for processing and output).
Fixed ClassDriver AudioOutput demo not selecting an audio output mode.
This commit is contained in:
1 parent
3ebfb998ec
commit
433399b05d
10 files changed
+110
-105
No files matched your search
@@ -123,17 +123,15 @@ void ProcessNextSample(void)
|
||||
|
||||
uint8_t LEDMask = LEDS_NO_LEDS;
|
||||
|
||||
if (MixedSample_8Bit_Abs > 2)
|
||||
LEDMask |= LEDS_LED1;
|
||||
|
||||
if (MixedSample_8Bit_Abs > 4)
|
||||
LEDMask |= LEDS_LED2;
|
||||
|
||||
if (MixedSample_8Bit_Abs > 8)
|
||||
LEDMask |= LEDS_LED3;
|
||||
|
||||
/* Turn on LEDs as the sample amplitude increases */
|
||||
if (MixedSample_8Bit_Abs > 16)
|
||||
LEDMask |= LEDS_LED4;
|
||||
LEDMask = (LEDS_LED1 | LEDS_LED2 | LEDS_LED3 | LEDS_LED4);
|
||||
else if (MixedSample_8Bit_Abs > 8)
|
||||
LEDMask = (LEDS_LED1 | LEDS_LED2 | LEDS_LED3);
|
||||
else if (MixedSample_8Bit_Abs > 4)
|
||||
LEDMask = (LEDS_LED1 | LEDS_LED2);
|
||||
else if (MixedSample_8Bit_Abs > 2)
|
||||
LEDMask = (LEDS_LED1);
|
||||
|
||||
LEDs_SetAllLEDs(LEDMask);
|
||||
}
|
||||
|
||||
@@ -184,6 +184,7 @@ CSTANDARD = -std=gnu99
|
||||
|
||||
# Place -D or -U options here for C sources
|
||||
CDEFS = -DF_CPU=$(F_CPU)UL -DF_CLOCK=$(F_CLOCK)UL -DBOARD=BOARD_$(BOARD) $(LUFA_OPTS)
|
||||
CDEFS += -DAUDIO_OUT_STEREO
|
||||
|
||||
|
||||
# Place -D or -U options here for ASM sources
|
||||
|
||||
Reference in new issue
Block a user