# Google Cloud Video Live Stream V1 Client - Class AudioMapping (1.4.0)

1.4.0 (latest) 1.3.2 1.2.1 1.1.3 1.0.0 0.7.5 0.6.2 0.5.0 0.4.2 0.3.2 0.2.6 Reference documentation and code samples for the Google Cloud Video Live Stream V1 Client class AudioMapping.

The mapping for the input streams and audio channels.

Generated from protobuf message `google.cloud.video.livestream.v1.AudioStream.AudioMapping`

## Namespace

Google \\ Cloud \\ Video \\ LiveStream \\ V1 \\ AudioStream

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ input_key` | `string` Required. The `Channel` [InputAttachment.key](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.InputAttachment#_Google_Cloud_Video_LiveStream_V1_InputAttachment__getKey__) that identifies the input that this audio mapping applies to. If an active input doesn't have an audio mapping, the primary audio track in the input stream will be selected. |
| `↳ input_track` | `int` Required. The zero-based index of the track in the input stream. All [mapping](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.AudioStream#_Google_Cloud_Video_LiveStream_V1_AudioStream__getMapping__)s in the same [AudioStream](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.AudioStream) must have the same input track. |
| `↳ input_channel` | `int` Required. The zero-based index of the channel in the input stream. |
| `↳ output_channel` | `int` Required. The zero-based index of the channel in the output audio stream. Must be consistent with the [input_channel](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.AudioStream.AudioMapping#_Google_Cloud_Video_LiveStream_V1_AudioStream_AudioMapping__getInputChannel__). |
| `↳ gain_db` | `float` Audio volume control in dB. Negative values decrease volume, positive values increase. The default is 0. |

### getInputKey

Required. The `Channel`
[InputAttachment.key](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.InputAttachment#_Google_Cloud_Video_LiveStream_V1_InputAttachment__getKey__)
that identifies the input that this audio mapping applies to. If an
active input doesn't have an audio mapping, the primary audio track in
the input stream will be selected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setInputKey

Required. The `Channel`
[InputAttachment.key](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.InputAttachment#_Google_Cloud_Video_LiveStream_V1_InputAttachment__getKey__)
that identifies the input that this audio mapping applies to. If an
active input doesn't have an audio mapping, the primary audio track in
the input stream will be selected.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getInputTrack

Required. The zero-based index of the track in the input stream.

All [mapping](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.AudioStream#_Google_Cloud_Video_LiveStream_V1_AudioStream__getMapping__)s in
the same [AudioStream](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.AudioStream) must
have the same input track.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setInputTrack

Required. The zero-based index of the track in the input stream.

All [mapping](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.AudioStream#_Google_Cloud_Video_LiveStream_V1_AudioStream__getMapping__)s in
the same [AudioStream](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.AudioStream) must
have the same input track.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getInputChannel

Required. The zero-based index of the channel in the input stream.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setInputChannel

Required. The zero-based index of the channel in the input stream.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getOutputChannel

Required. The zero-based index of the channel in the output audio stream.

Must be consistent with the
[input_channel](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.AudioStream.AudioMapping#_Google_Cloud_Video_LiveStream_V1_AudioStream_AudioMapping__getInputChannel__).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setOutputChannel

Required. The zero-based index of the channel in the output audio stream.

Must be consistent with the
[input_channel](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.AudioStream.AudioMapping#_Google_Cloud_Video_LiveStream_V1_AudioStream_AudioMapping__getInputChannel__).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getGainDb

Audio volume control in dB. Negative values decrease volume,
positive values increase. The default is 0.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setGainDb

Audio volume control in dB. Negative values decrease volume,
positive values increase. The default is 0.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `float` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |