summaryrefslogtreecommitdiff
path: root/src/combined/decoder_wavpack.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/combined/decoder_wavpack.c')
-rw-r--r--src/combined/decoder_wavpack.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/combined/decoder_wavpack.c b/src/combined/decoder_wavpack.c
index 36bf0deab..7b00ec8f3 100644
--- a/src/combined/decoder_wavpack.c
+++ b/src/combined/decoder_wavpack.c
@@ -138,7 +138,7 @@ static void wavpack_reset (audio_decoder_t *const this_gen)
this->buf_pos = 0;
}
-static void wavpack_discontinuity (audio_decoder_t *const this_gen)
+static void wavpack_discontinuity (audio_decoder_t *const this_gen)
{
/* wavpack_decoder_t *this = (wavpack_decoder_t *) this_gen; */
@@ -148,7 +148,7 @@ static void wavpack_discontinuity (audio_decoder_t *const this_gen)
static void wavpack_decode_data (audio_decoder_t *const this_gen, buf_element_t *const buf)
{
wavpack_decoder_t *const this = (wavpack_decoder_t *) this_gen;
-
+
/* We are getting the stream header, open up the audio
* device, and collect information about the stream
*/
@@ -192,7 +192,7 @@ static void wavpack_decode_data (audio_decoder_t *const this_gen, buf_element_t
xine_fast_memcpy (&this->buf[this->buf_pos], buf->content, buf->size);
this->buf_pos += buf->size;
-
+
if ( buf->decoder_flags & BUF_FLAG_FRAME_END ) {
static WavpackStreamReader wavpack_buffer_reader = {
.read_bytes = xine_buffer_read_bytes,
@@ -214,7 +214,7 @@ static void wavpack_decode_data (audio_decoder_t *const this_gen, buf_element_t
this->buf_pos = 0;
if ( le2me_32(header->samples_count) == 0 ) return;
-
+
ctx = WavpackOpenFileInputEx(&wavpack_buffer_reader, this, NULL, error, OPEN_STREAMING, 0);
if ( ! ctx ) {
lprintf("unable to open the stream: %s\n", error);
@@ -248,14 +248,14 @@ static void wavpack_decode_data (audio_decoder_t *const this_gen, buf_element_t
}
lprintf("Decoded %d samples\n", buf_samples);
-
+
samples_left -= decoded_count;
audio_buffer->num_frames = decoded_count;
audio_buffer->vpts = 0; /* TODO: Fix the pts calculation */
// audio_buffer->vpts = (buf->pts * (samples_total-samples_left)) / samples_total;
lprintf("Audio buffer with pts %"PRId64"\n", audio_buffer->vpts);
-
+
switch(this->bits_per_sample) {
case 8: {
int8_t *data8 = (int8_t*)audio_buffer->mem;
@@ -280,13 +280,13 @@ static void wavpack_decode_data (audio_decoder_t *const this_gen, buf_element_t
}
static void wavpack_dispose (audio_decoder_t *this_gen) {
- wavpack_decoder_t *this = (wavpack_decoder_t *) this_gen;
+ wavpack_decoder_t *this = (wavpack_decoder_t *) this_gen;
if (this->output_open)
this->stream->audio_out->close (this->stream->audio_out, this->stream);
free(this->buf);
-
+
free (this_gen);
}
@@ -323,7 +323,7 @@ static void dispose_class (audio_decoder_class_t *this) {
void *decoder_wavpack_init_plugin (xine_t *xine, void *data) {
wavpack_class_t *this;
-
+
this = calloc(1, sizeof (wavpack_class_t));
this->decoder_class.open_plugin = open_plugin;