diff options
author | Dan Everton <dan@iocaine.org> | 2006-02-13 21:46:28 +0000 |
---|---|---|
committer | Dan Everton <dan@iocaine.org> | 2006-02-13 21:46:28 +0000 |
commit | 3ba0060ac1fa1c39596c51d4bf259142e6d1847f (patch) | |
tree | 71428db81254a9901fbf3e8a92c71f0f57410cd2 /uisimulator/x11/sound.c | |
parent | dd39e33663a4b617c3f88f48845681e772386a7f (diff) | |
download | rockbox-3ba0060ac1fa1c39596c51d4bf259142e6d1847f.tar.gz rockbox-3ba0060ac1fa1c39596c51d4bf259142e6d1847f.zip |
Backlight support for 8-bit targets in SDL sim. Redo sound handling. Still doesn't work right, but is closer to how the actual Rockbox system does it. Move some stub functions in to Win32 and X11 sims to keep them compiling.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8686 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/x11/sound.c')
-rw-r--r-- | uisimulator/x11/sound.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/uisimulator/x11/sound.c b/uisimulator/x11/sound.c index dd875e41f5..06d9c014ff 100644 --- a/uisimulator/x11/sound.c +++ b/uisimulator/x11/sound.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #ifdef ROCKBOX_HAS_SIMSOUND /* play sound in sim enabled */ | 22 | #ifdef ROCKBOX_HAS_SIMSOUND /* play sound in sim enabled */ |
23 | 23 | ||
24 | #include <stdbool.h> | ||
24 | #include <stdio.h> | 25 | #include <stdio.h> |
25 | #include <stdlib.h> | 26 | #include <stdlib.h> |
26 | #include <unistd.h> | 27 | #include <unistd.h> |
@@ -31,6 +32,8 @@ | |||
31 | 32 | ||
32 | #include "sound.h" | 33 | #include "sound.h" |
33 | 34 | ||
35 | static bool playing = false; | ||
36 | |||
34 | int sim_sound_init(void) | 37 | int sim_sound_init(void) |
35 | { | 38 | { |
36 | int fd; | 39 | int fd; |
@@ -92,4 +95,46 @@ void sound_playback_thread(void) | |||
92 | 95 | ||
93 | } | 96 | } |
94 | 97 | ||
98 | /* Stubs for PCM audio playback. */ | ||
99 | bool pcm_is_playing(void) | ||
100 | { | ||
101 | return playing; | ||
102 | } | ||
103 | |||
104 | void pcm_mute(bool state) | ||
105 | { | ||
106 | (void)state; | ||
107 | } | ||
108 | |||
109 | void pcm_play_pause(bool state) | ||
110 | { | ||
111 | (void)state; | ||
112 | } | ||
113 | |||
114 | bool pcm_is_paused(void) | ||
115 | { | ||
116 | return false; | ||
117 | } | ||
118 | |||
119 | void pcm_play_stop(void) | ||
120 | { | ||
121 | playing = false; | ||
122 | } | ||
123 | |||
124 | void pcm_init(void) | ||
125 | { | ||
126 | } | ||
127 | |||
128 | void (*sound_get_pcm)(unsigned char** start, long* size); | ||
129 | void pcm_play_data(void (*get_more)(unsigned char** start, long* size)) | ||
130 | { | ||
131 | sound_get_pcm = get_more; | ||
132 | playing = true; | ||
133 | } | ||
134 | |||
135 | long pcm_get_bytes_waiting(void) | ||
136 | { | ||
137 | return 0; | ||
138 | } | ||
139 | |||
95 | #endif /* ROCKBOX_HAS_SIMSOUND */ | 140 | #endif /* ROCKBOX_HAS_SIMSOUND */ |