Update bulgarian.lang by Zahari Yurukov
[maemo-rb.git] / firmware / export / mp3_playback.h
blob74340216113373e9aba1855f04f91dcfead93e41
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Code that has been in mpeg.c/h before, now creating an encapsulated play
11 * data module, to be used by other sources than file playback as well.
13 * Copyright (C) 2004 by Linus Nielsen Feltzing
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
23 ****************************************************************************/
24 #ifndef _MP3_PLAYBACK_H_
25 #define _MP3_PLAYBACK_H_
27 #include <stdbool.h>
29 /* callback fn */
30 #ifndef MP3_PLAY_CALLBACK_DEFINED
31 #define MP3_PLAY_CALLBACK_DEFINED
32 typedef void (*mp3_play_callback_t)(const void **start, size_t* size);
33 #endif
35 /* functions formerly in mpeg.c */
36 void mp3_init(int volume, int bass, int treble, int balance, int loudness,
37 int avc, int channel_config, int stereo_width,
38 int mdb_strength, int mdb_harmonics,
39 int mdb_center, int mdb_shape, bool mdb_enable,
40 bool superbass);
42 /* exported just for mpeg.c, to keep the recording there */
43 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
44 void demand_irq_enable(bool on);
45 #endif
47 /* new functions, exported to plugin API */
48 #if CONFIG_CODEC == MAS3587F
49 void mp3_play_init(void);
50 #endif
51 void mp3_play_data(const void* start, size_t size,
52 mp3_play_callback_t get_more);
53 void mp3_play_pause(bool play);
54 bool mp3_pause_done(void);
55 void mp3_play_stop(void);
56 bool mp3_is_playing(void);
57 unsigned char* mp3_get_pos(void);
58 void mp3_shutdown(void);
60 #endif /* #ifndef _MP3_PLAYBACK_H_ */