RtMidi 0.6.0.0 → 0.6.1.0
raw patch · 2 files changed
+8/−3 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Sound.RtMidi: sendUnsafeMessage :: OutputDevice -> Ptr Word8 -> Int -> IO ()
Files
- RtMidi.cabal +1/−1
- Sound/RtMidi.hs +7/−2
RtMidi.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: RtMidi-version: 0.6.0.0+version: 0.6.1.0 synopsis: Haskell wrapper for RtMidi, the lightweight, cross-platform MIDI I/O library. description: Please see the README on GitHub at <https://github.com/riottracker/RtMidi#readme> category: Sound
Sound/RtMidi.hs view
@@ -34,6 +34,7 @@ , defaultOutput , createOutput , sendMessage+ , sendUnsafeMessage , currentApi ) where@@ -388,8 +389,12 @@ -- | Immediately send a single message out an open MIDI output port. sendMessage :: OutputDevice -> VS.Vector Word8 -> IO ()-sendMessage d buf = VS.unsafeWith buf $ \m -> withDevicePtr d $ \dptr ->- void (rtmidi_out_send_message dptr (coerce m) (fromIntegral (VS.length buf)))+sendMessage d buf = VS.unsafeWith buf (\ptr -> sendUnsafeMessage d ptr (VS.length buf))++-- | A variant of 'sendMessage' that allows reading directly from pinned memory.+sendUnsafeMessage :: OutputDevice -> Ptr Word8 -> Int -> IO ()+sendUnsafeMessage d ptr size =+ withDevicePtr d $ \dptr -> void (rtmidi_out_send_message dptr (coerce ptr) (fromIntegral size)) -- | Returns the specifier for the MIDI 'Api' in use currentApi :: IsDevice d => d -> IO Api