aboutsummaryrefslogtreecommitdiff
path: root/headers/TZR_sound.h
blob: 271995b61f9e943173a6e76e2bff99f7b0758bfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once
#include "TZR_types.h"

#define TZR_PlaySound(...) _TZR_PlaySound(&(const TZR_PlaySoundArgs){ \
	.id=0, .loop=0, .volume=1.0f, ._=0, __VA_ARGS__ })
#ifdef TZR_PARANOID
#if __STDC_VERSION__ > 201710L
[[nodiscard]]
#endif
#endif
int _TZR_PlaySound(const TZR_PlaySoundArgs *args);

/* Return -1 on error. */
int TZR_PlayMusic(const char *path, int loop);

void TZR_StopMusic(void);