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

#define TZR_PlaySound(...) ({ const TZR_PlaySoundArgs ____arg = { \
	.id=0, .loop=0, .volume=1.0f, ._=0, __VA_ARGS__ }; \
	_TZR_PlaySound(&____arg); })
#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);