Mercurial > hg > xemacs-beta
comparison src/hpplay.c @ 406:b8cc9ab3f761 r21-2-33
Import from CVS: tag r21-2-33
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:17:09 +0200 |
parents | ca9a9ec9c1c1 |
children | 697ef44129c6 |
comparison
equal
deleted
inserted
replaced
405:0e08f63c74d2 | 406:b8cc9ab3f761 |
---|---|
49 */ | 49 */ |
50 | 50 |
51 #include <config.h> | 51 #include <config.h> |
52 #include "lisp.h" | 52 #include "lisp.h" |
53 | 53 |
54 #include "nativesound.h" | |
55 | |
54 #include <stdlib.h> | 56 #include <stdlib.h> |
55 #include <stdio.h> | 57 #include <stdio.h> |
56 #ifdef HPUX10 | 58 #ifdef HPUX10 |
57 #include <Alib.h> | 59 #include <Alib.h> |
58 #include <CUlib.h> | 60 #include <CUlib.h> |
59 #else /* !HPUX 10 */ | 61 #else /* !HPUX 10 */ |
60 #include <audio/Alib.h> | 62 #include <audio/Alib.h> |
61 #include <audio/CUlib.h> | 63 #include <audio/CUlib.h> |
62 #endif /* !HPUX 10 */ | 64 #endif /* !HPUX 10 */ |
65 | |
63 | 66 |
64 Lisp_Object Vhp_play_server; | 67 Lisp_Object Vhp_play_server; |
65 Lisp_Object Vhp_play_speaker; | 68 Lisp_Object Vhp_play_speaker; |
66 int hp_play_gain; | 69 int hp_play_gain; |
67 | 70 |
200 * Play the bucket | 203 * Play the bucket |
201 */ | 204 */ |
202 | 205 |
203 play_bucket_internal(audio, pSBucket, volume); | 206 play_bucket_internal(audio, pSBucket, volume); |
204 | 207 |
205 ASetErrorHandler(prevHandler); | 208 ASetErrorHandler(prevHandler); |
206 } | 209 } |
207 | 210 |
208 | 211 |
209 void | 212 int |
210 play_sound_data (data, length, volume) | 213 play_sound_data (data, length, volume) |
211 unsigned char * data; | 214 unsigned char * data; |
212 int length; | 215 int length; |
213 int volume; | 216 int volume; |
214 { | 217 { |
216 Audio *audio; | 219 Audio *audio; |
217 AErrorHandler prevHandler; | 220 AErrorHandler prevHandler; |
218 SunHeader *header; | 221 SunHeader *header; |
219 long status; | 222 long status; |
220 char *server; | 223 char *server; |
221 | 224 int result; |
225 | |
226 /* #### Finish this to return an error code. | |
227 This function signal a lisp error. How consistent with the rest. | |
228 What if this function is needed in doing the beep for the error? | |
229 | |
230 Apparently the author of this didn't read the comment in | |
231 Fplay_sound. | |
232 */ | |
233 | |
234 | |
222 if (STRINGP (Vhp_play_server)) | 235 if (STRINGP (Vhp_play_server)) |
223 server = (char *) XSTRING_DATA (Vhp_play_server); | 236 server = (char *) XSTRING_DATA (Vhp_play_server); |
224 server = ""; | 237 server = ""; |
225 | 238 |
226 /* open audio connection */ | 239 /* open audio connection */ |
248 play_bucket_internal(audio, pSBucket, volume); | 261 play_bucket_internal(audio, pSBucket, volume); |
249 | 262 |
250 ASetErrorHandler(prevHandler); | 263 ASetErrorHandler(prevHandler); |
251 if (status) | 264 if (status) |
252 player_error_internal( audio, "Audio data copy failed", status ); | 265 player_error_internal( audio, "Audio data copy failed", status ); |
266 | |
267 return 1; | |
253 } | 268 } |
254 | 269 |
255 void | 270 void |
256 vars_of_hpplay (void) | 271 vars_of_hpplay (void) |
257 { | 272 { |