]> gitweb.factorcode.org Git - factor.git/commitdiff
add DESTRUCTOR:s for alcCloseDevice and alcDestroyContext
authorJoe Groff <arcata@gmail.com>
Tue, 19 Jan 2010 18:28:36 +0000 (10:28 -0800)
committerJoe Groff <arcata@gmail.com>
Tue, 19 Jan 2010 18:28:36 +0000 (10:28 -0800)
extra/openal/openal.factor

index 241c9b304ebed9f984df950e69c1d560f761d967..85b150ce09d584d29e2b6469db8a134705846ad5 100644 (file)
@@ -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