comparison src/hpplay.c @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents b8cc9ab3f761
children
comparison
equal deleted inserted replaced
411:12e008d41344 412:697ef44129c6
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
56 #include <stdlib.h> 54 #include <stdlib.h>
57 #include <stdio.h> 55 #include <stdio.h>
58 #ifdef HPUX10 56 #ifdef HPUX10
59 #include <Alib.h> 57 #include <Alib.h>
60 #include <CUlib.h> 58 #include <CUlib.h>
61 #else /* !HPUX 10 */ 59 #else /* !HPUX 10 */
62 #include <audio/Alib.h> 60 #include <audio/Alib.h>
63 #include <audio/CUlib.h> 61 #include <audio/CUlib.h>
64 #endif /* !HPUX 10 */ 62 #endif /* !HPUX 10 */
65
66 63
67 Lisp_Object Vhp_play_server; 64 Lisp_Object Vhp_play_server;
68 Lisp_Object Vhp_play_speaker; 65 Lisp_Object Vhp_play_speaker;
69 int hp_play_gain; 66 int hp_play_gain;
70 67
203 * Play the bucket 200 * Play the bucket
204 */ 201 */
205 202
206 play_bucket_internal(audio, pSBucket, volume); 203 play_bucket_internal(audio, pSBucket, volume);
207 204
208 ASetErrorHandler(prevHandler); 205 ASetErrorHandler(prevHandler);
209 } 206 }
210 207
211 208
212 int 209 void
213 play_sound_data (data, length, volume) 210 play_sound_data (data, length, volume)
214 unsigned char * data; 211 unsigned char * data;
215 int length; 212 int length;
216 int volume; 213 int volume;
217 { 214 {
219 Audio *audio; 216 Audio *audio;
220 AErrorHandler prevHandler; 217 AErrorHandler prevHandler;
221 SunHeader *header; 218 SunHeader *header;
222 long status; 219 long status;
223 char *server; 220 char *server;
224 int result; 221
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
235 if (STRINGP (Vhp_play_server)) 222 if (STRINGP (Vhp_play_server))
236 server = (char *) XSTRING_DATA (Vhp_play_server); 223 server = (char *) XSTRING_DATA (Vhp_play_server);
237 server = ""; 224 server = "";
238 225
239 /* open audio connection */ 226 /* open audio connection */
261 play_bucket_internal(audio, pSBucket, volume); 248 play_bucket_internal(audio, pSBucket, volume);
262 249
263 ASetErrorHandler(prevHandler); 250 ASetErrorHandler(prevHandler);
264 if (status) 251 if (status)
265 player_error_internal( audio, "Audio data copy failed", status ); 252 player_error_internal( audio, "Audio data copy failed", status );
266
267 return 1;
268 } 253 }
269 254
270 void 255 void
271 vars_of_hpplay (void) 256 vars_of_hpplay (void)
272 { 257 {