comparison src/audio/dsp/SDL_dspaudio.c @ 1338:604d73db6802

Removed uses of stdlib.h and string.h
author Sam Lantinga <slouken@libsdl.org>
date Tue, 07 Feb 2006 09:29:18 +0000
parents 3692456e7b0f
children d02b552e5304
comparison
equal deleted inserted replaced
1337:c687f06c7473 1338:604d73db6802
23 hannu@opensound.com 23 hannu@opensound.com
24 */ 24 */
25 25
26 /* Allow access to a raw mixing buffer */ 26 /* Allow access to a raw mixing buffer */
27 27
28 #include <stdlib.h> 28 #include <stdio.h> /* For perror() ... should we really do this? */
29 #include <stdio.h>
30 #include <string.h>
31 #include <errno.h> 29 #include <errno.h>
32 #include <unistd.h> 30 #include <unistd.h>
33 #include <fcntl.h> 31 #include <fcntl.h>
34 #include <signal.h> 32 #include <signal.h>
35 #include <sys/time.h> 33 #include <sys/time.h>
41 #else 39 #else
42 /* This is recommended by OSS */ 40 /* This is recommended by OSS */
43 #include <sys/soundcard.h> 41 #include <sys/soundcard.h>
44 #endif 42 #endif
45 43
44 #include "SDL_stdlib.h"
45 #include "SDL_string.h"
46 #include "SDL_audio.h" 46 #include "SDL_audio.h"
47 #include "SDL_error.h" 47 #include "SDL_error.h"
48 #include "SDL_audiomem.h" 48 #include "SDL_audiomem.h"
49 #include "SDL_audio_c.h" 49 #include "SDL_audio_c.h"
50 #include "SDL_timer.h" 50 #include "SDL_timer.h"
301 fprintf(stderr, "Requesting %d fragments of size %d\n", 301 fprintf(stderr, "Requesting %d fragments of size %d\n",
302 (frag_spec >> 16), 1<<(frag_spec&0xFFFF)); 302 (frag_spec >> 16), 1<<(frag_spec&0xFFFF));
303 #endif 303 #endif
304 if ( ioctl(audio_fd, SNDCTL_DSP_SETFRAGMENT, &frag_spec) < 0 ) { 304 if ( ioctl(audio_fd, SNDCTL_DSP_SETFRAGMENT, &frag_spec) < 0 ) {
305 perror("SNDCTL_DSP_SETFRAGMENT"); 305 perror("SNDCTL_DSP_SETFRAGMENT");
306 fprintf(stderr, "Warning: Couldn't set audio fragment size\n");
307 } 306 }
308 #ifdef DEBUG_AUDIO 307 #ifdef DEBUG_AUDIO
309 { audio_buf_info info; 308 { audio_buf_info info;
310 ioctl(audio_fd, SNDCTL_DSP_GETOSPACE, &info); 309 ioctl(audio_fd, SNDCTL_DSP_GETOSPACE, &info);
311 fprintf(stderr, "fragments = %d\n", info.fragments); 310 fprintf(stderr, "fragments = %d\n", info.fragments);