OpenTTD Source: MusicSongInfo Struct Reference

OpenTTD Source 15.0-RC2

Data Fields
MusicSongInfo Struct Reference

Metadata about a music track. More...

`#include <base_media_music.h>`

Inheritance diagram for MusicSongInfo:

## Data Fields
std::string | songname
| name of song displayed in UI
std::string | filename
| file on disk containing song (when used in MusicSet class)
int | cat_index
| entry index in CAT file, for filetype==MTT_MPSMIDI
int | override_start
| MIDI ticks to skip over in beginning.
int | override_end
| MIDI tick to end the song at (0 if no override)
uint8_t | tracknr
| track number of song displayed in UI
MusicTrackType | filetype
| decoder required for song file
bool | loop
| song should play in a tight loop if possible, never ending

## Detailed Description

Metadata about a music track.

Definition at line 35 of file base_media_music.h.

## Field Documentation

## ◆ cat_index

int MusicSongInfo::cat_index

entry index in CAT file, for filetype==MTT_MPSMIDI

Definition at line 38 of file base_media_music.h.

Referenced by MidiFile::GetSMFFile(), and MusicSystem::PlaylistRemove().

## ◆ filename

std::string MusicSongInfo::filename

file on disk containing song (when used in MusicSet class)

Definition at line 37 of file base_media_music.h.

Referenced by MidiFile::GetSMFFile(), and MusicSystem::PlaylistRemove().

## ◆ filetype

MusicTrackType MusicSongInfo::filetype

decoder required for song file

Definition at line 42 of file base_media_music.h.

Referenced by MidiFile::GetSMFFile().

## ◆ loop

bool MusicSongInfo::loop

song should play in a tight loop if possible, never ending

Definition at line 43 of file base_media_music.h.

Referenced by MusicSystem::Play(), MusicDriver_DMusic::PlaySong(), and MusicDriver_Win32::PlaySong().

## ◆ override_end

int MusicSongInfo::override_end

MIDI tick to end the song at (0 if no override)

Definition at line 40 of file base_media_music.h.

Referenced by MusicDriver_DMusic::PlaySong(), and MusicDriver_Win32::PlaySong().

## ◆ override_start

int MusicSongInfo::override_start

MIDI ticks to skip over in beginning.

Definition at line 39 of file base_media_music.h.

Referenced by MusicDriver_DMusic::PlaySong(), and MusicDriver_Win32::PlaySong().

## ◆ songname

std::string MusicSongInfo::songname

name of song displayed in UI

Definition at line 36 of file base_media_music.h.

Referenced by MusicWindow::DrawWidget().

## ◆ tracknr

uint8_t MusicSongInfo::tracknr

track number of song displayed in UI

Definition at line 41 of file base_media_music.h.

Referenced by MusicWindow::DrawWidget().

The documentation for this struct was generated from the following file:

- src/base_media_music.h