Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
GI.GstAudio.Objects.AudioSrc
Contents
Description
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 => IsAudioSrc o
- toAudioSrc :: (MonadIO m, IsAudioSrc o) => o -> m AudioSrc
- noAudioSrc :: Maybe AudioSrc
Exported types
Memory-managed wrapper type.
Constructors
AudioSrc (ManagedPtr AudioSrc) |
Instances
GObject AudioSrc Source # | |
Defined in GI.GstAudio.Objects.AudioSrc Methods gobjectType :: AudioSrc -> IO GType # | |
IsObject AudioSrc Source # | |
Defined in GI.GstAudio.Objects.AudioSrc | |
IsObject AudioSrc Source # | |
Defined in GI.GstAudio.Objects.AudioSrc | |
IsElement AudioSrc Source # | |
Defined in GI.GstAudio.Objects.AudioSrc | |
IsPushSrc AudioSrc Source # | |
Defined in GI.GstAudio.Objects.AudioSrc | |
IsBaseSrc AudioSrc Source # | |
Defined in GI.GstAudio.Objects.AudioSrc | |
IsAudioBaseSrc AudioSrc Source # | |
Defined in GI.GstAudio.Objects.AudioSrc | |
IsAudioSrc AudioSrc Source # | |
Defined in GI.GstAudio.Objects.AudioSrc |
class GObject o => IsAudioSrc o Source #
Type class for types which can be safely cast to AudioSrc
, for instance with toAudioSrc
.
Instances
(GObject a, (UnknownAncestorError AudioSrc a :: Constraint)) => IsAudioSrc a Source # | |
Defined in GI.GstAudio.Objects.AudioSrc | |
IsAudioSrc AudioSrc Source # | |
Defined in GI.GstAudio.Objects.AudioSrc |
toAudioSrc :: (MonadIO m, IsAudioSrc o) => o -> m AudioSrc Source #