decoder: replaced music_pipe.audioFormat with dc.out_audio_format

.. and rename dc.audioFormat to dc.in_audio_format.  The music pipe
does not need to know the audio format, and its former "audioFormat"
property indicated the format of the most recently added chunk, which
might be confusing when you are reading the oldest chunks.
This commit is contained in:
Max Kellermann
2008-11-02 16:55:43 +01:00
parent 30fca5e5a9
commit 8b1f6ff3c8
6 changed files with 34 additions and 22 deletions

View File

@@ -19,6 +19,7 @@
#include "pipe.h"
#include "notify.h"
#include "utils.h"
#include "audio_format.h"
#include <assert.h>
#include <string.h>
@@ -185,10 +186,11 @@ tail_chunk(float data_time, uint16_t bitRate, size_t frame_size)
}
size_t music_pipe_append(const void *data0, size_t datalen,
const struct audio_format *audio_format,
float data_time, uint16_t bitRate)
{
const unsigned char *data = data0;
const size_t frame_size = audio_format_frame_size(&ob.audioFormat);
const size_t frame_size = audio_format_frame_size(audio_format);
size_t ret = 0, dataToSend;
struct music_chunk *chunk = NULL;