diff options
author | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-01-05 20:42:51 +0000 |
---|---|---|
committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-01-05 20:42:51 +0000 |
commit | f993365447d8dc5bb28c76a003cecd045c3abaf7 (patch) | |
tree | 19d4a2cfebd7e0f43c85559c2e88114fd4ba3223 /firmware/export/mp3_playback.h | |
parent | 974c2f0d43c1ebc786854f48f15ccaea7803d8f0 (diff) | |
download | rockbox-f993365447d8dc5bb28c76a003cecd045c3abaf7.tar.gz rockbox-f993365447d8dc5bb28c76a003cecd045c3abaf7.zip |
Moved the low-level playback functionality into a new, separate module "mp3_playback". This e.g. allows to export a memory playback API to the plugins, opens the door to games with sound, UI sounds, etc.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4192 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/mp3_playback.h')
-rw-r--r-- | firmware/export/mp3_playback.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/firmware/export/mp3_playback.h b/firmware/export/mp3_playback.h new file mode 100644 index 0000000000..2767092b75 --- /dev/null +++ b/firmware/export/mp3_playback.h | |||
@@ -0,0 +1,73 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
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. | ||
12 | * | ||
13 | * Copyright (C) 2004 by Linus Nielsen Feltzing | ||
14 | * | ||
15 | * All files in this archive are subject to the GNU General Public License. | ||
16 | * See the file COPYING in the source tree root for full license agreement. | ||
17 | * | ||
18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
19 | * KIND, either express or implied. | ||
20 | * | ||
21 | ****************************************************************************/ | ||
22 | #ifndef _MP3_PLAYBACK_H_ | ||
23 | #define _MP3_PLAYBACK_H_ | ||
24 | |||
25 | #include <stdbool.h> | ||
26 | |||
27 | /* functions formerly in mpeg.c */ | ||
28 | void mp3_init(int volume, int bass, int treble, int balance, | ||
29 | int loudness, int bass_boost, int avc, int channel_config); | ||
30 | void mpeg_sound_set(int setting, int value); | ||
31 | int mpeg_sound_min(int setting); | ||
32 | int mpeg_sound_max(int setting); | ||
33 | int mpeg_sound_default(int setting); | ||
34 | void mpeg_sound_channel_config(int configuration); | ||
35 | int mpeg_val2phys(int setting, int value); | ||
36 | int mpeg_phys2val(int setting, int value); | ||
37 | char *mpeg_sound_unit(int setting); | ||
38 | int mpeg_sound_numdecimals(int setting); | ||
39 | #if defined(HAVE_MAS3587F) || defined(SIMULATOR) | ||
40 | void mpeg_set_pitch(int percent); | ||
41 | #endif | ||
42 | |||
43 | /* new functions, to be exported to plugin API */ | ||
44 | void mp3_play_init(void); | ||
45 | void mp3_play_data(unsigned char* start, int size, | ||
46 | void (*get_more)(unsigned char** start, int* size) /* callback fn */ | ||
47 | ); | ||
48 | void mp3_play_pause(bool play); | ||
49 | void mp3_play_stop(void); | ||
50 | |||
51 | |||
52 | #define SOUND_VOLUME 0 | ||
53 | #define SOUND_BASS 1 | ||
54 | #define SOUND_TREBLE 2 | ||
55 | #define SOUND_BALANCE 3 | ||
56 | #define SOUND_LOUDNESS 4 | ||
57 | #define SOUND_SUPERBASS 5 | ||
58 | #define SOUND_AVC 6 | ||
59 | #define SOUND_CHANNELS 7 | ||
60 | #define SOUND_LEFT_GAIN 8 | ||
61 | #define SOUND_RIGHT_GAIN 9 | ||
62 | #define SOUND_MIC_GAIN 10 | ||
63 | #define SOUND_NUMSETTINGS 11 | ||
64 | |||
65 | #define MPEG_SOUND_STEREO 0 | ||
66 | #define MPEG_SOUND_STEREO_NARROW 1 | ||
67 | #define MPEG_SOUND_MONO 2 | ||
68 | #define MPEG_SOUND_MONO_LEFT 3 | ||
69 | #define MPEG_SOUND_MONO_RIGHT 4 | ||
70 | #define MPEG_SOUND_KARAOKE 5 | ||
71 | #define MPEG_SOUND_STEREO_WIDE 6 | ||
72 | |||
73 | #endif /* #ifndef _MP3_PLAYBACK_H_ */ | ||