A library which allows the playing of Wav files using the TLV320

Dependents:   RSALB_hbridge_helloworld RSALB_lobster WavPlayer_test AudioCODEC_HelloWorld

Committer:
p07gbar
Date:
Fri Sep 21 14:24:00 2012 +0000
Revision:
3:a7380cfc1987
Parent:
0:3695886f3495
Minor fix

Who changed what in which revision?

UserRevisionLine numberNew contents of line
p07gbar 0:3695886f3495 1 /**
p07gbar 0:3695886f3495 2 * @author Giles Barton-Owen
p07gbar 0:3695886f3495 3 *
p07gbar 0:3695886f3495 4 * @section LICENSE
p07gbar 0:3695886f3495 5 *
p07gbar 0:3695886f3495 6 * Copyright (c) 2012 mbed
p07gbar 0:3695886f3495 7 *
p07gbar 0:3695886f3495 8 * Permission is hereby granted, free of charge, to any person obtaining a copy
p07gbar 0:3695886f3495 9 * of this software and associated documentation files (the "Software"), to deal
p07gbar 0:3695886f3495 10 * in the Software without restriction, including without limitation the rights
p07gbar 0:3695886f3495 11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
p07gbar 0:3695886f3495 12 * copies of the Software, and to permit persons to whom the Software is
p07gbar 0:3695886f3495 13 * furnished to do so, subject to the following conditions:
p07gbar 0:3695886f3495 14 *
p07gbar 0:3695886f3495 15 * The above copyright notice and this permission notice shall be included in
p07gbar 0:3695886f3495 16 * all copies or substantial portions of the Software.
p07gbar 0:3695886f3495 17 *
p07gbar 0:3695886f3495 18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
p07gbar 0:3695886f3495 19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
p07gbar 0:3695886f3495 20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
p07gbar 0:3695886f3495 21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
p07gbar 0:3695886f3495 22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
p07gbar 0:3695886f3495 23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
p07gbar 0:3695886f3495 24 * THE SOFTWARE.
p07gbar 0:3695886f3495 25 *
p07gbar 0:3695886f3495 26 * @section DESCRIPTION
p07gbar 0:3695886f3495 27 * A WAV player configuration class for WavPlayer
p07gbar 0:3695886f3495 28 *
p07gbar 0:3695886f3495 29 */
p07gbar 0:3695886f3495 30
p07gbar 0:3695886f3495 31
p07gbar 0:3695886f3495 32 #ifndef WAVPLAYERCONFIG_H
p07gbar 0:3695886f3495 33 #define WAVPLAYERCONFIG_H
p07gbar 0:3695886f3495 34
p07gbar 0:3695886f3495 35 #include "mbed.h"
p07gbar 0:3695886f3495 36
p07gbar 0:3695886f3495 37 class WavPlayerConfig
p07gbar 0:3695886f3495 38 {
p07gbar 0:3695886f3495 39 public:
p07gbar 0:3695886f3495 40 /*format_tag(uint16_t ft);
p07gbar 0:3695886f3495 41 channels(uint16_t n);
p07gbar 0:3695886f3495 42 samples_per_second(uint32_t sps);
p07gbar 0:3695886f3495 43 avg_bytes_per_second(uint32_t abps);
p07gbar 0:3695886f3495 44 block_align(uint16_t ba);
p07gbar 0:3695886f3495 45 bits_per_sample(uint16_t bps);
p07gbar 0:3695886f3495 46 data_length(uint32_t len);*/
p07gbar 0:3695886f3495 47
p07gbar 0:3695886f3495 48 WavPlayerConfig();
p07gbar 0:3695886f3495 49
p07gbar 0:3695886f3495 50 uint16_t format_tag;
p07gbar 0:3695886f3495 51 uint16_t channels;
p07gbar 0:3695886f3495 52 uint32_t samples_per_sec;
p07gbar 0:3695886f3495 53 uint32_t avg_bytes_per_sec;
p07gbar 0:3695886f3495 54 uint16_t block_align;
p07gbar 0:3695886f3495 55 uint16_t bits_per_sample;
p07gbar 0:3695886f3495 56 uint32_t data_length;
p07gbar 0:3695886f3495 57 uint32_t file_size;
p07gbar 0:3695886f3495 58
p07gbar 0:3695886f3495 59 private:
p07gbar 0:3695886f3495 60
p07gbar 0:3695886f3495 61 };
p07gbar 0:3695886f3495 62
p07gbar 0:3695886f3495 63 #endif