Lines Matching refs:format
250 static int DMA_ReopenAudio(_THIS, const char *audiodev, int format, int stereo,
280 /* Set the audio format */
281 value = format;
283 (value != format) ) {
284 SDL_SetError("Couldn't set audio format");
311 int format;
331 SDL_SetError("Couldn't get audio format list");
335 /* Try for a closest match on audio format */
336 format = 0;
337 for ( test_format = SDL_FirstAudioFormat(spec->format);
338 ! format && test_format; ) {
340 fprintf(stderr, "Trying format 0x%4.4x\n", test_format);
345 format = AFMT_U8;
350 format = AFMT_S8;
355 format = AFMT_S16_LE;
360 format = AFMT_S16_BE;
365 format = AFMT_U16_LE;
370 format = AFMT_U16_BE;
374 format = 0;
377 if ( ! format ) {
381 if ( format == 0 ) {
385 spec->format = test_format;
387 /* Set the audio format */
388 value = format;
390 (value != format) ) {
391 SDL_SetError("Couldn't set audio format");
405 after setting the format, we must re-open the audio device
406 once we know what format and channels are supported
408 if ( DMA_ReopenAudio(this, audiodev, format, stereo, spec) < 0 ) {
419 spec->samples = spec->size / ((spec->format & 0xFF) / 8);