packages feed

bindings-fluidsynth (empty) → 0.1.1

raw patch · 4 files changed

+105/−0 lines, 4 filesdep +basedep +bindings-DSLsetup-changed

Dependencies added: base, bindings-DSL

Files

+ LICENSE view
@@ -0,0 +1,30 @@+Copyright (c) 2015, Ben Gamari++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++    * Redistributions of source code must retain the above copyright+      notice, this list of conditions and the following disclaimer.++    * Redistributions in binary form must reproduce the above+      copyright notice, this list of conditions and the following+      disclaimer in the documentation and/or other materials provided+      with the distribution.++    * Neither the name of Ben Gamari nor the names of other+      contributors may be used to endorse or promote products derived+      from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ bindings-fluidsynth.cabal view
@@ -0,0 +1,28 @@+name:                bindings-fluidsynth+version:             0.1.1+synopsis:            Haskell FFI bindings for fluidsynth software synthesizer+description:         Haskell FFI bindings for fluidsynth software synthesizer+homepage:            http://github.com/bgamari/bindings-fluidsynth+license:             BSD3+license-file:        LICENSE+author:              Ben Gamari+maintainer:          ben@smart-cactus.org+copyright:           (c) 2015 Ben Gamari+category:            Sound+build-type:          Simple+cabal-version:       >=1.10++source-repository head+  type:                git+  location:            git://github.com/bgamari/bindings-fluidsynth++library+  exposed-modules:     Bindings.FluidSynth+  build-depends:       base >=4.8 && <4.9,+                       bindings-DSL >= 1.0.16 && < 1.1  +  hs-source-dirs:      src+  build-tools:         hsc2hs+  default-language:    Haskell2010+  default-extensions:  ForeignFunctionInterface+  pkgconfig-depends:+    fluidsynth >= 1.1.6
+ src/Bindings/FluidSynth.hsc view
@@ -0,0 +1,45 @@+#include <fluidsynth.h>+#include <bindings.dsl.h>++module Bindings.FluidSynth where+#strict_import++#opaque_t fluid_settings_t+#opaque_t fluid_synth_t+#opaque_t fluid_audio_driver_t++-- * Settings+#ccall new_fluid_settings , IO (Ptr <fluid_settings_t>)+#ccall delete_fluid_settings , Ptr <fluid_settings_t> -> IO ()+#ccall fluid_settings_setstr , Ptr <fluid_settings_t> -> CString -> CString -> IO CInt+#ccall fluid_settings_setint , Ptr <fluid_settings_t> -> CString -> CInt -> IO CInt+#ccall fluid_settings_setnum , Ptr <fluid_settings_t> -> CString -> CDouble -> IO CInt++#ccall new_fluid_synth , Ptr <fluid_settings_t> -> IO (Ptr <fluid_synth_t>)+#ccall delete_fluid_synth , Ptr <fluid_synth_t> -> IO ()++#ccall new_fluid_audio_driver , Ptr <fluid_settings_t> -> Ptr <fluid_synth_t> -> IO (Ptr <fluid_audio_driver_t>)+#ccall delete_fluid_audio_driver, Ptr <fluid_audio_driver_t> -> IO ()++-- * SoundFont loading+#ccall fluid_synth_sfload , Ptr <fluid_synth_t> -> CString -> CInt -> IO CInt+#ccall fluid_synth_sfreload , Ptr <fluid_synth_t> -> CUInt -> IO CInt+#ccall fluid_synth_sfunload , Ptr <fluid_synth_t> -> CInt -> CUInt -> IO CInt++-- * Playing notes+#ccall fluid_synth_noteon , Ptr <fluid_synth_t> -> CInt -> CInt -> CInt -> IO CInt+#ccall fluid_synth_noteoff , Ptr <fluid_synth_t> -> CInt -> CInt -> IO CInt+#ccall fluid_synth_pitch_bend , Ptr <fluid_synth_t> -> CInt -> CInt -> IO CInt++-- * Logging+#num FLUID_PANIC+#num FLUID_ERR+#num FLUID_WARN+#num FLUID_DBG+type FluidLogFn = CInt -> CString -> Ptr () -> IO ()+#ccall fluid_set_log_function , CInt -> Ptr FluidLogFn -> Ptr () -> IO (Ptr FluidLogFn)+#ccall fluid_default_log_function , FluidLogFn++-- * Error codes+#num FLUID_FAILED+#num FLUID_OK