typedef & PascalCase for ALL structs and enums

This commit is contained in:
2024-09-23 14:43:16 -03:00
parent e093a6d492
commit 73bf92e706
43 changed files with 795 additions and 793 deletions

View File

@ -6,7 +6,7 @@
#include <stdbool.h>
typedef struct play_audio_args {
typedef struct PlayAudioArgs {
/* default: false */
bool repeat;
/* crossfade between already playing audio on a given channel, if any */
@ -18,21 +18,21 @@ typedef struct play_audio_args {
/* range: -1.0 to 1.0f */
/* default: 0.0f */
float panning;
} t_play_audio_args;
} PlayAudioArgs;
/* plays audio file at specified channel or anywhere if NULL is passed */
/* path must contain valid file extension to infer which file format it is */
/* supported formats: .ogg, .xm */
/* preserves args that are already specified on the channel */
TWN_API void play_audio(const char *path, const char *channel);
TWN_API void audio_play(const char *path, const char *channel);
TWN_API void play_audio_ex(const char *path, const char *channel, t_play_audio_args args);
TWN_API void audio_play_ex(const char *path, const char *channel, PlayAudioArgs args);
/* could be used for modifying args */
/* warn: is only valid if no other calls to audio are made */
TWN_API t_play_audio_args *get_audio_args(const char *channel);
TWN_API PlayAudioArgs *audio_get_args(const char *channel);
TWN_API t_play_audio_args get_default_audio_args(void);
TWN_API PlayAudioArgs audio_get_default_args(void);
#endif