OpenTTD Source: src/sound_func.h File Reference

OpenTTD Source 15.0-beta1

Functions
sound_func.h File Reference

Functions related to sound. More...

`#include "sound_type.h"`
`#include "vehicle_type.h"`
`#include "tile_type.h"`

Go to the source code of this file.

## Functions
void | ChangeSoundSet (int index)
| Change the configured sound set and reset sounds.
void | SndPlayTileFx (SoundID sound, TileIndex tile)
void | SndPlayVehicleFx (SoundID sound, const Vehicle *v)
void | SndPlayFx (SoundID sound)
void | SndCopyToPool ()

## Detailed Description

Functions related to sound.

Definition in file sound_func.h.

## Function Documentation

## ◆ ChangeSoundSet()

void ChangeSoundSet | ( | int | index | ) |

Change the configured sound set and reset sounds.

Parameters

  index | Index of sound set to switch to.

Definition at line 169 of file sound.cpp.

References BaseMedia< SoundsSet >::GetIndexOfUsedSet(), BaseMedia< SoundsSet >::GetSet(), SoundEntry::grf_container_ver, BaseSounds::ini_set, InvalidateWindowData(), MxCloseAllChannels(), ORIGINAL_SAMPLE_COUNT, BaseMedia< SoundsSet >::SetSet(), WC_GAME_OPTIONS, and WN_GAME_OPTIONS_GAME_OPTIONS.

Referenced by GameOptionsWindow::OnDropdownSelect().

## ◆ SndCopyToPool()

void SndCopyToPool | ( |  | ) |

Definition at line 155 of file sound.cpp.

## ◆ SndPlayFx()

void SndPlayFx | ( | SoundID | sound | ) |

Definition at line 247 of file sound.cpp.

## ◆ SndPlayTileFx()

void SndPlayTileFx | ( | SoundID | sound,
|  | TileIndex | tile
| ) |  |

Definition at line 227 of file sound.cpp.

## ◆ SndPlayVehicleFx()

void SndPlayVehicleFx | ( | SoundID | sound,
|  | const Vehicle * | v
| ) |  |

Definition at line 239 of file sound.cpp.