# OptionsHelper.MusicOptionsHelper

`com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper`

Sound volumes, audio-device selection, and subtitles.  
 ```js
const options = Client.getGameOptions();  
options.music.getMasterVolume();  
 ```

Nested type declared in [OptionsHelper](OptionsHelper.md).

## Constructors

### new OptionsHelper.MusicOptionsHelper {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_constructor-OptionsHelper-}

```js
new OptionsHelper.MusicOptionsHelper(OptionsHelper optionsHelper, OptionsHelper OptionsHelper)
```

Stores the supplied parent reference; settings methods use the enclosing `OptionsHelper` instance, which may differ.

**Parameters:**
- `OptionsHelper`: parent helper reference to retain

## Fields

### parent {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_parent}

```js
parent: OptionsHelper
```

The options helper that owns this group.

**Since:** 1.8.4

## Methods

### areSubtitlesShown {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_areSubtitlesShown-}

```js
areSubtitlesShown(): boolean
```

Returns whether subtitles are enabled.

**Returns:** `true` if subtitles should be shown, `false` otherwise.

**Since:** 1.8.4

### getAmbientVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_getAmbientVolume-}

```js
getAmbientVolume(): float
```

**Returns:** the current ambient volume.

**Since:** 1.8.4

### getAudioDevices {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_getAudioDevices-}

```js
getAudioDevices(): List<String>
```

Returns available audio device identifiers, including the empty identifier for the
 default device.

**Returns:** the available audio device identifiers.

**Since:** 1.8.4

### getBlocksVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_getBlocksVolume-}

```js
getBlocksVolume(): float
```

**Returns:** the current volume of block related sounds.

**Since:** 1.8.4

### getHostileVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_getHostileVolume-}

```js
getHostileVolume(): float
```

**Returns:** the current volume of hostile mobs.

**Since:** 1.8.4

### getMasterVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_getMasterVolume-}

```js
getMasterVolume(): float
```

**Returns:** the current master sound volume.

**Since:** 1.8.4

### getMusicVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_getMusicVolume-}

```js
getMusicVolume(): float
```

**Returns:** the current music sound volume.

**Since:** 1.8.4

### getNeutralVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_getNeutralVolume-}

```js
getNeutralVolume(): float
```

**Returns:** the current volume of neutral mobs.

**Since:** 1.8.4

### getParent {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_getParent-}

```js
getParent(): OptionsHelper
```

**Returns:** the options helper that owns this group.

**Since:** 1.8.4

### getPlayerVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_getPlayerVolume-}

```js
getPlayerVolume(): float
```

**Returns:** the current player volume.

**Since:** 1.8.4

### getRecordsVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_getRecordsVolume-}

```js
getRecordsVolume(): float
```

**Returns:** the current records sound volume.

**Since:** 1.8.4

### getSoundDevice {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_getSoundDevice-}

```js
getSoundDevice(): String
```

Returns the selected audio device identifier.

**Returns:** the currently selected sound device.

**Since:** 1.8.4

### getVoiceVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_getVoiceVolume-}

```js
getVoiceVolume(): float
```

Returns the voice sound volume.

**Returns:** the current voice volume.

**Since:** 1.8.4

### getVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_getVolume-String-}

```js
getVolume(String category): float
```

Returns the volume for a sound category, looked up by its category name.

**Parameters:**
- `category`: the category to get the volume of

**Returns:** the volume of the given sound category.

**Since:** 1.8.4

### getVolumes {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_getVolumes-}

```js
getVolumes(): Map<String, Float>
```

Returns the volume of each sound category, keyed by category name.

**Returns:** a map of all sound categories and their volumes.

**Since:** 1.8.4

### getWeatherVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_getWeatherVolume-}

```js
getWeatherVolume(): float
```

**Returns:** the current weather sound volume.

**Since:** 1.8.4

### setAmbientVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_setAmbientVolume-double-}

```js
setAmbientVolume(double volume): OptionsHelper.MusicOptionsHelper
```

Sets the ambient sound volume.

**Parameters:**
- `volume`: the new ambient volume

**Returns:** self for chaining.

**Since:** 1.8.4

### setBlocksVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_setBlocksVolume-double-}

```js
setBlocksVolume(double volume): OptionsHelper.MusicOptionsHelper
```

**Parameters:**
- `volume`: the new volume for block sounds

**Returns:** self for chaining.

**Since:** 1.8.4

### setHostileVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_setHostileVolume-double-}

```js
setHostileVolume(double volume): OptionsHelper.MusicOptionsHelper
```

**Parameters:**
- `volume`: the new volume for hostile mobs

**Returns:** self for chaining.

**Since:** 1.8.4

### setMasterVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_setMasterVolume-double-}

```js
setMasterVolume(double volume): OptionsHelper.MusicOptionsHelper
```

**Parameters:**
- `volume`: the new master sound volume

**Returns:** this helper for chaining.

**Since:** 1.8.4

### setMusicVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_setMusicVolume-double-}

```js
setMusicVolume(double volume): OptionsHelper.MusicOptionsHelper
```

**Parameters:**
- `volume`: the new music sound volume

**Returns:** this helper for chaining.

**Since:** 1.8.4

### setNeutralVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_setNeutralVolume-double-}

```js
setNeutralVolume(double volume): OptionsHelper.MusicOptionsHelper
```

**Parameters:**
- `volume`: the new volume for neutral mobs

**Returns:** self for chaining.

**Since:** 1.8.4

### setPlayerVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_setPlayerVolume-double-}

```js
setPlayerVolume(double volume): OptionsHelper.MusicOptionsHelper
```

**Parameters:**
- `volume`: the new player volume

**Returns:** self for chaining.

**Since:** 1.8.4

### setRecordsVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_setRecordsVolume-double-}

```js
setRecordsVolume(double volume): OptionsHelper.MusicOptionsHelper
```

**Parameters:**
- `volume`: the new records sound volume

**Returns:** this helper for chaining.

**Since:** 1.8.4

### setSoundDevice {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_setSoundDevice-String-}

```js
setSoundDevice(String audioDevice): OptionsHelper.MusicOptionsHelper
```

Selects an audio device and reloads the sound manager. An identifier not present in
 [getAudioDevices()](#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_getAudioDevices-) selects the default device.

**Parameters:**
- `audioDevice`: the audio device to use

**Returns:** self for chaining.

**Since:** 1.8.4

### setVoiceVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_setVoiceVolume-double-}

```js
setVoiceVolume(double volume): OptionsHelper.MusicOptionsHelper
```

Sets the voice sound volume.

**Parameters:**
- `volume`: the new voice volume

**Returns:** self for chaining.

**Since:** 1.8.4

### setVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_setVolume-String-double-}

```js
setVolume(String category, double volume): OptionsHelper.MusicOptionsHelper
```

Sets the volume for a sound category, looked up by its category name.

**Parameters:**
- `category`: the category to set the volume for
- `volume`: the new volume

**Returns:** self for chaining.

**Since:** 1.8.4

### setWeatherVolume {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_setWeatherVolume-double-}

```js
setWeatherVolume(double volume): OptionsHelper.MusicOptionsHelper
```

**Parameters:**
- `volume`: the new volume for the weather

**Returns:** self for chaining.

**Since:** 1.8.4

### showSubtitles {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.MusicOptionsHelper_showSubtitles-boolean-}

```js
showSubtitles(boolean val): OptionsHelper.MusicOptionsHelper
```

**Parameters:**
- `val`: whether subtitles should be shown or not

**Returns:** self for chaining.

**Since:** 1.8.4
