55 #define LOWEST_AL_FORMAT FFMIN(FFMIN(AL_FORMAT_MONO8,AL_FORMAT_MONO16),FFMIN(AL_FORMAT_STEREO8,AL_FORMAT_STEREO16))
80 static inline int al_get_error(ALCdevice *device,
const char** error_msg_ret)
82 ALCenum error = alcGetError(device);
84 *error_msg_ret = (
const char*) alcGetString(device, error);
88 case ALC_INVALID_DEVICE:
91 case ALC_INVALID_CONTEXT:
92 case ALC_INVALID_ENUM:
93 case ALC_INVALID_VALUE:
96 case ALC_OUT_OF_MEMORY:
111 if (!(devices = alcGetString(
NULL, ALC_CAPTURE_DEVICE_SPECIFIER)))
114 av_log(log_ctx,
AV_LOG_INFO,
"List of OpenAL capture devices on this system:\n");
116 for (; *devices !=
'\0'; devices += strlen(devices) + 1)
123 static const ALCenum sample_formats[2][2] = {
124 { AL_FORMAT_MONO8, AL_FORMAT_STEREO8 },
125 { AL_FORMAT_MONO16, AL_FORMAT_STEREO16 }
128 const char *error_msg;
169 alcCaptureStart(ad->
device);
176 alcCaptureCloseDevice(ad->
device);
186 const char *error_msg;
190 alcGetIntegerv(ad->
device, ALC_CAPTURE_SAMPLES, (ALCsizei)
sizeof(ALCint), &nb_samples);
198 alcCaptureSamples(ad->
device, pkt->
data, nb_samples);
216 alcCaptureStop(ad->
device);
217 alcCaptureCloseDevice(ad->
device);
222 #define OFFSET(x) offsetof(al_data, x)
244 .priv_data_size =
sizeof(
al_data),