# music.cpp File Reference

The songs that OpenTTD knows. More...

`#include "stdafx.h"`
`#include "debug.h"`
`#include "base_media_func.h"`

Go to the source code of this file.

## Defines

#define | SET_TYPE "music"
#define | fetch_name(name)
| Try to read a single piece of metadata and return false if it doesn't exist.

## Functions

| assert_compile (lengthof(_music_file_names)==NUM_SONGS_AVAILABLE)

## Variables

static const char *const | _music_file_names []
| Names corresponding to the music set's files.

## Detailed Description

The songs that OpenTTD knows.

Definition in file music.cpp.

## Define Documentation

#define fetch_name | ( | name |  | ) |

Value:

    item = metadata->GetItem(name, false); \
      if (item == NULL || strlen(item->value) == 0) { \
        DEBUG(grf, 0, "Base " SET_TYPE "set detail loading: %s field missing", name); \
        return false; \
      }

Try to read a single piece of metadata and return false if it doesn't exist.

Parameters:

  | name | the name of the item to fetch.

Definition at line 64 of file music.cpp.

## Variable Documentation

const char* const _music_file_names[]`[static]`

Initial value:

     {
      "theme",
      "old_0", "old_1", "old_2", "old_3", "old_4", "old_5", "old_6", "old_7", "old_8", "old_9",
      "new_0", "new_1", "new_2", "new_3", "new_4", "new_5", "new_6", "new_7", "new_8", "new_9",
      "ezy_0", "ezy_1", "ezy_2", "ezy_3", "ezy_4", "ezy_5", "ezy_6", "ezy_7", "ezy_8", "ezy_9",
    }

Names corresponding to the music set's files.

Definition at line 22 of file music.cpp.