blob: 66d96b40840fb412b40033259d28a7762ace6891 [file] [log] [blame]
Linus Nielsen Feltzing1c497e62005-06-05 23:05:10 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2005 Miika Pekkarinen
11 *
Daniel Stenberg2acc0ac2008-06-28 18:10:04 +000012 * 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.
Linus Nielsen Feltzing1c497e62005-06-05 23:05:10 +000016 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
Dave Chapman3ad485b2005-06-14 22:27:57 +000022#ifndef _PLAYBACK_H
23#define _PLAYBACK_H
24
Dave Chapman3ad485b2005-06-14 22:27:57 +000025#include <stdbool.h>
Bertrik Sikkenc97e5032008-04-28 14:13:13 +000026#include "config.h"
Miika Pekkarinend43bff92006-07-29 17:25:31 +000027
Miika Pekkarinen7d6d1222005-06-29 21:36:30 +000028/* Functions */
Steve Bavin135cc752008-03-28 12:51:33 +000029const char *get_codec_filename(int cod_spec);
Nils Wallménius5b769362007-08-06 13:08:36 +000030void voice_wait(void);
Steve Bavinc9df8fd2008-03-28 11:24:24 +000031void audio_wait_for_init(void);
32int audio_track_count(void);
33long audio_filebufused(void);
34void audio_pre_ff_rewind(void);
Steve Bavin135cc752008-03-28 12:51:33 +000035void audio_set_crossfade(int type);
Steve Bavinc9df8fd2008-03-28 11:24:24 +000036
37void audio_hard_stop(void); /* Stops audio from serving playback */
38
39enum
40{
41 AUDIO_WANT_PLAYBACK = 0,
42 AUDIO_WANT_VOICE,
43};
Steve Bavin135cc752008-03-28 12:51:33 +000044bool audio_restore_playback(int type); /* Restores the audio buffer to handle the requested playback */
Steve Bavinc9df8fd2008-03-28 11:24:24 +000045
46#ifdef HAVE_ALBUMART
47int audio_current_aa_hid(void);
48#endif
Miika Pekkarinen7d6d1222005-06-29 21:36:30 +000049
Linus Nielsen Feltzing224c0a12006-08-15 12:27:07 +000050#if CONFIG_CODEC == SWCODEC /* This #ifdef is better here than gui/gwps.c */
Anton Oleynikov00928af2005-11-10 22:31:47 +000051extern void audio_next_dir(void);
52extern void audio_prev_dir(void);
Linus Nielsen Feltzing224c0a12006-08-15 12:27:07 +000053#else
Stéphane Doyonab0f7e12008-05-04 13:47:58 +000054#define audio_next_dir() ({ })
55#define audio_prev_dir() ({ })
Linus Nielsen Feltzing224c0a12006-08-15 12:27:07 +000056#endif
Miika Pekkarinend3191162006-01-27 11:39:46 +000057
Linus Nielsen Feltzing1c497e62005-06-05 23:05:10 +000058#endif
59
60