예제 #1
0
파일: qsa.c 프로젝트: Sponk/NeoEditor
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
파일: qsa.c 프로젝트: Sponk/NeoEditor
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
파일: dsound.c 프로젝트: Azaezel/Torque3D
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
파일: alsa.c 프로젝트: ColdPie1/openal-soft
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);
}