#include "libavutil/samplefmt.h"
#define LIBSWRESAMPLE_VERSION_MAJOR 0
-#define LIBSWRESAMPLE_VERSION_MINOR 6
+#define LIBSWRESAMPLE_VERSION_MINOR 9
#define LIBSWRESAMPLE_VERSION_MICRO 100
#define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \
LIBSWRESAMPLE_VERSION_MINOR, \
LIBSWRESAMPLE_VERSION_MICRO)
-#define SWR_CH_MAX 16 ///< Maximum number of channels
+#define SWR_CH_MAX 32 ///< Maximum number of channels
#define SWR_FLAG_RESAMPLE 1 ///< Force resampling even if equal sample rate
//TODO use int resample ?
//long term TODO can we enable this dynamically?
-struct SwrContext;
+typedef struct SwrContext SwrContext;
/**
* Allocate SwrContext.
* @param in input buffers, only the first one need to be set in case of packed audio
* @param in_count number of input samples available in one channel
*
- * @return number of samples output per channel
+ * @return number of samples output per channel, negative value on error
*/
int swr_convert(struct SwrContext *s, uint8_t *out[SWR_CH_MAX], int out_count,
const uint8_t *in [SWR_CH_MAX], int in_count);
*/
int swr_set_channel_mapping(struct SwrContext *s, const int *channel_map);
+/**
+ * Set a customized remix matrix.
+ *
+ * @param s allocated Swr context, not yet initialized
+ * @param matrix remix coefficients; matrix[i + stride * o] is
+ * the weight of input channel i in output channel o
+ * @param stride offset between lines of the matrix
+ * @return AVERROR error code in case of failure.
+ */
+int swr_set_matrix(struct SwrContext *s, const double *matrix, int stride);
+
/**
* Return the LIBSWRESAMPLE_VERSION_INT constant.
*/