Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
music: add music directory backend
Browse files Browse the repository at this point in the history
This adds support to play both CDAudio single MP3 as well as loading
individual tracks directly from a music directory.
  • Loading branch information
rr- committed May 1, 2024
1 parent 0c827cb commit d8ce83c
Show file tree
Hide file tree
Showing 9 changed files with 501 additions and 285 deletions.
4 changes: 3 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ dll_sources = [
'src/game/math.c',
'src/game/math_misc.c',
'src/game/matrix.c',
'src/game/music.c',
'src/game/music/music_main.c',
'src/game/music/music_backend_files.c',
'src/game/music/music_backend_cdaudio.c',
'src/game/objects/creatures/bird.c',
'src/game/output.c',
'src/game/overlay.c',
Expand Down
283 changes: 0 additions & 283 deletions src/game/music.c

This file was deleted.

11 changes: 11 additions & 0 deletions src/game/music/music_backend.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once

#include <stdbool.h>
#include <stdint.h>

typedef struct MUSIC_BACKEND {
bool (*init)(struct MUSIC_BACKEND *backend);
const char *(*describe)(const struct MUSIC_BACKEND *backend);
int32_t (*play)(const struct MUSIC_BACKEND *backend, int32_t track_id);
void *data;
} MUSIC_BACKEND;
Loading

0 comments on commit d8ce83c

Please sign in to comment.