audio_format: converted typedef AudioFormat to struct audio_format

Get rid of CamelCase, and don't use a typedef, so we can
forward-declare it, and unclutter the include dependencies.
This commit is contained in:
Max Kellermann
2008-09-07 19:19:55 +02:00
parent bd81fd8b0c
commit f1dd9c209c
34 changed files with 98 additions and 83 deletions

View File

@@ -21,18 +21,18 @@
#include "mpd_types.h"
typedef struct _AudioFormat {
struct audio_format {
mpd_sint8 channels;
mpd_uint32 sampleRate;
mpd_sint8 bits;
} AudioFormat;
};
static inline double audio_format_time_to_size(const AudioFormat * af)
static inline double audio_format_time_to_size(const struct audio_format *af)
{
return af->sampleRate * af->bits * af->channels / 8.0;
}
static inline double audioFormatSizeToTime(const AudioFormat * af)
static inline double audioFormatSizeToTime(const struct audio_format *af)
{
return 8.0 / af->bits / af->channels / af->sampleRate;
}