Home | History | Annotate | Download | only in mint

Lines Matching refs:spec

70 static int Mint_OpenAudio(_THIS, SDL_AudioSpec *spec);
75 static int Mint_CheckAudio(_THIS, SDL_AudioSpec *spec);
76 static void Mint_InitAudio(_THIS, SDL_AudioSpec *spec);
217 static int Mint_CheckAudio(_THIS, SDL_AudioSpec *spec)
222 DEBUG_PRINT((DEBUG_NAME "asked: %d bits, ",spec->format & 0x00ff));
223 DEBUG_PRINT(("signed=%d, ", ((spec->format & 0x8000)!=0)));
224 DEBUG_PRINT(("big endian=%d, ", ((spec->format & 0x1000)!=0)));
225 DEBUG_PRINT(("channels=%d, ", spec->channels));
226 DEBUG_PRINT(("freq=%d\n", spec->freq));
228 if (spec->channels > 2) {
229 spec->channels = 2; /* no more than stereo! */
236 spec->channels=1;
237 spec->format=8; /* FIXME: is it signed or unsigned ? */
241 spec->format=AUDIO_S8;
268 spec->format |= 0x8000; /* Audio is always signed */
269 if ((spec->format & 0x00ff)==16) {
270 spec->format |= 0x1000; /* Audio is always big endian */
271 spec->channels=2; /* 16 bits always stereo */
285 MINTAUDIO_numfreq=SDL_MintAudio_SearchFrequency(this, spec->freq);
286 spec->freq=MINTAUDIO_frequencies[MINTAUDIO_numfreq].frequency;
288 DEBUG_PRINT((DEBUG_NAME "obtained: %d bits, ",spec->format & 0x00ff));
289 DEBUG_PRINT(("signed=%d, ", ((spec->format & 0x8000)!=0)));
290 DEBUG_PRINT(("big endian=%d, ", ((spec->format & 0x1000)!=0)));
291 DEBUG_PRINT(("channels=%d, ", spec->channels));
292 DEBUG_PRINT(("freq=%d\n", spec->freq));
297 static void Mint_InitAudio(_THIS, SDL_AudioSpec *spec)
314 switch (spec->format & 0xff) {
316 if (spec->channels==2) {
343 if (Setbuffer(0, buffer, buffer + spec->size)<0) {
365 static int Mint_OpenAudio(_THIS, SDL_AudioSpec *spec)
376 if (Mint_CheckAudio(this, spec)==-1) {
380 SDL_CalculateAudioSpec(spec);
383 DEBUG_PRINT((DEBUG_NAME "buffer size=%d\n", spec->size));
385 SDL_MintAudio_audiobuf[0] = Atari_SysMalloc(spec->size *2, MX_STRAM);
390 SDL_MintAudio_audiobuf[1] = SDL_MintAudio_audiobuf[0] + spec->size ;
392 SDL_memset(SDL_MintAudio_audiobuf[0], spec->silence, spec->size *2);
393 SDL_MintAudio_audiosize = spec->size;
402 Mint_InitAudio(this, spec);