1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2005 Miika Pekkarinen
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
28 #define CODEC_IDX_AUDIO 0
29 #define CODEC_IDX_VOICE 1
31 /* Not yet implemented. */
32 #define CODEC_SET_AUDIOBUF_WATERMARK 4
40 #define MAX_TRACK_MASK (MAX_TRACK-1)
43 struct mp3entry id3
; /* TAG metadata */
44 char *codecbuf
; /* Pointer to codec buffer */
45 size_t codecsize
; /* Codec length in bytes */
46 bool has_codec
; /* Does this track have a codec on the buffer */
48 size_t buf_idx
; /* Pointer to the track's buffer */
49 size_t filerem
; /* Remaining bytes of file NOT in buffer */
50 size_t filesize
; /* File total length */
51 size_t start_pos
; /* Position to first bytes of file in buffer */
52 volatile size_t available
; /* Available bytes to read from buffer */
54 bool taginfo_ready
; /* Is metadata read */
56 bool event_sent
; /* Was this track's buffered event sent */
60 const char * get_codec_filename(int cod_spec
);
61 void audio_set_track_changed_event(void (*handler
)(struct mp3entry
*id3
));
62 void audio_set_track_buffer_event(void (*handler
)(struct mp3entry
*id3
,
64 void audio_set_track_unbuffer_event(void (*handler
)(struct mp3entry
*id3
,
66 void voice_wait(void);
68 #if CONFIG_CODEC == SWCODEC /* This #ifdef is better here than gui/gwps.c */
69 extern void audio_next_dir(void);
70 extern void audio_prev_dir(void);
72 #define audio_next_dir()
73 #define audio_prev_dir()