summaryrefslogtreecommitdiff
path: root/firmware/export/audio.h
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-04-04 12:06:29 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-04-04 12:06:29 +0000
commit8a237a829e0f63b61536f315209a6d0ea1477e31 (patch)
tree1fe54329fe776aa7bc982a37203cb61c13244a48 /firmware/export/audio.h
parentec4e9b8d600c53add3c8bf6eb7fe1975dba141a7 (diff)
downloadrockbox-8a237a829e0f63b61536f315209a6d0ea1477e31.tar.gz
rockbox-8a237a829e0f63b61536f315209a6d0ea1477e31.zip
More audio code restructuring, mostly renaming functions so far
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6246 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/audio.h')
-rw-r--r--firmware/export/audio.h81
1 files changed, 81 insertions, 0 deletions
diff --git a/firmware/export/audio.h b/firmware/export/audio.h
new file mode 100644
index 0000000000..b276490ab3
--- /dev/null
+++ b/firmware/export/audio.h
@@ -0,0 +1,81 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2005 by Linus Nielsen Feltzing
11 *
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.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#ifndef AUDIO_H
20#define AUDIO_H
21
22#include <stdbool.h>
23
24#ifdef SIMULATOR
25#define audio_play(x) sim_audio_play(x)
26#endif
27
28#define AUDIO_STATUS_PLAY 1
29#define AUDIO_STATUS_PAUSE 2
30#define AUDIO_STATUS_RECORD 4
31#define AUDIO_STATUS_PRERECORD 8
32#define AUDIO_STATUS_ERROR 16
33
34#define AUDIOERR_DISK_FULL 1
35
36struct audio_debug
37{
38 int mp3buflen;
39 int mp3buf_write;
40 int mp3buf_swapwrite;
41 int mp3buf_read;
42
43 int last_dma_chunk_size;
44
45 bool dma_on;
46 bool playing;
47 bool play_pending;
48 bool is_playing;
49 bool filling;
50 bool dma_underrun;
51
52 int unplayed_space;
53 int playable_space;
54 int unswapped_space;
55
56 int low_watermark_level;
57 int lowest_watermark_level;
58};
59
60void audio_init(void);
61void audio_play(int offset);
62void audio_stop(void);
63void audio_pause(void);
64void audio_resume(void);
65void audio_next(void);
66void audio_prev(void);
67int audio_status(void);
68void audio_ff_rewind(int newtime);
69void audio_flush_and_reload_tracks(void);
70struct mp3entry* audio_current_track(void);
71struct mp3entry* audio_next_track(void);
72bool audio_has_changed_track(void);
73void audio_get_debugdata(struct audio_debug *dbgdata);
74void audio_set_buffer_margin(int seconds);
75unsigned int audio_error(void);
76void audio_error_clear(void);
77int audio_get_file_pos(void);
78void audio_beep(int duration);
79void audio_init_playback(void);
80
81#endif