Streams USB audio with sound effects applied. Sound effect selected by joystick and intensity altered by tilting the mbed. Output to the mbed-application-board phono jack.

Dependencies:   C12832_lcd MMA7660 USBDevice mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers delay.h Source File

delay.h

00001 /*******************************************************************************
00002  * Implements delay lines for audio samples.
00003  * Bryan Wade
00004  * 27 MAR 2014
00005  ******************************************************************************/
00006 #ifndef DELAY_H
00007 #define DELAY_H
00008 
00009 #include <stdint.h>
00010 #include <stdlib.h>
00011 
00012 typedef struct delay_t delay_t; // Opaque type declaration.
00013 
00014 // Get a ptr to a new delay struct
00015 delay_t *Delay_Create(void);
00016 
00017 // Configure the delay length and ram location
00018 bool Delay_Configure(delay_t *delay, void *ram, size_t size);
00019 
00020 // Write one sample with feedback to the delay and get one sample out.
00021 int16_t Delay_WriteWithFeedback(delay_t *delay, int16_t dataIn, uint16_t gain);
00022 
00023 #endif