music mixer code

Dependencies:   mbed wave_player mbed-rtos SimpleRGB 4DGL-uLCD-SE PinDetect

Committer:
vamsatoor
Date:
Mon Dec 09 16:43:04 2019 +0000
Revision:
10:5f5e199e1b9c
commit 1;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vamsatoor 10:5f5e199e1b9c 1 #include "mbed.h"
vamsatoor 10:5f5e199e1b9c 2 #include "rtos.h"
vamsatoor 10:5f5e199e1b9c 3 #include "SDFileSystem.h"
vamsatoor 10:5f5e199e1b9c 4 #include "wave_player.h"
vamsatoor 10:5f5e199e1b9c 5 #include <string>
vamsatoor 10:5f5e199e1b9c 6
vamsatoor 10:5f5e199e1b9c 7 using namespace std;
vamsatoor 10:5f5e199e1b9c 8
vamsatoor 10:5f5e199e1b9c 9
vamsatoor 10:5f5e199e1b9c 10 //debugging
vamsatoor 10:5f5e199e1b9c 11
vamsatoor 10:5f5e199e1b9c 12 //string current;
vamsatoor 10:5f5e199e1b9c 13
vamsatoor 10:5f5e199e1b9c 14 void sound(string wavefilename) {
vamsatoor 10:5f5e199e1b9c 15 FILE *wave_file;
vamsatoor 10:5f5e199e1b9c 16 // wave_file=fopen("/sd/sunflower_clip.wav","r");
vamsatoor 10:5f5e199e1b9c 17 // current = "/sd/" +
vamsatoor 10:5f5e199e1b9c 18 wave_file=fopen(wavefilename,"r");
vamsatoor 10:5f5e199e1b9c 19 waver.play(wave_file);
vamsatoor 10:5f5e199e1b9c 20 fclose(wave_file);
vamsatoor 10:5f5e199e1b9c 21 }