/** * @alsymbols * @alcfunref{MakeContextCurrent} * @alcfunref{DestroyContext} */ ~Context(void) { if(_context) { OALPLUS_ALCFUNC(MakeContextCurrent)(nullptr); OALPLUS_ALCFUNC(DestroyContext)(_context); } }
/** * @alsymbols * @alcfunref{CloseDevice} */ ~Device(void) { if(_device) { OALPLUS_ALCFUNC(CloseDevice)(_device); } }
/** * @alsymbols * @alcfunref{CreateContext} */ Context(const Device& device) : ContextOps( device._device, OALPLUS_ALCFUNC(CreateContext)(device._device, nullptr) ) { OALPLUS_CHECK_SIMPLE_ALC(_device, CreateContext); }
/** * @alsymbols * @alcfunref{GetString} * @alcdefref{DEVICE_SPECIFIER} */ static DeviceSpecRange Specifiers(void) { const ALchar* ptr = OALPLUS_ALCFUNC(GetString)( nullptr, ALC_DEVICE_SPECIFIER ); return DeviceSpecRange(ptr); }
/** * @alsymbols * @alcfunref{CreateContext} */ Context( const Device& device, const FinishedContextAttribs& attribs ): ContextOps( device._device, OALPLUS_ALCFUNC(CreateContext)( device._device, attribs.Get() ) ) { OALPLUS_CHECK_SIMPLE_ALC(_device, CreateContext); }
/** * @alsymbols * @alcfunref{SuspendContext} */ void Suspend(void) { OALPLUS_ALCFUNC(SuspendContext)(_context); OALPLUS_VERIFY_SIMPLE_ALC(_device, SuspendContext); }
/** * @alsymbols * @alcfunref{ProcessContext} */ void Process(void) { OALPLUS_ALCFUNC(ProcessContext)(_context); OALPLUS_VERIFY_SIMPLE_ALC(_device, ProcessContext); }
/** * @alsymbols * @alcfunref{MakeContextCurrent} */ bool MakeCurrent(void) { bool result = OALPLUS_ALCFUNC(MakeContextCurrent)(_context); OALPLUS_VERIFY_SIMPLE_ALC(_device, MakeContextCurrent); return result; }
/** * @alsymbols * @alcfunref{OpenDevice} */ Device(const ALchar* dev_spec) : DeviceOps(OALPLUS_ALCFUNC(OpenDevice)(dev_spec)) { OALPLUS_CHECK_SIMPLE_ALC(_device,OpenDevice); }
/** * @alsymbols * @alcfunref{OpenDevice} */ Device(void) : DeviceOps(OALPLUS_ALCFUNC(OpenDevice)(nullptr)) { OALPLUS_CHECK_SIMPLE_ALC(_device,OpenDevice); }