Mercurial > hg > xemacs-beta
comparison src/sgiplay.c @ 185:3d6bfa290dbd r20-3b19
Import from CVS: tag r20-3b19
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:55:28 +0200 |
parents | 8eaf7971accc |
children | a4f53d9b3154 |
comparison
equal
deleted
inserted
replaced
184:bcd2674570bf | 185:3d6bfa290dbd |
---|---|
322 audio_port_state[0] = make_int (saved_device_state[1]); | 322 audio_port_state[0] = make_int (saved_device_state[1]); |
323 audio_port_state[1] = make_int (saved_device_state[3]); | 323 audio_port_state[1] = make_int (saved_device_state[3]); |
324 audio_port_state[2] = make_int (saved_device_state[5]); | 324 audio_port_state[2] = make_int (saved_device_state[5]); |
325 record_unwind_protect (restore_audio_port, | 325 record_unwind_protect (restore_audio_port, |
326 Fvector (3, &audio_port_state[0])); | 326 Fvector (3, &audio_port_state[0])); |
327 | 327 |
328 ac = initialize_audio_port (& desc); | 328 ac = initialize_audio_port (& desc); |
329 desc = * ac; | 329 desc = * ac; |
330 return ac; | 330 return ac; |
331 } | 331 } |
332 | 332 |
395 unsigned char * data = (unsigned char *) buffer; | 395 unsigned char * data = (unsigned char *) buffer; |
396 unsigned char * limit = (unsigned char *) chunklimit; | 396 unsigned char * limit = (unsigned char *) chunklimit; |
397 short * obuf, * bufp; | 397 short * obuf, * bufp; |
398 long n_samples = limit - data; | 398 long n_samples = limit - data; |
399 | 399 |
400 obuf = alloca (n_samples * sizeof (short)); | 400 obuf = alloca_array (short, n_samples); |
401 bufp = &obuf[0]; | 401 bufp = &obuf[0]; |
402 | 402 |
403 while (data < limit) | 403 while (data < limit) |
404 *bufp++ = st_ulaw_to_linear (*data++); | 404 *bufp++ = st_ulaw_to_linear (*data++); |
405 ALwritesamps (ac->ac_port, obuf, n_samples); | 405 ALwritesamps (ac->ac_port, obuf, n_samples); |
434 long * data = (long *) buffer; | 434 long * data = (long *) buffer; |
435 long * limit = (long *) chunklimit; | 435 long * limit = (long *) chunklimit; |
436 long * obuf, * bufp; | 436 long * obuf, * bufp; |
437 long n_samples = limit-data; | 437 long n_samples = limit-data; |
438 | 438 |
439 obuf = alloca (n_samples * sizeof (long)); | 439 obuf = alloca_array (long, n_samples); |
440 bufp = &obuf[0]; | 440 bufp = &obuf[0]; |
441 | 441 |
442 while (data < limit) | 442 while (data < limit) |
443 *bufp++ = *data++ >> 8; | 443 *bufp++ = *data++ >> 8; |
444 ALwritesamps (ac->ac_port, obuf, n_samples); | 444 ALwritesamps (ac->ac_port, obuf, n_samples); |