## BtSettings

BtSettings — class for buzztrax settings handling

## Functions

gboolean | bt_settings_determine_audiosink_name ()
GHashTable * | bt_settings_parse_ic_playback_spec ()
gchar * | bt_settings_format_ic_playback_spec ()
BtSettings * | bt_settings_make ()

## Properties

gchar * | audiosink | Read / Write
gchar * | audiosink-device | Read / Write
guint | channels | Read / Write
gboolean | coherence-upnp-active | Read / Write
guint | coherence-upnp-port | Read / Write
gboolean | compact-theme | Read / Write
gboolean | dark-theme | Read / Write
gchar * | grid-density | Read / Write
gboolean | ic-playback-active | Read / Write
gchar * | ic-playback-spec | Read / Write
gboolean | jack-transport-master | Read / Write
gboolean | jack-transport-slave | Read / Write
guint | latency | Read / Write
gchar * | missing-machines | Read / Write
guint | news-seen | Read / Write
gchar * | presented-tips | Read / Write
gchar * | record-folder | Read / Write
gchar * | sample-folder | Read / Write
guint | sample-rate | Read / Write
gboolean | show-tips | Read / Write
gchar * | song-folder | Read / Write
gboolean | statusbar-hide | Read / Write
gchar * | system-audiosink | Read
gboolean | tabs-hide | Read / Write
gboolean | toolbar-hide | Read / Write
gchar * | toolbar-style | Read
gint | window-height | Read / Write
gint | window-width | Read / Write
gint | window-xpos | Read / Write
gint | window-ypos | Read / Write

## Types and Values

struct | BtSettings

## Object Hierarchy

        GObject
        ╰── BtSettings

## Includes

    #include <libbtcore/core.h>

## Description

Wraps the settings a GObject. Single settings are accessed via normal `g_object_get()` and `g_object_set()` calls. Changes in the settings will be notified to the application by the GObject::notify signal.

## Functions

### bt_settings_determine_audiosink_name ()

    gboolean
    bt_settings_determine_audiosink_name (const BtSettings * const self,
                                          gchar **element_name,
                                          gchar **device_name);

Check the settings for the configured audio sink. Pick a fallback if none has been chosen. Verify that the sink works.

Free the strings in the output variables, when done.

#### Parameters

self | the settings |
element_name | out variable for the element name |
device_name | out variable for the device property, if any |

#### Returns

`TRUE` if a audiosink has been found.

### bt_settings_parse_ic_playback_spec ()

    GHashTable *
    bt_settings_parse_ic_playback_spec (const gchar *spec);

Parses the string.

#### Parameters

spec | the spec string from the settings |

#### Returns

a hashtable with strings as keys and values.

[element-type utf8 utf8][transfer full]

### bt_settings_format_ic_playback_spec ()

    gchar *
    bt_settings_format_ic_playback_spec (GHashTable *ht);

Format the settings as a string.

#### Parameters

ht | the ht settings |

#### Returns

a string for storage.

### bt_settings_make ()

    BtSettings *
    bt_settings_make (void);

Create a new instance. The type of the settings depends on the subsystem found during configuration run.

Settings are implemented as a singleton. Thus the first invocation will create the object and further calls will just give back a reference.

#### Returns

the instance or `NULL` in case of an error.

[transfer full]

## Types and Values

### struct BtSettings

    struct BtSettings;

base object for a buzztrax based settings

## Property Details

### The `“audiosink”` property

      “audiosink”                gchar *

audio output gstreamer element.

Flags: Read / Write

Default value: NULL

### The `“audiosink-device”` property

      “audiosink-device”         gchar *

audio output device name.

Flags: Read / Write

Default value: NULL

### The `“channels”` property

      “channels”                 guint

number of audio output channels.

Flags: Read / Write

Allowed values: [1,2]

Default value: 2

### The `“coherence-upnp-active”` property

      “coherence-upnp-active”    gboolean

activate Coherence UPnP based playback controller.

Flags: Read / Write

Default value: FALSE

### The `“coherence-upnp-port”` property

      “coherence-upnp-port”      guint

the port number for the communication with the coherence backend.

Flags: Read / Write

Default value: 7654

### The `“compact-theme”` property

      “compact-theme”            gboolean

use dense theme variant for small screens.

Flags: Read / Write

Default value: FALSE

### The `“dark-theme”` property

      “dark-theme”               gboolean

use dark theme variant.

Flags: Read / Write

Default value: FALSE

### The `“grid-density”` property

      “grid-density”             gchar *

machine view grid detail level.

Flags: Read / Write

Default value: "low"

### The `“ic-playback-active”` property

      “ic-playback-active”       gboolean

activate interaction controller library based playback controller.

Flags: Read / Write

Default value: FALSE

### The `“ic-playback-spec”` property

      “ic-playback-spec”         gchar *

list of device and control names.

Flags: Read / Write

Default value: NULL

### The `“jack-transport-master”` property

      “jack-transport-master”    gboolean

sync other jack clients to buzztrax playback state.

Flags: Read / Write

Default value: FALSE

### The `“jack-transport-slave”` property

      “jack-transport-slave”     gboolean

sync buzztrax to the playback state other jack clients.

Flags: Read / Write

Default value: FALSE

### The `“latency”` property

      “latency”                  guint

target audio latency in ms.

Flags: Read / Write

Allowed values: [1,200]

Default value: 30

### The `“missing-machines”` property

      “missing-machines”         gchar *

list of tip-numbers that were shown already.

Flags: Read / Write

Default value: NULL

### The `“news-seen”` property

      “news-seen”                guint

version number for that the user has seen the news.

Flags: Read / Write

Default value: 0

### The `“presented-tips”` property

      “presented-tips”           gchar *

list of missing machines to ignore.

Flags: Read / Write

Default value: NULL

### The `“record-folder”` property

      “record-folder”            gchar *

default directory for recordings.

Flags: Read / Write

Default value: "/home/ensonic"

### The `“sample-folder”` property

      “sample-folder”            gchar *

default directory for sample-waveforms.

Flags: Read / Write

Default value: "/home/ensonic"

### The `“sample-rate”` property

      “sample-rate”              guint

audio output sample-rate.

Flags: Read / Write

Allowed values: [1,96000]

Default value: 44100

### The `“show-tips”` property

      “show-tips”                gboolean

show tips on startup.

Flags: Read / Write

Default value: TRUE

### The `“song-folder”` property

      “song-folder”              gchar *

default directory for songs.

Flags: Read / Write

Default value: "/home/ensonic"

### The `“statusbar-hide”` property

      “statusbar-hide”           gboolean

hide bottom statusbar.

Flags: Read / Write

Default value: FALSE

### The `“system-audiosink”` property

      “system-audiosink”         gchar *

system audio output gstreamer element.

Flags: Read

Default value: NULL

### The `“tabs-hide”` property

      “tabs-hide”                gboolean

hide main page tabs.

Flags: Read / Write

Default value: FALSE

### The `“toolbar-hide”` property

      “toolbar-hide”             gboolean

hide main toolbar.

Flags: Read / Write

Default value: FALSE

### The `“toolbar-style”` property

      “toolbar-style”            gchar *

system tolbar style.

Flags: Read

Default value: "both"

### The `“window-height”` property

      “window-height”            gint

last application window height.

Flags: Read / Write

Allowed values: >= -1

Default value: -1

### The `“window-width”` property

      “window-width”             gint

last application window width.

Flags: Read / Write

Allowed values: >= -1

Default value: -1

### The `“window-xpos”` property

      “window-xpos”              gint

last application window x-position.

Flags: Read / Write

Default value: 0

### The `“window-ypos”` property

      “window-ypos”              gint

last application window y-position.

Flags: Read / Write

Default value: 0