From 1e2eb18d349f205c70cb2836232825442359b6e3 Mon Sep 17 00:00:00 2001 From: belette Date: Wed, 26 Oct 2016 02:43:43 +0200 Subject: [PATCH] Cast float* in SRC lib calls to delete fpermissive compilation error Upstream-Stauts: Backport [https://github.com/rafael2k/darkice/commit/1e2eb18d349f205c70cb2836232825442359b6e3] --- darkice/trunk/src/FaacEncoder.cpp | 2 +- darkice/trunk/src/OpusLibEncoder.cpp | 2 +- darkice/trunk/src/VorbisLibEncoder.cpp | 2 +- darkice/trunk/src/aacPlusEncoder.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git ./src/FaacEncoder.cpp ./src/FaacEncoder.cpp index 1100226..873c560 100644 --- ./src/FaacEncoder.cpp +++ ./src/FaacEncoder.cpp @@ -164,7 +164,7 @@ FaacEncoder :: write ( const void * buf, if ( converter ) { unsigned int converted; #ifdef HAVE_SRC_LIB - src_short_to_float_array ((short *) b, converterData.data_in, samples); + src_short_to_float_array ((short *) b, (float *) converterData.data_in, samples); converterData.input_frames = nSamples; converterData.data_out = resampledOffset + (resampledOffsetSize * channels); int srcError = src_process (converter, &converterData); diff --git ./src/OpusLibEncoder.cpp ./src/OpusLibEncoder.cpp index 4b55c4f..3b761de 100644 --- ./src/OpusLibEncoder.cpp +++ ./src/OpusLibEncoder.cpp @@ -403,7 +403,7 @@ OpusLibEncoder :: write ( const void * buf, #ifdef HAVE_SRC_LIB (void)inCount; converterData.input_frames = processed; - src_short_to_float_array (shortBuffer, converterData.data_in, totalSamples); + src_short_to_float_array (shortBuffer, (float *) converterData.data_in, totalSamples); int srcError = src_process (converter, &converterData); if (srcError) throw Exception (__FILE__, __LINE__, "libsamplerate error: ", src_strerror (srcError)); diff --git ./src/VorbisLibEncoder.cpp ./src/VorbisLibEncoder.cpp index 3b6b851..5d05092 100644 --- ./src/VorbisLibEncoder.cpp +++ ./src/VorbisLibEncoder.cpp @@ -337,7 +337,7 @@ VorbisLibEncoder :: write ( const void * buf, int converted; #ifdef HAVE_SRC_LIB converterData.input_frames = nSamples; - src_short_to_float_array (shortBuffer, converterData.data_in, totalSamples); + src_short_to_float_array (shortBuffer, (float *) converterData.data_in, totalSamples); int srcError = src_process (converter, &converterData); if (srcError) throw Exception (__FILE__, __LINE__, "libsamplerate error: ", src_strerror (srcError)); diff --git ./src/aacPlusEncoder.cpp ./src/aacPlusEncoder.cpp index b3c36cd..70831b6 100644 --- ./src/aacPlusEncoder.cpp +++ ./src/aacPlusEncoder.cpp @@ -155,7 +155,7 @@ aacPlusEncoder :: write ( const void * buf, if ( converter ) { unsigned int converted; #ifdef HAVE_SRC_LIB - src_short_to_float_array ((short *) b, converterData.data_in, samples); + src_short_to_float_array ((short *) b, (float *) converterData.data_in, samples); converterData.input_frames = nSamples; converterData.data_out = resampledOffset + (resampledOffsetSize * channels); int srcError = src_process (converter, &converterData);