typedef & PascalCase for ALL structs and enums
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user