From 5f8755a30c20fcf66bc008b5705c9bda91a7bb4a Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Tue, 19 Jan 2010 10:28:36 -0800 Subject: [PATCH] add DESTRUCTOR:s for alcCloseDevice and alcDestroyContext --- extra/openal/openal.factor | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/extra/openal/openal.factor b/extra/openal/openal.factor index 241c9b304e..85b150ce09 100644 --- a/extra/openal/openal.factor +++ b/extra/openal/openal.factor @@ -3,7 +3,7 @@ USING: kernel accessors arrays alien system combinators alien.syntax namespaces alien.c-types sequences vocabs.loader shuffle openal.backend alien.libraries generalizations -specialized-arrays ; +specialized-arrays alien.destructors ; FROM: alien.c-types => float short ; SPECIALIZED-ARRAY: uint IN: openal @@ -226,6 +226,9 @@ CONSTANT: ALC_CAPTURE_SAMPLES HEX: 312 FUNCTION: ALCdevice* alcOpenDevice ( ALCchar* deviceSpecifier ) ; FUNCTION: ALCboolean alcCloseDevice ( ALCdevice* deviceHandle ) ; +: alcCloseDevice* ( deviceHandle -- ) + alcCloseDevice drop ; + FUNCTION: ALCcontext* alcCreateContext ( ALCdevice* deviceHandle, ALCint* attrList ) ; FUNCTION: ALCboolean alcMakeContextCurrent ( ALCcontext* context ) ; FUNCTION: void alcProcessContext ( ALCcontext* context ) ; @@ -246,6 +249,9 @@ FUNCTION: void alcCaptureStart ( ALCdevice* device ) ; FUNCTION: void alcCaptureStop ( ALCdevice* device ) ; FUNCTION: void alcCaptureSamples ( ALCdevice* device, void* buf, ALCsizei samps ) ; +DESTRUCTOR: alcCloseDevice* +DESTRUCTOR: alcDestroyContext + LIBRARY: alut CONSTANT: ALUT_API_MAJOR_VERSION 1