Пример #1
0
void alc_qsa_probe(enum DevProbe type)
{
    ALuint i;

    switch (type)
    {
        case ALL_DEVICE_PROBE:
#define FREE_NAME(iter) free((iter)->name)
            VECTOR_FOR_EACH(DevMap, DeviceNameMap, FREE_NAME);
#undef FREE_NAME
            VECTOR_RESIZE(DeviceNameMap, 0);

            deviceList(SND_PCM_CHANNEL_PLAYBACK, &DeviceNameMap);
#define APPEND_DEVICE(iter) AppendAllDevicesList((iter)->name)
            VECTOR_FOR_EACH(const DevMap, DeviceNameMap, APPEND_DEVICE);
#undef APPEND_DEVICE
            break;

        case CAPTURE_DEVICE_PROBE:
#define FREE_NAME(iter) free((iter)->name)
            VECTOR_FOR_EACH(DevMap, CaptureNameMap, FREE_NAME);
#undef FREE_NAME
            VECTOR_RESIZE(CaptureNameMap, 0);

            deviceList(SND_PCM_CHANNEL_CAPTURE, &CaptureNameMap);
#define APPEND_DEVICE(iter) AppendCaptureDeviceList((iter)->name)
            VECTOR_FOR_EACH(const DevMap, CaptureNameMap, APPEND_DEVICE);
#undef APPEND_DEVICE
            break;
    }
}
Пример #2
0
void alc_qsa_deinit(void)
{
#define FREE_NAME(iter) free((iter)->name)
    VECTOR_FOR_EACH(DevMap, DeviceNameMap, FREE_NAME);
    VECTOR_DEINIT(DeviceNameMap);

    VECTOR_FOR_EACH(DevMap, CaptureNameMap, FREE_NAME);
    VECTOR_DEINIT(CaptureNameMap);
#undef FREE_NAME
}
Пример #3
0
static void clear_devlist(vector_DevMap *list)
{
#define DEINIT_STR(i) AL_STRING_DEINIT((i)->name)
    VECTOR_FOR_EACH(DevMap, *list, DEINIT_STR);
    VECTOR_RESIZE(*list, 0, 0);
#undef DEINIT_STR
}
Пример #4
0
static void clear_devlist(vector_DevMap *devlist)
{
#define FREE_DEV(i) do {                                                      \
    AL_STRING_DEINIT((i)->name);                                              \
    AL_STRING_DEINIT((i)->device_name);                                       \
} while(0)
    VECTOR_FOR_EACH(DevMap, *devlist, FREE_DEV);
    VECTOR_RESIZE(*devlist, 0);
#undef FREE_DEV
}
Пример #5
0
static void clear_devlist(vector_al_string *list)
{
    VECTOR_FOR_EACH(al_string, *list, al_string_deinit);
    VECTOR_RESIZE(*list, 0);
}