Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
This is the most simple base class for audio sources that only requires subclasses to implement a set of simple functions:
open()
:Open the device.prepare()
:Configure the device with the specified format.read()
:Read samples from the device.reset()
:Unblock reads and flush the device.delay()
:Get the number of samples in the device but not yet read.unprepare()
:Undo operations done by prepare.close()
:Close the device.
All scheduling of samples and timestamps is done in this base class
together with AudioBaseSrc
using a default implementation of a
AudioRingBuffer
that uses threads.
Synopsis
- newtype AudioSrc = AudioSrc (ManagedPtr AudioSrc)
- class (GObject o, IsDescendantOf AudioSrc o) => IsAudioSrc o
- toAudioSrc :: (MonadIO m, IsAudioSrc o) => o -> m AudioSrc
- noAudioSrc :: Maybe AudioSrc
Exported types
Memory-managed wrapper type.
Instances
GObject AudioSrc Source # | |
Defined in GI.GstAudio.Objects.AudioSrc gobjectType :: IO GType | |
HasParentTypes AudioSrc Source # | |
Defined in GI.GstAudio.Objects.AudioSrc | |
type ParentTypes AudioSrc Source # | |
Defined in GI.GstAudio.Objects.AudioSrc type ParentTypes AudioSrc = AudioBaseSrc ': (PushSrc ': (BaseSrc ': (Element ': (Object ': (Object ': ([] :: [Type])))))) |
class (GObject o, IsDescendantOf AudioSrc o) => IsAudioSrc o Source #
Type class for types which can be safely cast to AudioSrc
, for instance with toAudioSrc
.
Instances
(GObject o, IsDescendantOf AudioSrc o) => IsAudioSrc o Source # | |
Defined in GI.GstAudio.Objects.AudioSrc |
toAudioSrc :: (MonadIO m, IsAudioSrc o) => o -> m AudioSrc Source #