audio_format: renamed sampleRate to sample_rate

The last bit of CamelCase in audio_format.h.  Additionally, rename a
bunch of local variables.
This commit is contained in:
Max Kellermann
2008-10-10 14:40:54 +02:00
parent 6101dc6c76
commit de2cb3f375
27 changed files with 96 additions and 97 deletions

View File

@@ -23,27 +23,27 @@
#include <stdbool.h>
struct audio_format {
uint32_t sampleRate;
uint32_t sample_rate;
uint8_t bits;
uint8_t channels;
};
static inline void audio_format_clear(struct audio_format *af)
{
af->sampleRate = 0;
af->sample_rate = 0;
af->bits = 0;
af->channels = 0;
}
static inline bool audio_format_defined(const struct audio_format *af)
{
return af->sampleRate != 0;
return af->sample_rate != 0;
}
static inline bool audio_format_equals(const struct audio_format *a,
const struct audio_format *b)
{
return a->sampleRate == b->sampleRate &&
return a->sample_rate == b->sample_rate &&
a->bits == b->bits &&
a->channels == b->channels;
}
@@ -63,7 +63,7 @@ static inline unsigned audio_format_sample_size(const struct audio_format *af)
static inline double audio_format_time_to_size(const struct audio_format *af)
{
return af->sampleRate * af->channels * audio_format_sample_size(af);
return af->sample_rate * af->channels * audio_format_sample_size(af);
}
static inline double audioFormatSizeToTime(const struct audio_format *af)