packages feed

hosc 0.7 → 0.8

raw patch · 4 files changed

+33/−8 lines, 4 filesdep ~arraydep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: array, base

API changes (from Hackage documentation)

+ Sound.OpenSoundControl.Time: immediately :: Time
- Sound.OpenSoundControl.Transport: close :: (Transport t) => t -> IO ()
+ Sound.OpenSoundControl.Transport: close :: Transport t => t -> IO ()
- Sound.OpenSoundControl.Transport: recv :: (Transport t) => t -> IO OSC
+ Sound.OpenSoundControl.Transport: recv :: Transport t => t -> IO OSC
- Sound.OpenSoundControl.Transport: send :: (Transport t) => t -> OSC -> IO ()
+ Sound.OpenSoundControl.Transport: send :: Transport t => t -> OSC -> IO ()
- Sound.OpenSoundControl.Transport: wait :: (Transport t) => t -> String -> IO OSC
+ Sound.OpenSoundControl.Transport: wait :: Transport t => t -> String -> IO OSC
- Sound.OpenSoundControl.Transport: waitFor :: (Transport t) => t -> (OSC -> Maybe a) -> IO a
+ Sound.OpenSoundControl.Transport: waitFor :: Transport t => t -> (OSC -> Maybe a) -> IO a
- Sound.OpenSoundControl.Transport: withTransport :: (Transport t) => IO t -> (t -> IO a) -> IO a
+ Sound.OpenSoundControl.Transport: withTransport :: Transport t => IO t -> (t -> IO a) -> IO a
- Sound.OpenSoundControl.Transport.UDP: udpPort :: (Integral n) => UDP -> IO n
+ Sound.OpenSoundControl.Transport.UDP: udpPort :: Integral n => UDP -> IO n

Files

+ Help/timer.hs view
@@ -0,0 +1,17 @@+-- hosc does not directly support a timeout at recv, however the+-- standard libraries have the 'System.Timeout.timeout' function that+-- works for interupting socket reads.++import Sound.OpenSoundControl+import qualified System.Timeout as T++timeout :: Double -> IO a -> IO (Maybe a)+timeout t =+    let i = floor (t * 1000000)+    in T.timeout i++main :: IO ()+main = do+  fd <- openUDP "127.0.0.1" 57110+  r <- timeout 0.5 (recv fd)+  print r
README view
@@ -4,11 +4,11 @@ module implementing a subset of the Open Sound Control byte protocol. -  http://slavepianos.org/rd/f/269573/+  http://slavepianos.org/rd/?t=hosc   http://haskell.org/   http://opensoundcontrol.org/ -(c) rohan drape, 2006-2008+(c) rohan drape and others, 2006-2010     gpl, http://gnu.org/copyleft/     with contributions by alex mclean     see darcs history for details
Sound/OpenSoundControl/Time.hs view
@@ -73,3 +73,7 @@ -- | Pause current thread until the given utcr time. pauseThreadUntil :: Double -> IO () pauseThreadUntil t = pauseThread . (t -) =<< utcr++-- | Execute the bundle immediately.+immediately :: Time+immediately = NTPi 1
hosc.cabal view
@@ -1,24 +1,25 @@ Name:              hosc-Version:           0.7+Version:           0.8 Synopsis:          Haskell Open Sound Control Description:       hosc provides Sound.OpenSoundControl, a haskell                    module implementing a subset of the Open Sound                    Control byte protocol. License:           GPL Category:          Sound-Copyright:         (c) Rohan Drape, 2006-2009+Copyright:         (c) Rohan Drape, 2006-2010 Author:            Rohan Drape Maintainer:        rd@slavepianos.org Stability:         Experimental-Homepage:          http://slavepianos.org/rd/f/269573/-Tested-With:       GHC == 6.8.2+Homepage:          http://slavepianos.org/rd/?t=hosc+Tested-With:       GHC == 6.10.3 Build-Type:        Simple Cabal-Version:     >= 1.6 Data-Files:        README+                   Help/timer.hs  Library   Build-Depends:   array,-                   base == 3.*,+                   base == 4.*,                    bytestring,                    binary,                    network,@@ -33,4 +34,7 @@                    Sound.OpenSoundControl.Transport                    Sound.OpenSoundControl.Transport.TCP                    Sound.OpenSoundControl.Transport.UDP-  Other-modules:++Source-Repository  head+  Type:            darcs+  Location:        http://slavepianos.org/~rd/sw/hosc/