pulseaudio 0.0.1.0 → 0.0.1.1
raw patch · 5 files changed
+12/−12 lines, 5 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Sound.Pulse.Context: connectContext :: Context -> Maybe String -> [ContextFlags] -> IO ()
+ Sound.Pulse.Context: connectContext :: Context -> Maybe String -> [ContextFlags] -> IO (Maybe Int)
- Sound.Pulse.Mainloop.Simple: doLoop :: MainloopImpl -> IO ()
+ Sound.Pulse.Mainloop.Simple: doLoop :: MainloopImpl -> IO Int
Files
- bin/Test.hs +0/−1
- pulseaudio.cabal +3/−3
- src/Sound/Pulse/Context.hs +3/−3
- src/Sound/Pulse/Mainloop/Simple.hs +5/−4
- src/Sound/Pulse/Subscribe.hs +1/−1
bin/Test.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE ForeignFunctionInterface #-} import Sound.Pulse.Context import Sound.Pulse.Mainloop.Simple
pulseaudio.cabal view
@@ -10,7 +10,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.0.1.0+version: 0.0.1.1 -- A short (one-line) description of the package. synopsis: A low-level (incomplete) wrapper around the pulseaudio client asynchronous api@@ -91,8 +91,6 @@ ghc-options: -Wall - extra-libraries: pulse- library -- Modules exported by the library. exposed-modules: Sound.Pulse.Context@@ -132,3 +130,5 @@ default-language: Haskell2010 ghc-options: -Wall+ extra-libraries: pulse+
src/Sound/Pulse/Context.hs view
@@ -105,13 +105,13 @@ -> Maybe String -- ^The server to connect to. If this is Nothing, connect to the default server. -> [ContextFlags] -- ^Flags to control the startup behaviour of the server. -- -> SpawnApi! -- TODO- -> IO ()+ -> IO (Maybe Int) connectContext cxt serv flags = do let wrapper = maybe ($ nullPtr) (withCString) serv ret <- wrapper (\ptr -> pa_context_connect cxt ptr (contextFlagssToInt flags) nullPtr) if ret /= 0- then error ("Failed to connect to server :( " ++ show ret)- else return ()+ then Just <$> getContextErr cxt+ else return Nothing -- |This callback is leaked! if it's reset -- IMO the handler should stay forever aswell (even if just for loggin), so don't worry about it.
src/Sound/Pulse/Mainloop/Simple.hs view
@@ -243,12 +243,12 @@ mapM_ deferCallback actives -- |Loop in the pulse main loop until eternety-doLoop :: MainloopImpl -> IO ()+doLoop :: MainloopImpl -> IO Int doLoop impl = do doIteration impl cont <- readIORef $ implRunning impl if isJust cont- then putStrLn ("Ending Simpleloop: " ++ show cont)+ then return (fromJust cont) else doLoop impl @@ -368,5 +368,6 @@ deferSetDestroy (PADeferEvent x) = atomicWriteIORef (deferDestroy x) quitLoop :: MainloopImpl -> Int -> IO ()- quitLoop impl = atomicWriteIORef (implRunning impl) . Just-+ quitLoop impl val = do+ atomicWriteIORef (implRunning impl) $ Just val+ wakeImpl impl
src/Sound/Pulse/Subscribe.hs view
@@ -80,5 +80,5 @@ funP <- mkSubscribeCB $ \_ ival idx _ -> fun (subscriptionEventFromInt ival) (fromIntegral idx) pa_context_set_subscribe_callback cxt funP nullPtr- sucP <- wrapSuccess (\b -> putStrLn ("Subscription success: " ++ show b))+ sucP <- wrapSuccess (\_ -> return ()) ptrToOperation =<< pa_context_subscribe cxt (subscriptionMasksToInt mask) sucP nullPtr