SpiceClientGLib.Audio.new
Description: Reference for SpiceClientGLib.Audio.new

### Constructor

# SpiceClientGLib Audionew

deprecated: 0.8

#### Declaration [src]

    SpiceAudio*
    spice_audio_new (
      SpiceSession* session,
      GMainContext* context,
      const char* name
    )

#### Description [src]

Once instantiated, `SpiceAudio` will handle the playback and record channels to stream to your local audio system.

Deprecated since: 0.8

Use `spice_audio_get()` instead.

#### Parameters

`session`

  Type: `SpiceSession`

  The `SpiceSession` to connect to.

  The data is owned by the caller of the function.

`context`

  Type: `GMainContext`

  A `GMainContext` to attach to (or `NULL` for default).

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`name`

  Type: `const char*`

  A name for the audio channels (or `NULL` for application name).

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `SpiceAudio`

A new `SpiceAudio` instance or `NULL` if no backend or failed.

The caller of the function takes ownership of the data, and is responsible for freeing it.