### Function

# SpiceClientGLib Audio get

#### Declaration [src]

    SpiceAudio*
    spice_audio_get (
      SpiceSession* session,
      GMainContext* context
    )

#### Description [src]

Gets the `SpiceAudio` associated with the passed in `SpiceSession`. A new `SpiceAudio` instance will be created the first time this function is called for a certain `SpiceSession`.

Note that this function returns a weak reference, which should not be used after the `SpiceSession` itself has been unref-ed by the caller.

#### 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.

#### Return value

Type: `SpiceAudio`

A weak reference to a `SpiceAudio` instance or `NULL` if failed.

The data is owned by the called function.