-- GENERATED by C->Haskell Compiler, version 0.16.3 Crystal Seed, 24 Jan 2009 (Haskell) -- Edit the ORIGNAL .chs file instead! {-# LINE 1 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-}{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE TypeSynonymInstances #-} -- This source file is part of HGamer3D -- (A project to enable 3D game development in Haskell) -- For the latest info, see http://www.althainz.de/HGamer3D.html -- -- (c) 2011 Peter Althainz -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- ClassIAudioCapture.chs -- -- -- -- -- File for type, method, enum or function stubs -- in: "Dep-cAudio/cAudio/include\IAudioCapture.h" -- -- each stub combines the following files: -- a C++ implementation file, transforming cpp calls into C-functions -- a C-header file, making this C-functions available for the C2HS parser -- a chs file, give instructions to the C2HS parser. -- -- module HGamer3D.Bindings.CAudio.ClassIAudioCapture where import C2HS import Foreign import Foreign.Ptr import Foreign.C import Monad (liftM, liftM2) import HGamer3D.Data.HG3DClass import HGamer3D.Data.Vector2 import HGamer3D.Data.Vector3 import HGamer3D.Data.Vector4 import HGamer3D.Data.Quaternion import HGamer3D.Data.Colour import HGamer3D.Data.Angle import HGamer3D.Bindings.CAudio.TypeHG3DClass {-# LINE 52 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} import HGamer3D.Bindings.CAudio.ClassPtr {-# LINE 53 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} import HGamer3D.Bindings.CAudio.Utils {-# LINE 54 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} import HGamer3D.Bindings.CAudio.EnumAudioFormats {-# LINE 55 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} cIAcInitialize :: HG3DClass -> String -> Int -> EnumAudioFormats -> Int -> IO (Bool) cIAcInitialize a1 a2 a3 a4 a5 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> let {a3' = fromIntegral a3} in let {a4' = cIntFromEnum a4} in let {a5' = fromIntegral a5} in alloca $ \a6' -> cIAcInitialize'_ a1' a2' a3' a4' a5' a6' >>= \res -> peekBoolUtil a6'>>= \a6'' -> return (a6'') {-# LINE 65 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} ; cIAcIsReady :: HG3DClass -> IO (Bool) cIAcIsReady a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> cIAcIsReady'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 69 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} ; cIAcUpdateCaptureBuffer :: HG3DClass -> Bool -> IO () cIAcUpdateCaptureBuffer a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in cIAcUpdateCaptureBuffer'_ a1' a2' >>= \res -> return () {-# LINE 73 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} ; cIAcShutdown :: HG3DClass -> IO () cIAcShutdown a1 = withHG3DClass a1 $ \a1' -> cIAcShutdown'_ a1' >>= \res -> return () {-# LINE 76 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} ; cIAcIsUpdateThreadRunning :: HG3DClass -> IO (Bool) cIAcIsUpdateThreadRunning a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> cIAcIsUpdateThreadRunning'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 80 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} ; cIAcGetDeviceName :: HG3DClass -> IO (String) cIAcGetDeviceName a1 = withHG3DClass a1 $ \a1' -> alloc64k $ \a2' -> cIAcGetDeviceName'_ a1' a2' >>= \res -> peekCString a2'>>= \a2'' -> return (a2'') {-# LINE 84 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} ; cIAcGetFrequency :: HG3DClass -> IO (Int) cIAcGetFrequency a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> cIAcGetFrequency'_ a1' a2' >>= \res -> peekIntConv a2'>>= \a2'' -> return (a2'') {-# LINE 88 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} ; cIAcGetFormat :: HG3DClass -> IO (EnumAudioFormats) cIAcGetFormat a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> cIAcGetFormat'_ a1' a2' >>= \res -> peekEnumUtil a2'>>= \a2'' -> return (a2'') {-# LINE 92 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} ; cIAcGetInternalBufferSize :: HG3DClass -> IO (Int) cIAcGetInternalBufferSize a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> cIAcGetInternalBufferSize'_ a1' a2' >>= \res -> peekIntConv a2'>>= \a2'' -> return (a2'') {-# LINE 96 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} ; cIAcGetSampleSize :: HG3DClass -> IO (Int) cIAcGetSampleSize a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> cIAcGetSampleSize'_ a1' a2' >>= \res -> peekIntConv a2'>>= \a2'' -> return (a2'') {-# LINE 100 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} ; cIAcSetDevice :: HG3DClass -> String -> IO (Bool) cIAcSetDevice a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> alloca $ \a3' -> cIAcSetDevice'_ a1' a2' a3' >>= \res -> peekBoolUtil a3'>>= \a3'' -> return (a3'') {-# LINE 105 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} ; cIAcSetFrequency :: HG3DClass -> Int -> IO (Bool) cIAcSetFrequency a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromIntegral a2} in alloca $ \a3' -> cIAcSetFrequency'_ a1' a2' a3' >>= \res -> peekBoolUtil a3'>>= \a3'' -> return (a3'') {-# LINE 110 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} ; cIAcSetFormat :: HG3DClass -> EnumAudioFormats -> IO (Bool) cIAcSetFormat a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = cIntFromEnum a2} in alloca $ \a3' -> cIAcSetFormat'_ a1' a2' a3' >>= \res -> peekBoolUtil a3'>>= \a3'' -> return (a3'') {-# LINE 115 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} ; cIAcSetInternalBufferSize :: HG3DClass -> Int -> IO (Bool) cIAcSetInternalBufferSize a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromIntegral a2} in alloca $ \a3' -> cIAcSetInternalBufferSize'_ a1' a2' a3' >>= \res -> peekBoolUtil a3'>>= \a3'' -> return (a3'') {-# LINE 120 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} ; cIAcBeginCapture :: HG3DClass -> IO (Bool) cIAcBeginCapture a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> cIAcBeginCapture'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 124 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} ; cIAcStopCapture :: HG3DClass -> IO () cIAcStopCapture a1 = withHG3DClass a1 $ \a1' -> cIAcStopCapture'_ a1' >>= \res -> return () {-# LINE 127 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} ; cIAcGetCurrentCapturedAudioSize :: HG3DClass -> IO (Int) cIAcGetCurrentCapturedAudioSize a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> cIAcGetCurrentCapturedAudioSize'_ a1' a2' >>= \res -> peekIntConv a2'>>= \a2'' -> return (a2'') {-# LINE 131 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} ; cIAcUnRegisterAllEventHandlers :: HG3DClass -> IO () cIAcUnRegisterAllEventHandlers a1 = withHG3DClass a1 $ \a1' -> cIAcUnRegisterAllEventHandlers'_ a1' >>= \res -> return () {-# LINE 134 "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs" #-} ; foreign import ccall safe "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs.h cIAc_initialize_c" cIAcInitialize'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (CUInt -> (CInt -> (CUInt -> ((Ptr CInt) -> (IO ()))))))) foreign import ccall safe "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs.h cIAc_isReady_c" cIAcIsReady'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs.h cIAc_updateCaptureBuffer_c" cIAcUpdateCaptureBuffer'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs.h cIAc_shutdown_c" cIAcShutdown'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs.h cIAc_isUpdateThreadRunning_c" cIAcIsUpdateThreadRunning'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs.h cIAc_getDeviceName_c" cIAcGetDeviceName'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs.h cIAc_getFrequency_c" cIAcGetFrequency'_ :: ((HG3DClassPtr) -> ((Ptr CUInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs.h cIAc_getFormat_c" cIAcGetFormat'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs.h cIAc_getInternalBufferSize_c" cIAcGetInternalBufferSize'_ :: ((HG3DClassPtr) -> ((Ptr CUInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs.h cIAc_getSampleSize_c" cIAcGetSampleSize'_ :: ((HG3DClassPtr) -> ((Ptr CUInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs.h cIAc_setDevice_c" cIAcSetDevice'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((Ptr CInt) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs.h cIAc_setFrequency_c" cIAcSetFrequency'_ :: ((HG3DClassPtr) -> (CUInt -> ((Ptr CInt) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs.h cIAc_setFormat_c" cIAcSetFormat'_ :: ((HG3DClassPtr) -> (CInt -> ((Ptr CInt) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs.h cIAc_setInternalBufferSize_c" cIAcSetInternalBufferSize'_ :: ((HG3DClassPtr) -> (CUInt -> ((Ptr CInt) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs.h cIAc_beginCapture_c" cIAcBeginCapture'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs.h cIAc_stopCapture_c" cIAcStopCapture'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs.h cIAc_getCurrentCapturedAudioSize_c" cIAcGetCurrentCapturedAudioSize'_ :: ((HG3DClassPtr) -> ((Ptr CUInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CAudio\\ClassIAudioCapture.chs.h cIAc_unRegisterAllEventHandlers_c" cIAcUnRegisterAllEventHandlers'_ :: ((HG3DClassPtr) -> (IO ()))