Mercurial > sdl-ios-xcode
comparison src/audio/dummy/SDL_dummyaudio.c @ 1533:38c1eb6b0083
By default all the real targets have dummy audio/video and disk audio.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 14 Mar 2006 16:19:32 +0000 |
parents | 30f189cdd82b |
children | 60620d71e324 |
comparison
equal
deleted
inserted
replaced
1532:30f189cdd82b | 1533:38c1eb6b0083 |
---|---|
22 This file hacked^H^H^H^H^H^Hwritten by Ryan C. Gordon | 22 This file hacked^H^H^H^H^H^Hwritten by Ryan C. Gordon |
23 (icculus@icculus.org) | 23 (icculus@icculus.org) |
24 */ | 24 */ |
25 #include "SDL_config.h" | 25 #include "SDL_config.h" |
26 | 26 |
27 /* Output raw audio data to a file. */ | 27 /* Output audio to nowhere... */ |
28 | |
29 #if HAVE_STDIO_H | |
30 #include <stdio.h> | |
31 #endif | |
32 | 28 |
33 #include "SDL_rwops.h" | 29 #include "SDL_rwops.h" |
34 #include "SDL_timer.h" | 30 #include "SDL_timer.h" |
35 #include "SDL_audio.h" | 31 #include "SDL_audio.h" |
36 #include "../SDL_audiomem.h" | 32 #include "../SDL_audiomem.h" |
133 } | 129 } |
134 } | 130 } |
135 | 131 |
136 static int DUMMYAUD_OpenAudio(_THIS, SDL_AudioSpec *spec) | 132 static int DUMMYAUD_OpenAudio(_THIS, SDL_AudioSpec *spec) |
137 { | 133 { |
138 #if HAVE_STDIO_H | |
139 fprintf(stderr, "\nWARNING: You are using the SDL dummy audio driver!" | |
140 " No sound will be output!\n\n"); | |
141 #endif | |
142 | |
143 /* Allocate mixing buffer */ | 134 /* Allocate mixing buffer */ |
144 this->hidden->mixlen = spec->size; | 135 this->hidden->mixlen = spec->size; |
145 this->hidden->mixbuf = (Uint8 *) SDL_AllocAudioMem(this->hidden->mixlen); | 136 this->hidden->mixbuf = (Uint8 *) SDL_AllocAudioMem(this->hidden->mixlen); |
146 if ( this->hidden->mixbuf == NULL ) { | 137 if ( this->hidden->mixbuf == NULL ) { |
147 return(-1); | 138 return(-1); |