## BtSinkBin

BtSinkBin — bin to be used by BtSinkMachine

## Synopsis

    #include <libbtcore/core.h>

    struct              BtSinkBin;
    enum                BtSinkBinMode;
    enum                BtSinkBinRecordFormat;

## Object Hierarchy

      GObject
       +----GstObject
             +----GstElement
                   +----GstBin
                         +----BtSinkBin

## Implemented Interfaces

BtSinkBin implements GstChildProxy and GstBtTempo.

## Properties

      "analyzers"                gpointer              : Read / Write
      "input-gain"               GstElement*           : Read / Write
      "master-volume"            gdouble               : Read / Write
      "mode"                     BtSinkBinMode         : Read / Write
      "record-file-name"         gchar*                : Read / Write
      "record-format"            BtSinkBinRecordFormat  : Read / Write

## Description

The sink-bin provides switchable play and record facillities. It also provides controlable master-volume.

In play and record modes it plugs a chain of elements. In combined play and record mode it uses a tee and plugs both pipleines.

## Details

### struct BtSinkBin

    struct BtSinkBin;

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

### enum BtSinkBinMode

    typedef enum {
      BT_SINK_BIN_MODE_PLAY=0,
      BT_SINK_BIN_MODE_RECORD,
      BT_SINK_BIN_MODE_PLAY_AND_RECORD,
      BT_SINK_BIN_MODE_PASS_THRU
    } BtSinkBinMode;

BtSinkMachine supports several modes of operation. Playing is the default mode. Passthru is only needed if the song is plugged in another pipeline.

`BT_SINK_BIN_MODE_PLAY` | play the song
`BT_SINK_BIN_MODE_RECORD` | record to file
`BT_SINK_BIN_MODE_PLAY_AND_RECORD` | play and record together
`BT_SINK_BIN_MODE_PASS_THRU` | output audio on sometimes src pad

### enum BtSinkBinRecordFormat

    typedef enum {
      BT_SINK_BIN_RECORD_FORMAT_OGG_VORBIS=0,
      BT_SINK_BIN_RECORD_FORMAT_MP3,
      BT_SINK_BIN_RECORD_FORMAT_WAV,
      BT_SINK_BIN_RECORD_FORMAT_OGG_FLAC,
      BT_SINK_BIN_RECORD_FORMAT_MP4_AAC,
      BT_SINK_BIN_RECORD_FORMAT_RAW
    } BtSinkBinRecordFormat;

BtSinkMachine can record audio in several formats.

`BT_SINK_BIN_RECORD_FORMAT_OGG_VORBIS` | ogg vorbis
`BT_SINK_BIN_RECORD_FORMAT_MP3` | mp3
`BT_SINK_BIN_RECORD_FORMAT_WAV` | wav
`BT_SINK_BIN_RECORD_FORMAT_OGG_FLAC` | ogg flac
`BT_SINK_BIN_RECORD_FORMAT_MP4_AAC` | mp4 aac
`BT_SINK_BIN_RECORD_FORMAT_RAW` | raw

## Property Details

### The `"analyzers"` property

      "analyzers"                gpointer              : Read / Write

list of master analyzers.

### The `"input-gain"` property

      "input-gain"               GstElement*           : Read / Write

the input-gain element, if any.

### The `"master-volume"` property

      "master-volume"            gdouble               : Read / Write

master volume for the song.

Allowed values: [0,1]

Default value: 1

### The `"mode"` property

      "mode"                     BtSinkBinMode         : Read / Write

mode of operation.

Default value: BT_SINK_BIN_MODE_PLAY

### The `"record-file-name"` property

      "record-file-name"         gchar*                : Read / Write

the file-name to use for recording.

Default value: NULL

### The `"record-format"` property

      "record-format"            BtSinkBinRecordFormat  : Read / Write

format to use when in record mode.

Default value: .ogg