streo mp3 player see: http://mbed.org/users/okini3939/notebook/I2S_AUDIO
Dependencies: FatFileSystemCpp I2SSlave TLV320 mbed
Fork of madplayer by
bit.h@2:f28cf0afd021, 2010-11-27 (annotated)
- Committer:
- Gruenfrosch
- Date:
- Sat Nov 27 17:27:33 2010 +0000
- Revision:
- 2:f28cf0afd021
- Parent:
- 0:7627c79db971
Version 3:
* moved another memory block into AHB RAM, giving more room for
* stereo buffer.
* moved content of decode() to main()
* decoding is now safe to be called multiple times (bug in older versions)
* Output routine now fills stereo buffer, DAC output sums channels,
* just for demonstration that stereo output could go here
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Gruenfrosch | 0:7627c79db971 | 1 | /* |
Gruenfrosch | 0:7627c79db971 | 2 | * libmad - MPEG audio decoder library |
Gruenfrosch | 0:7627c79db971 | 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. |
Gruenfrosch | 0:7627c79db971 | 4 | * |
Gruenfrosch | 0:7627c79db971 | 5 | * This program is free software; you can redistribute it and/or modify |
Gruenfrosch | 0:7627c79db971 | 6 | * it under the terms of the GNU General Public License as published by |
Gruenfrosch | 0:7627c79db971 | 7 | * the Free Software Foundation; either version 2 of the License, or |
Gruenfrosch | 0:7627c79db971 | 8 | * (at your option) any later version. |
Gruenfrosch | 0:7627c79db971 | 9 | * |
Gruenfrosch | 0:7627c79db971 | 10 | * This program is distributed in the hope that it will be useful, |
Gruenfrosch | 0:7627c79db971 | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
Gruenfrosch | 0:7627c79db971 | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
Gruenfrosch | 0:7627c79db971 | 13 | * GNU General Public License for more details. |
Gruenfrosch | 0:7627c79db971 | 14 | * |
Gruenfrosch | 0:7627c79db971 | 15 | * You should have received a copy of the GNU General Public License |
Gruenfrosch | 0:7627c79db971 | 16 | * along with this program; if not, write to the Free Software |
Gruenfrosch | 0:7627c79db971 | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
Gruenfrosch | 0:7627c79db971 | 18 | * |
Gruenfrosch | 0:7627c79db971 | 19 | * $Id: bit.h,v 1.1 2010/11/23 20:12:57 andy Exp $ |
Gruenfrosch | 0:7627c79db971 | 20 | */ |
Gruenfrosch | 0:7627c79db971 | 21 | |
Gruenfrosch | 0:7627c79db971 | 22 | # ifndef LIBMAD_BIT_H |
Gruenfrosch | 0:7627c79db971 | 23 | # define LIBMAD_BIT_H |
Gruenfrosch | 0:7627c79db971 | 24 | |
Gruenfrosch | 0:7627c79db971 | 25 | struct mad_bitptr { |
Gruenfrosch | 0:7627c79db971 | 26 | unsigned char const *byte; |
Gruenfrosch | 0:7627c79db971 | 27 | unsigned short cache; |
Gruenfrosch | 0:7627c79db971 | 28 | unsigned short left; |
Gruenfrosch | 0:7627c79db971 | 29 | }; |
Gruenfrosch | 0:7627c79db971 | 30 | |
Gruenfrosch | 0:7627c79db971 | 31 | void mad_bit_init(struct mad_bitptr *, unsigned char const *); |
Gruenfrosch | 0:7627c79db971 | 32 | |
Gruenfrosch | 0:7627c79db971 | 33 | # define mad_bit_finish(bitptr) /* nothing */ |
Gruenfrosch | 0:7627c79db971 | 34 | |
Gruenfrosch | 0:7627c79db971 | 35 | unsigned int mad_bit_length(struct mad_bitptr const *, |
Gruenfrosch | 0:7627c79db971 | 36 | struct mad_bitptr const *); |
Gruenfrosch | 0:7627c79db971 | 37 | |
Gruenfrosch | 0:7627c79db971 | 38 | # define mad_bit_bitsleft(bitptr) ((bitptr)->left) |
Gruenfrosch | 0:7627c79db971 | 39 | unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *); |
Gruenfrosch | 0:7627c79db971 | 40 | |
Gruenfrosch | 0:7627c79db971 | 41 | void mad_bit_skip(struct mad_bitptr *, unsigned int); |
Gruenfrosch | 0:7627c79db971 | 42 | unsigned long mad_bit_read(struct mad_bitptr *, unsigned int); |
Gruenfrosch | 0:7627c79db971 | 43 | void mad_bit_write(struct mad_bitptr *, unsigned int, unsigned long); |
Gruenfrosch | 0:7627c79db971 | 44 | |
Gruenfrosch | 0:7627c79db971 | 45 | unsigned short mad_bit_crc(struct mad_bitptr, unsigned int, unsigned short); |
Gruenfrosch | 0:7627c79db971 | 46 | |
Gruenfrosch | 0:7627c79db971 | 47 | # endif |