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

@ -13,15 +13,15 @@
#include <stdint.h>
typedef enum audio_file_type {
typedef enum AudioFileType {
audio_file_type_ogg,
audio_file_type_xm,
audio_file_type_count,
audio_file_type_unknown,
} t_audio_file_type;
} AudioFileType;
union audio_context {
union AudioContext {
struct {
stb_vorbis *handle;
unsigned char *data;
@ -35,19 +35,19 @@ union audio_context {
};
struct audio_channel {
t_play_audio_args args;
enum audio_file_type file_type;
union audio_context context; /* interpreted by `file_type` value */
typedef struct AudioChannel {
PlayAudioArgs args;
AudioFileType file_type;
union AudioContext context; /* interpreted by `file_type` value */
const char *path;
const char *name;
};
} AudioChannel;
struct audio_channel_item {
typedef struct AudioChannelItem {
char *key;
struct audio_channel value;
};
struct AudioChannel value;
} AudioChannelItem;
void audio_callback(void *userdata, uint8_t *stream, int len);