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 effects.h Source File

effects.h

00001 /*******************************************************************************
00002  * Module processes 16-bit audio samples to produces delay-based sound effects.
00003  * Bryan Wade
00004  * 27 MAR 2014
00005  ******************************************************************************/
00006 #ifndef EFFECTS_H
00007 #define EFFECTS_H
00008 
00009 #include <stdint.h>
00010 
00011 // Practical gain limit for decent sound.
00012 #define MAX_EFFECT_GAIN (58982) 
00013 
00014 // Available sound effect modes
00015 typedef enum effect_mode_t {
00016     EFFECT_STRAIGHT,
00017     EFFECT_ECHO,
00018     EFFECT_REVERB
00019 } effect_mode_t;
00020 
00021 
00022 // Initialize module.
00023 void Effects_Initialize(void);
00024 
00025 // Process one audio sample.
00026 int16_t Effects_ProcessSample(int16_t dataIn);
00027 
00028 void Effects_SetMode(effect_mode_t mode);
00029 
00030 void Effects_SetGain(uint16_t gain);
00031 
00032 #endif