All pastes #355278 Raw Edit

Untitled

public cpp v1 · immutable
·published 2007-02-14 11:36 UTC
rendered paste body
	if ((pDeviceList) && (pDeviceList->GetNumDevices()))	{		ALFWprintf("\nSelect OpenAL Device:\n");		for (i = 0; i < pDeviceList->GetNumDevices(); i++) 		ALFWprintf("%d. %s%s\n", i + 1, pDeviceList->GetDeviceName(i), i == pDeviceList->GetDefaultDevice() ? "(DEFAULT)" : "");			do {			ALchar ch = _getch();			i = atoi(&ch);		} while ((i < 1) || (i > pDeviceList->GetNumDevices()));		pDevice = alcOpenDevice(pDeviceList->GetDeviceName(i - 1));		if (pDevice)		{			pContext = alcCreateContext(pDevice, NULL);			if (pContext)			{				ALFWprintf("\nOpened %s Device\n", alcGetString(pDevice, ALC_DEVICE_SPECIFIER));				alcMakeContextCurrent(pContext);				bReturn = AL_TRUE;			}			else			{				alcCloseDevice(pDevice);			}		}		delete pDeviceList;	}	return bReturn;}