Home | History | Annotate | Download | only in mint

Lines Matching refs:spec

67 static int Mint_OpenAudio(_THIS, SDL_AudioSpec *spec);
72 static int Mint_CheckAudio(_THIS, SDL_AudioSpec *spec);
73 static void Mint_InitAudio(_THIS, SDL_AudioSpec *spec);
200 static int Mint_CheckAudio(_THIS, SDL_AudioSpec *spec)
204 Uint16 test_format = SDL_FirstAudioFormat(spec->format);
207 resolution = spec->format & 0x00ff;
208 format_signed = ((spec->format & 0x8000)!=0);
209 format_bigendian = ((spec->format & 0x1000)!=0);
211 DEBUG_PRINT((DEBUG_NAME "asked: %d bits, ",spec->format & 0x00ff));
212 DEBUG_PRINT(("signed=%d, ", ((spec->format & 0x8000)!=0)));
213 DEBUG_PRINT(("big endian=%d, ", ((spec->format & 0x1000)!=0)));
214 DEBUG_PRINT(("channels=%d, ", spec->channels));
215 DEBUG_PRINT(("freq=%d\n", spec->freq));
217 if (spec->channels > 2) {
218 spec->channels = 2; /* no more than stereo! */
224 spec->format = test_format;
225 resolution = spec->format & 0xff;
226 format_signed = (spec->format & (1<<15));
227 format_bigendian = (spec->format & (1<<12));
264 spec->format = spec->format & (~0x8000);
271 spec->format |= 0x8000;
280 spec->format = spec->format & (~0x1000);
287 spec->format |= 0x1000;
308 MINTAUDIO_numfreq=SDL_MintAudio_SearchFrequency(this, spec->freq);
309 spec->freq=MINTAUDIO_frequencies[MINTAUDIO_numfreq].frequency;
311 DEBUG_PRINT((DEBUG_NAME "obtained: %d bits, ",spec->format & 0x00ff));
312 DEBUG_PRINT(("signed=%d, ", ((spec->format & 0x8000)!=0)));
313 DEBUG_PRINT(("big endian=%d, ", ((spec->format & 0x1000)!=0)));
314 DEBUG_PRINT(("channels=%d, ", spec->channels));
315 DEBUG_PRINT(("freq=%d\n", spec->freq));
320 static void Mint_InitAudio(_THIS, SDL_AudioSpec *spec)
333 switch (spec->format & 0xff) {
335 if (spec->channels==2) {
342 if (spec->channels==2) {
361 if (Setbuffer(0, buffer, buffer + spec->size)<0) {
375 static int Mint_OpenAudio(_THIS, SDL_AudioSpec *spec)
386 if (Mint_CheckAudio(this, spec)==-1) {
390 SDL_CalculateAudioSpec(spec);
393 DEBUG_PRINT((DEBUG_NAME "buffer size=%d\n", spec->size));
395 SDL_MintAudio_audiobuf[0] = Atari_SysMalloc(spec->size *2, MX_STRAM);
400 SDL_MintAudio_audiobuf[1] = SDL_MintAudio_audiobuf[0] + spec->size ;
402 SDL_memset(SDL_MintAudio_audiobuf[0], spec->silence, spec->size *2);
403 SDL_MintAudio_audiosize = spec->size;
412 Mint_InitAudio(this, spec);