Wave player using MODDMA example Hello World program.

Dependencies:   SDFileSystem mbed wave_player_dma

Fork of WavePlayer_HelloWorld by jim hamblen

main.cpp

Committer:
ebradley6
Date:
2016-03-16
Revision:
3:ebbd7fcecb8d
Parent:
1:5b8e223e983d

File content as of revision 3:ebbd7fcecb8d:


#include "mbed.h"
#include "SDFileSystem.h"
#include "wave_player.h"


SDFileSystem sd(p5, p6, p7, p8, "sd"); //SD card

AnalogOut DACout(p18);

wave_player waver(&DACout);

int main()
{
    FILE *wave_file;
    printf("\n\n\nHello, wave world!\n");
    wave_file=fopen("/sd/sample.wav","r");
    waver.play(wave_file);
    fclose(wave_file);
}