Commit ff2e69c0 authored by Laszlo Ashin's avatar Laszlo Ashin Committed by Max Kellermann

wavpack: unified code style

Not every function header has its return type in a distinct line. This patch corrects that. This way there is more space for the arguments.
parent 343f2ac3
...@@ -108,7 +108,8 @@ format_samples_int(int bytes_per_sample, void *buffer, uint32_t samcnt) ...@@ -108,7 +108,8 @@ format_samples_int(int bytes_per_sample, void *buffer, uint32_t samcnt)
/* /*
* This function converts floating point sample data to 16 bit integer. * This function converts floating point sample data to 16 bit integer.
*/ */
static void format_samples_float(mpd_unused int bytes_per_sample, void *buffer, static void
format_samples_float(mpd_unused int bytes_per_sample, void *buffer,
uint32_t samcnt) uint32_t samcnt)
{ {
int16_t *dst = (int16_t *)buffer; int16_t *dst = (int16_t *)buffer;
...@@ -123,8 +124,8 @@ static void format_samples_float(mpd_unused int bytes_per_sample, void *buffer, ...@@ -123,8 +124,8 @@ static void format_samples_float(mpd_unused int bytes_per_sample, void *buffer,
* This does the main decoding thing. * This does the main decoding thing.
* Requires an already opened WavpackContext. * Requires an already opened WavpackContext.
*/ */
static void wavpack_decode(struct decoder * decoder, static void
WavpackContext *wpc, bool canseek, wavpack_decode(struct decoder * decoder, WavpackContext *wpc, bool canseek,
ReplayGainInfo *replayGainInfo) ReplayGainInfo *replayGainInfo)
{ {
struct audio_format audio_format; struct audio_format audio_format;
...@@ -208,7 +209,8 @@ static void wavpack_decode(struct decoder * decoder, ...@@ -208,7 +209,8 @@ static void wavpack_decode(struct decoder * decoder,
} while (samplesgot == samplesreq); } while (samplesgot == samplesreq);
} }
static char *wavpack_tag(WavpackContext *wpc, char *key) static char *
wavpack_tag(WavpackContext *wpc, char *key)
{ {
char *value = NULL; char *value = NULL;
int size; int size;
...@@ -223,7 +225,8 @@ static char *wavpack_tag(WavpackContext *wpc, char *key) ...@@ -223,7 +225,8 @@ static char *wavpack_tag(WavpackContext *wpc, char *key)
return value; return value;
} }
static ReplayGainInfo *wavpack_replaygain(WavpackContext *wpc) static ReplayGainInfo *
wavpack_replaygain(WavpackContext *wpc)
{ {
static char replaygain_track_gain[] = "replaygain_track_gain"; static char replaygain_track_gain[] = "replaygain_track_gain";
static char replaygain_album_gain[] = "replaygain_album_gain"; static char replaygain_album_gain[] = "replaygain_album_gain";
...@@ -275,7 +278,8 @@ static ReplayGainInfo *wavpack_replaygain(WavpackContext *wpc) ...@@ -275,7 +278,8 @@ static ReplayGainInfo *wavpack_replaygain(WavpackContext *wpc)
/* /*
* Reads metainfo from the specified file. * Reads metainfo from the specified file.
*/ */
static struct tag *wavpack_tagdup(const char *fname) static struct tag *
wavpack_tagdup(const char *fname)
{ {
WavpackContext *wpc; WavpackContext *wpc;
struct tag *tag; struct tag *tag;
...@@ -336,7 +340,8 @@ struct wavpack_input { ...@@ -336,7 +340,8 @@ struct wavpack_input {
int last_byte; int last_byte;
}; };
static int32_t read_bytes(void *id, void *data, int32_t bcount) static int32_t
read_bytes(void *id, void *data, int32_t bcount)
{ {
struct wavpack_input *isp = (struct wavpack_input *)id; struct wavpack_input *isp = (struct wavpack_input *)id;
uint8_t *buf = (uint8_t *)data; uint8_t *buf = (uint8_t *)data;
...@@ -366,35 +371,41 @@ static int32_t read_bytes(void *id, void *data, int32_t bcount) ...@@ -366,35 +371,41 @@ static int32_t read_bytes(void *id, void *data, int32_t bcount)
return i; return i;
} }
static uint32_t get_pos(void *id) static uint32_t
get_pos(void *id)
{ {
return ((struct wavpack_input *)id)->is->offset; return ((struct wavpack_input *)id)->is->offset;
} }
static int set_pos_abs(void *id, uint32_t pos) static int
set_pos_abs(void *id, uint32_t pos)
{ {
return input_stream_seek(((struct wavpack_input *)id)->is, pos, SEEK_SET) return input_stream_seek(((struct wavpack_input *)id)->is, pos, SEEK_SET)
? 0 : -1; ? 0 : -1;
} }
static int set_pos_rel(void *id, int32_t delta, int mode) static int
set_pos_rel(void *id, int32_t delta, int mode)
{ {
return input_stream_seek(((struct wavpack_input *)id)->is, delta, mode) return input_stream_seek(((struct wavpack_input *)id)->is, delta, mode)
? 0 : -1; ? 0 : -1;
} }
static int push_back_byte(void *id, int c) static int
push_back_byte(void *id, int c)
{ {
((struct wavpack_input *)id)->last_byte = c; ((struct wavpack_input *)id)->last_byte = c;
return 1; return 1;
} }
static uint32_t get_length(void *id) static uint32_t
get_length(void *id)
{ {
return ((struct wavpack_input *)id)->is->size; return ((struct wavpack_input *)id)->is->size;
} }
static int can_seek(void *id) static int
can_seek(void *id)
{ {
return ((struct wavpack_input *)id)->is->seekable; return ((struct wavpack_input *)id)->is->seekable;
} }
...@@ -422,7 +433,8 @@ wavpack_input_init(struct wavpack_input *isp, struct decoder *decoder, ...@@ -422,7 +433,8 @@ wavpack_input_init(struct wavpack_input *isp, struct decoder *decoder,
/* /*
* Tries to decode the specified stream, and gives true if managed to do it. * Tries to decode the specified stream, and gives true if managed to do it.
*/ */
static bool wavpack_trydecode(struct input_stream *is) static bool
wavpack_trydecode(struct input_stream *is)
{ {
char error[ERRORLEN]; char error[ERRORLEN];
WavpackContext *wpc; WavpackContext *wpc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment