Lines Matching defs:wanted_spec
2480 SDL_AudioSpec wanted_spec, spec;
2498 wanted_spec.channels = wanted_nb_channels;
2499 wanted_spec.freq = wanted_sample_rate;
2500 if (wanted_spec.freq <= 0 || wanted_spec.channels <= 0) {
2504 while (next_sample_rate_idx && next_sample_rates[next_sample_rate_idx] >= wanted_spec.freq)
2506 wanted_spec.format = AUDIO_S16SYS;
2507 wanted_spec.silence = 0;
2508 wanted_spec.samples = FFMAX(SDL_AUDIO_MIN_BUFFER_SIZE, 2 << av_log2(wanted_spec.freq / SDL_AUDIO_MAX_CALLBACKS_PER_SEC));
2509 wanted_spec.callback = sdl_audio_callback;
2510 wanted_spec.userdata = opaque;
2511 while (!(audio_dev = SDL_OpenAudioDevice(NULL, 0, &wanted_spec, &spec, SDL_AUDIO_ALLOW_FREQUENCY_CHANGE | SDL_AUDIO_ALLOW_CHANNELS_CHANGE))) {
2513 wanted_spec.channels, wanted_spec.freq, SDL_GetError());
2514 wanted_spec.channels = next_nb_channels[FFMIN(7, wanted_spec.channels)];
2515 if (!wanted_spec.channels) {
2516 wanted_spec.freq = next_sample_rates[next_sample_rate_idx--];
2517 wanted_spec.channels = wanted_nb_channels;
2518 if (!wanted_spec.freq) {
2524 av_channel_layout_default(wanted_channel_layout, wanted_spec.channels);
2531 if (spec.channels != wanted_spec.channels) {