comparison src/audio/macrom/SDL_romaudio.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 c71e05b4dc2e
comparison
equal deleted inserted replaced
1337:c687f06c7473 1338:604d73db6802
28 # include <Sound.h> /* SoundManager interface */ 28 # include <Sound.h> /* SoundManager interface */
29 # include <Gestalt.h> 29 # include <Gestalt.h>
30 # include <DriverServices.h> 30 # include <DriverServices.h>
31 #endif 31 #endif
32 32
33 #include <stdlib.h>
34 #include <stdio.h>
35
36 #if !defined(NewSndCallBackUPP) && (UNIVERSAL_INTERFACES_VERSION < 0x0335) 33 #if !defined(NewSndCallBackUPP) && (UNIVERSAL_INTERFACES_VERSION < 0x0335)
37 #if !defined(NewSndCallBackProc) /* avoid circular redefinition... */ 34 #if !defined(NewSndCallBackProc) /* avoid circular redefinition... */
38 #define NewSndCallBackUPP NewSndCallBackProc 35 #define NewSndCallBackUPP NewSndCallBackProc
39 #endif 36 #endif
40 #if !defined(NewSndCallBackUPP) 37 #if !defined(NewSndCallBackUPP)
41 #define NewSndCallBackUPP NewSndCallBackProc 38 #define NewSndCallBackUPP NewSndCallBackProc
42 #endif 39 #endif
43 #endif 40 #endif
44 41
42 #include "SDL_stdlib.h"
43 #include "SDL_string.h"
45 #include "SDL_endian.h" 44 #include "SDL_endian.h"
46 #include "SDL_audio.h" 45 #include "SDL_audio.h"
47 #include "SDL_audio_c.h" 46 #include "SDL_audio_c.h"
48 #include "SDL_audiomem.h" 47 #include "SDL_audiomem.h"
49 #include "SDL_sysaudio.h" 48 #include "SDL_sysaudio.h"
453 audio_dbh.dbhFormat = k16BitLittleEndianFormat; 452 audio_dbh.dbhFormat = k16BitLittleEndianFormat;
454 } 453 }
455 454
456 /* allocate the 2 double-back buffers */ 455 /* allocate the 2 double-back buffers */
457 for ( i=0; i<2; ++i ) { 456 for ( i=0; i<2; ++i ) {
458 audio_buf[i] = calloc(1, sizeof(SndDoubleBuffer)+spec->size); 457 audio_buf[i] = SDL_calloc(1, sizeof(SndDoubleBuffer)+spec->size);
459 if ( audio_buf[i] == NULL ) { 458 if ( audio_buf[i] == NULL ) {
460 SDL_OutOfMemory(); 459 SDL_OutOfMemory();
461 return(-1); 460 return(-1);
462 } 461 }
463 audio_buf[i]->dbNumFrames = spec->samples; 462 audio_buf[i]->dbNumFrames = spec->samples;