48 lines
2.6 KiB
Diff
48 lines
2.6 KiB
Diff
|
Cast float* in SRC lib calls to delete fpermissive compilation error
|
||
|
https://github.com/rafael2k/darkice/commit/1e2eb18d349f205c70cb2836232825442359b6e3
|
||
|
|
||
|
--- src/aacPlusEncoder.cpp.orig 2015-05-18 19:38:07.000000000 +0200
|
||
|
+++ src/aacPlusEncoder.cpp 2018-01-15 20:12:25.067851245 +0100
|
||
|
@@ -155,7 +155,7 @@
|
||
|
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);
|
||
|
--- src/FaacEncoder.cpp.orig 2015-05-18 19:38:07.000000000 +0200
|
||
|
+++ src/FaacEncoder.cpp 2018-01-15 20:10:28.737280304 +0100
|
||
|
@@ -164,7 +164,7 @@
|
||
|
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);
|
||
|
--- src/OpusLibEncoder.cpp.orig 2016-08-03 22:18:23.000000000 +0200
|
||
|
+++ src/OpusLibEncoder.cpp 2018-01-15 20:11:22.804545634 +0100
|
||
|
@@ -403,7 +403,7 @@
|
||
|
#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));
|
||
|
--- src/VorbisLibEncoder.cpp.orig 2015-05-18 19:38:07.000000000 +0200
|
||
|
+++ src/VorbisLibEncoder.cpp 2018-01-15 20:06:39.258178098 +0100
|
||
|
@@ -337,7 +337,7 @@
|
||
|
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));
|