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:
Dean Camera 2009-10-03 07:59:32 +00:00
parent 3ebfb998ec
commit 433399b05d
10 changed files with 110 additions and 105 deletions

View file

@ -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);
}