BtSinkMachine

BtSinkMachine — class for signal processing machines with inputs only

Synopsis

#include <libbtcore/core.h>

                    BtSinkMachine;
enum                BtSinkMachinePatternIndex;
BtSinkMachine *     bt_sink_machine_new                 (const BtSong * const song,
                                                         const gchar * const id,
                                                         GError **err);

Object Hierarchy

  GObject
   +----GstObject
         +----GstElement
               +----GstBin
                     +----BtMachine
                           +----BtSinkMachine

Implemented Interfaces

BtSinkMachine implements GstChildProxy and BtPersistence.

Description

Sinks are machines that do playback or recording of the song. The sink-machine utilizes the BtSinkBin to transparently switch elements between record (encoding) and playback.

Details

BtSinkMachine

typedef struct _BtSinkMachine BtSinkMachine;

Sub-class of a BtMachine that implements a signal output (a machine with inputs only).


enum BtSinkMachinePatternIndex

typedef enum {
  BT_SINK_MACHINE_PATTERN_INDEX_BREAK=0,
  BT_SINK_MACHINE_PATTERN_INDEX_MUTE,
  BT_SINK_MACHINE_PATTERN_INDEX_OFFSET
} BtSinkMachinePatternIndex;

Use this with bt_machine_get_pattern_by_index() to get the command patterns.

BT_SINK_MACHINE_PATTERN_INDEX_BREAK

stop the pattern

BT_SINK_MACHINE_PATTERN_INDEX_MUTE

mute the machine

BT_SINK_MACHINE_PATTERN_INDEX_OFFSET

offset for real pattern ids

bt_sink_machine_new ()

BtSinkMachine *     bt_sink_machine_new                 (const BtSong * const song,
                                                         const gchar * const id,
                                                         GError **err);

Create a new instance. The machine is automaticly added to the setup from the given song object. You don't need to add the machine with bt_setup_add_machine(setup,BT_MACHINE(machine));. The element used for this machine is BtSinkBin which is configured according to the use-case (playback, recordfing). The playback device is taken from the BtSettings.

song :

the song the new instance belongs to

id :

the id, we can use to lookup the machine

err :

inform about failed instance creation

Returns :

the new instance or NULL in case of an error