diff options
Diffstat (limited to 'src/pcm_convert.h')
-rw-r--r-- | src/pcm_convert.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/pcm_convert.h b/src/pcm_convert.h index 01ba2c787..be11a6e41 100644 --- a/src/pcm_convert.h +++ b/src/pcm_convert.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2010 The Music Player Daemon Project + * Copyright (C) 2003-2011 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -20,6 +20,7 @@ #ifndef PCM_CONVERT_H #define PCM_CONVERT_H +#include "pcm_dsd.h" #include "pcm_resample.h" #include "pcm_dither.h" #include "pcm_buffer.h" @@ -32,6 +33,8 @@ struct audio_format; * conversions. */ struct pcm_convert_state { + struct pcm_dsd dsd; + struct pcm_resample_state resample; struct pcm_dither dither; @@ -39,14 +42,8 @@ struct pcm_convert_state { /** the buffer for converting the sample format */ struct pcm_buffer format_buffer; - /** the buffer for converting to/from packed samples */ - struct pcm_buffer pack_buffer; - /** the buffer for converting the channel count */ struct pcm_buffer channels_buffer; - - /** the buffer for swapping the byte order */ - struct pcm_buffer byteswap_buffer; }; static inline GQuark @@ -67,6 +64,13 @@ void pcm_convert_init(struct pcm_convert_state *state); void pcm_convert_deinit(struct pcm_convert_state *state); /** + * Reset the pcm_convert_state object. Use this at the boundary + * between two distinct songs and each time the format changes. + */ +void +pcm_convert_reset(struct pcm_convert_state *state); + +/** * Converts PCM data between two audio formats. * * @param state an initialized pcm_convert_state object @@ -75,7 +79,7 @@ void pcm_convert_deinit(struct pcm_convert_state *state); * @param src_size the size of #src in bytes * @param dest_format the requested destination audio format * @param dest_size_r returns the number of bytes of the destination buffer - * @param error_r location to store the error occuring, or NULL to + * @param error_r location to store the error occurring, or NULL to * ignore errors * @return the destination buffer, or NULL on error */ |