Reproductor de archivos wav
Dependencies: SDFileSystem mbed-src mbed
Fork of SDFileSystem_HelloWorld by
main.cpp@1:6f7dafed256b, 2015-06-12 (annotated)
- Committer:
- EduardoVitela
- Date:
- Fri Jun 12 04:49:18 2015 +0000
- Revision:
- 1:6f7dafed256b
- Parent:
- 0:bdbd3d6fc5d5
publicando
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 0:bdbd3d6fc5d5 | 1 | #include "mbed.h" |
EduardoVitela | 1:6f7dafed256b | 2 | #include "wavplayer.h" |
mbed_official | 0:bdbd3d6fc5d5 | 3 | #include "SDFileSystem.h" |
EduardoVitela | 1:6f7dafed256b | 4 | |
EduardoVitela | 1:6f7dafed256b | 5 | SDFileSystem sd(PTD6, PTD7, PTD5, PTC8, "sd"); // MOSI, MISO, SCK, CS |
EduardoVitela | 1:6f7dafed256b | 6 | |
EduardoVitela | 1:6f7dafed256b | 7 | int main() |
EduardoVitela | 1:6f7dafed256b | 8 | { |
EduardoVitela | 1:6f7dafed256b | 9 | WavPlayer myWavPlayer; |
EduardoVitela | 1:6f7dafed256b | 10 | myWavPlayer.play_wave("/sd/micro/guns.wav"); // 8 bit sample size |
EduardoVitela | 1:6f7dafed256b | 11 | myWavPlayer.play_wave("/sd/micro/cain.wav"); |
EduardoVitela | 1:6f7dafed256b | 12 | myWavPlayer.play_wave("/sd/micro/link.wav"); |
EduardoVitela | 1:6f7dafed256b | 13 | myWavPlayer.play_wave("/sd/micro/rock.wav"); |
EduardoVitela | 1:6f7dafed256b | 14 | myWavPlayer.play_wave("/sd/micro/dune.wav"); |
mbed_official | 0:bdbd3d6fc5d5 | 15 | } |
EduardoVitela | 1:6f7dafed256b | 16 |