SD leseing til array
Dependencies: SDFileSystem mbed
Fork of SDFileSystem_HelloWorld by
wavheader.h@3:5a08f9ecfb16, 2017-04-24 (annotated)
- Committer:
- mathimat
- Date:
- Mon Apr 24 10:23:10 2017 +0000
- Revision:
- 3:5a08f9ecfb16
test;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mathimat | 3:5a08f9ecfb16 | 1 | #include "mbed.h" |
mathimat | 3:5a08f9ecfb16 | 2 | |
mathimat | 3:5a08f9ecfb16 | 3 | typedef struct WAV_HEADER |
mathimat | 3:5a08f9ecfb16 | 4 | { |
mathimat | 3:5a08f9ecfb16 | 5 | char RIFF[4]; |
mathimat | 3:5a08f9ecfb16 | 6 | int ChunkSize; |
mathimat | 3:5a08f9ecfb16 | 7 | char WAVE[4]; |
mathimat | 3:5a08f9ecfb16 | 8 | char fmt[4]; |
mathimat | 3:5a08f9ecfb16 | 9 | int Subchunk1Size; |
mathimat | 3:5a08f9ecfb16 | 10 | short int AudioFormat; |
mathimat | 3:5a08f9ecfb16 | 11 | short int NumOfChan; |
mathimat | 3:5a08f9ecfb16 | 12 | int SamplesPerSec; |
mathimat | 3:5a08f9ecfb16 | 13 | int bytesPerSec; |
mathimat | 3:5a08f9ecfb16 | 14 | short int blockAlign; |
mathimat | 3:5a08f9ecfb16 | 15 | short int bitsPerSample; |
mathimat | 3:5a08f9ecfb16 | 16 | int Subchunk2Size; |
mathimat | 3:5a08f9ecfb16 | 17 | char Subchunk2ID[4]; |
mathimat | 3:5a08f9ecfb16 | 18 | }wavhdr; |
mathimat | 3:5a08f9ecfb16 | 19 | |
mathimat | 3:5a08f9ecfb16 | 20 | struct wav_header_t |
mathimat | 3:5a08f9ecfb16 | 21 | { |
mathimat | 3:5a08f9ecfb16 | 22 | char chunkID[4]; //"RIFF" = 0x46464952 |
mathimat | 3:5a08f9ecfb16 | 23 | unsigned long chunkSize; //28 [+ sizeof(wExtraFormatBytes) + wExtraFormatBytes] + sum(sizeof(chunk.id) + sizeof(chunk.size) + chunk.size) |
mathimat | 3:5a08f9ecfb16 | 24 | char format[4]; //"WAVE" = 0x45564157 |
mathimat | 3:5a08f9ecfb16 | 25 | char subchunk1ID[4]; //"fmt " = 0x20746D66 |
mathimat | 3:5a08f9ecfb16 | 26 | unsigned long subchunk1Size; //16 [+ sizeof(wExtraFormatBytes) + wExtraFormatBytes] |
mathimat | 3:5a08f9ecfb16 | 27 | unsigned short audioFormat; |
mathimat | 3:5a08f9ecfb16 | 28 | unsigned short numChannels; |
mathimat | 3:5a08f9ecfb16 | 29 | unsigned long sampleRate; |
mathimat | 3:5a08f9ecfb16 | 30 | unsigned long byteRate; |
mathimat | 3:5a08f9ecfb16 | 31 | unsigned short blockAlign; |
mathimat | 3:5a08f9ecfb16 | 32 | unsigned short bitsPerSample; |
mathimat | 3:5a08f9ecfb16 | 33 | //[WORD wExtraFormatBytes;] |
mathimat | 3:5a08f9ecfb16 | 34 | //[Extra format bytes] |
mathimat | 3:5a08f9ecfb16 | 35 | }; |