when changing settings from the Talk and Voice window also update the main widgets...
[Rockbox.git] / apps / playback.h
blob14ba35cea4af0ef7b13359cadf378e4b6b019436
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
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 ****************************************************************************/
20 #ifndef _PLAYBACK_H
21 #define _PLAYBACK_H
23 #include <stdbool.h>
25 #include "id3.h"
26 #include "mp3data.h"
28 #define CODEC_IDX_AUDIO 0
29 #define CODEC_IDX_VOICE 1
31 /* Not yet implemented. */
32 #define CODEC_SET_AUDIOBUF_WATERMARK 4
34 #if MEM > 1
35 #define MAX_TRACK 128
36 #else
37 #define MAX_TRACK 32
38 #endif
40 #define MAX_TRACK_MASK (MAX_TRACK-1)
42 #define PLAYBACK_MAX_EVENTS 4
43 enum PLAYBACK_EVENT_TYPE {
44 PLAYBACK_EVENT_TRACK_BUFFER,
45 PLAYBACK_EVENT_TRACK_FINISH,
46 PLAYBACK_EVENT_TRACK_CHANGE,
49 /* Functions */
50 const char * get_codec_filename(int cod_spec);
51 void voice_wait(void);
53 #if CONFIG_CODEC == SWCODEC /* This #ifdef is better here than gui/gwps.c */
54 extern void audio_next_dir(void);
55 extern void audio_prev_dir(void);
56 void playback_add_event(enum PLAYBACK_EVENT_TYPE type, void (*handler));
57 void playback_remove_event(enum PLAYBACK_EVENT_TYPE type, void (*handler));
58 #else
59 /* Really, should get rid of these HWCODEC api definitions here. */
60 void audio_set_track_changed_event(void (*handler)(struct mp3entry *id3));
61 void audio_set_track_buffer_event(void (*handler)(struct mp3entry *id3));
62 void audio_set_track_unbuffer_event(void (*handler)(struct mp3entry *id3));
63 # define audio_next_dir()
64 #define audio_prev_dir()
65 #endif
67 #endif