Add a browse (remote) custom statusbar item in the theme settings.
[kugel-rb.git] / apps / playback.h
blobadd11e296b16747ecdf6bce929f9590bec901cef
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2005 Miika Pekkarinen
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef _PLAYBACK_H
23 #define _PLAYBACK_H
25 #include <stdbool.h>
26 #include "config.h"
28 #ifdef HAVE_ALBUMART
30 #include "bmp.h"
32 * Returns the handle id of the buffered albumart for the given slot id
33 **/
34 int playback_current_aa_hid(int slot);
37 * Hands out an albumart slot for buffering albumart using the size
38 * int the passed dim struct, it copies the data of dim in order to
39 * be safe to be reused for other code
41 * The slot may be reused if other code calls this with the same dimensions
42 * in dim, so if you change dim release and claim a new slot
44 * Save to call from other threads */
45 int playback_claim_aa_slot(struct dim *dim);
48 * Releases the albumart slot with given id
50 * Save to call from other threads */
51 void playback_release_aa_slot(int slot);
52 #endif
54 /* Functions */
55 const char *get_codec_filename(int cod_spec);
56 void voice_wait(void);
57 bool audio_is_thread_ready(void);
58 int audio_track_count(void);
59 long audio_filebufused(void);
60 void audio_pre_ff_rewind(void);
61 void audio_set_crossfade(int type);
62 void audio_skip(int direction);
63 void audio_hard_stop(void); /* Stops audio from serving playback */
65 enum
67 AUDIO_WANT_PLAYBACK = 0,
68 AUDIO_WANT_VOICE,
70 bool audio_restore_playback(int type); /* Restores the audio buffer to handle the requested playback */
71 void codec_thread_do_callback(void (*fn)(void),
72 unsigned int *codec_thread_id);
75 #if CONFIG_CODEC == SWCODEC /* This #ifdef is better here than gui/wps.c */
76 extern void audio_next_dir(void);
77 extern void audio_prev_dir(void);
78 #else
79 #define audio_next_dir() ({ })
80 #define audio_prev_dir() ({ })
81 #endif
83 #endif