diff options
author | Max Kellermann <max@duempel.org> | 2008-09-07 19:19:55 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-07 19:19:55 +0200 |
commit | f1dd9c209c3a1cf6826d3a38b60f638e0faeadab (patch) | |
tree | 91e369d89eac8d298f1473c0dbcdf43065ae3b40 /src/audio_format.h | |
parent | bd81fd8b0c4f4f3c20533e21d6a837326eb8682b (diff) | |
download | mpd-f1dd9c209c3a1cf6826d3a38b60f638e0faeadab.tar.gz mpd-f1dd9c209c3a1cf6826d3a38b60f638e0faeadab.tar.xz mpd-f1dd9c209c3a1cf6826d3a38b60f638e0faeadab.zip |
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.
Diffstat (limited to 'src/audio_format.h')
-rw-r--r-- | src/audio_format.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/audio_format.h b/src/audio_format.h index ade9d8810..fa892b846 100644 --- a/src/audio_format.h +++ b/src/audio_format.h @@ -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; } |