BtAudioSession: Buzztrax Bt-Core Reference Manual

## BtAudioSession BtAudioSession — bin to be used by BtSinkMachine |

## Functions

BtAudioSession * | bt_audio_session_new ()

## Properties

gboolean | audio-locked | Read / Write
GstElement * | audio-sink | Read
gchar * | audio-sink-device | Read / Write
gchar * | audio-sink-name | Read / Write

## Types and Values

struct | BtAudioSession

## Object Hierarchy

        GObject
        ╰── BtAudioSession

## Includes

    #include <libbtcore/core.h>

## Description

The audio-session provides a persistent audio-sink for some classes. This e.g. ensures a persistent presence in qjackctrl if jackaudiosink is used.

The top BtApplication should create one and dispose it at the end of the lifecycle. The audio-session is a singleton, parts in the code can just call `bt_audio_session_new()` to get the instance.

## Functions

### bt_audio_session_new ()

    BtAudioSession *
    bt_audio_session_new (void);

Create a new audio-session or return the existing one. The audio session keeps the audio setup alive across songs. An application can only have one audio-session. This method can be called several times though.

#### Returns

the audio-session, unref when done.

## Types and Values

### struct BtAudioSession

    struct BtAudioSession;

Maintains the audio connection for the life time of the application.

## Property Details

### The `“audio-locked”` property

      “audio-locked”             gboolean

locked state for the audio-sink.

Flags: Read / Write

Default value: FALSE

### The `“audio-sink”` property

      “audio-sink”               GstElement *

the audio-sink for the session.

Flags: Read

### The `“audio-sink-device”` property

      “audio-sink-device”        gchar *

The name of the audio sink device.

Flags: Read / Write

Default value: NULL

### The `“audio-sink-name”` property

      “audio-sink-name”          gchar *

The name of the audio sink factory.

Flags: Read / Write

Default value: NULL