pcm_utils: moved code to pcm_resample.c

Separate the resampling code from the rest of pcm_utils.c.  Create two
sub-libraries: pcm_resample_libsamplerate.c and
pcm_resample_fallback.c.
This commit is contained in:
Max Kellermann
2008-10-23 20:00:51 +02:00
parent 098991f8e8
commit 6b1c54ef96
8 changed files with 308 additions and 176 deletions

View File

@@ -19,28 +19,16 @@
#ifndef PCM_UTILS_H
#define PCM_UTILS_H
#include "../config.h"
#include "pcm_resample.h"
#include "pcm_dither.h"
#include <stdint.h>
#include <stddef.h>
#ifdef HAVE_LIBSAMPLERATE
#include <samplerate.h>
#endif
struct audio_format;
struct pcm_convert_state {
#ifdef HAVE_LIBSAMPLERATE
SRC_STATE *state;
SRC_DATA data;
size_t dataInSize;
size_t dataOutSize;
int8_t lastChannels;
uint32_t lastInSampleRate;
uint32_t lastOutSampleRate;
#endif
struct pcm_resample_state resample;
struct pcm_dither_24 dither;