From 5162181767046a58e8c97194a8bb596871369166 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 11 Jul 2013 12:05:37 -0400 Subject: Fix some usage of non-standard types for portability --- libs/audiographer/private/gdither/gdither.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/audiographer') diff --git a/libs/audiographer/private/gdither/gdither.cc b/libs/audiographer/private/gdither/gdither.cc index fe9ecc655a..d2a237eb74 100644 --- a/libs/audiographer/private/gdither/gdither.cc +++ b/libs/audiographer/private/gdither/gdither.cc @@ -226,7 +226,7 @@ inline static void gdither_innner_loop(const GDitherType dt, switch (bit_depth) { case GDither8bit: - o8[i] = (u_int8_t) (clamped * post_scale); + o8[i] = (uint8_t) (clamped * post_scale); break; case GDither16bit: o16[i] = (int16_t) (clamped * post_scale); -- cgit v1.2.3 From 0e513f04694c773b47dd5b03daa07842598ac8b6 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 11 Jul 2013 13:53:12 -0400 Subject: Include header that declares ::free for mingw build --- libs/audiographer/audiographer/debug_utils.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libs/audiographer') diff --git a/libs/audiographer/audiographer/debug_utils.h b/libs/audiographer/audiographer/debug_utils.h index a1d8259716..7b9e50124a 100644 --- a/libs/audiographer/audiographer/debug_utils.h +++ b/libs/audiographer/audiographer/debug_utils.h @@ -7,6 +7,7 @@ #ifdef __GNUC__ #include +#include #endif namespace AudioGrapher -- cgit v1.2.3 From ef9ed302e3365aee9207054dd9e4382fb49adc8d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 11 Jul 2013 13:53:35 -0400 Subject: Add necessary header include for int64_t type --- libs/audiographer/audiographer/broadcast_info.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libs/audiographer') diff --git a/libs/audiographer/audiographer/broadcast_info.h b/libs/audiographer/audiographer/broadcast_info.h index c111156c82..819978f8c6 100644 --- a/libs/audiographer/audiographer/broadcast_info.h +++ b/libs/audiographer/audiographer/broadcast_info.h @@ -21,6 +21,8 @@ #ifndef AUDIOGRAPHER_BROADCAST_INFO_H #define AUDIOGRAPHER_BROADCAST_INFO_H +#include + #include #include -- cgit v1.2.3 From f80859f3bdcb5c3b982379481ae3999446f35e81 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 11 Jul 2013 15:16:50 -0400 Subject: Use uint32_t type instead of uint --- libs/audiographer/tests/sndfile/tmp_file_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/audiographer') diff --git a/libs/audiographer/tests/sndfile/tmp_file_test.cc b/libs/audiographer/tests/sndfile/tmp_file_test.cc index 94647cc1a6..9ce8af7a5c 100644 --- a/libs/audiographer/tests/sndfile/tmp_file_test.cc +++ b/libs/audiographer/tests/sndfile/tmp_file_test.cc @@ -23,7 +23,7 @@ class TmpFileTest : public CppUnit::TestFixture void testProcess() { - uint channels = 2; + uint32_t channels = 2; file.reset (new TmpFile(SF_FORMAT_WAV | SF_FORMAT_FLOAT, channels, 44100)); AllocatingProcessContext c (random_data, frames, channels); c.set_flag (ProcessContext::EndOfInput); -- cgit v1.2.3 From 48f8863b2cb5ad4628ff6eef33cb8796e4773068 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 13 Jul 2013 16:44:37 -0400 Subject: Use g_mkstemp in audiographer for portability --- libs/audiographer/audiographer/sndfile/tmp_file.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libs/audiographer') diff --git a/libs/audiographer/audiographer/sndfile/tmp_file.h b/libs/audiographer/audiographer/sndfile/tmp_file.h index 8655fd7191..facb872abf 100644 --- a/libs/audiographer/audiographer/sndfile/tmp_file.h +++ b/libs/audiographer/audiographer/sndfile/tmp_file.h @@ -4,6 +4,9 @@ #include #include +#include +#include + #include "sndfile_writer.h" #include "sndfile_reader.h" @@ -18,7 +21,7 @@ class TmpFile : public SndfileWriter, public SndfileReader /// \a filename_template must match the requirements for mkstemp, i.e. end in "XXXXXX" TmpFile (char * filename_template, int format, ChannelCount channels, framecnt_t samplerate) - : SndfileHandle (mkstemp(filename_template), true, SndfileBase::ReadWrite, format, channels, samplerate) + : SndfileHandle (g_mkstemp(filename_template), true, SndfileBase::ReadWrite, format, channels, samplerate) , filename (filename_template) {} -- cgit v1.2.3 From e14966e77823964ecb25966df72b74537548df1d Mon Sep 17 00:00:00 2001 From: John Emmas Date: Thu, 5 Sep 2013 09:18:30 +0100 Subject: 'libs/audiographer' - Use 'alloca()' for a stack based array whose size is unknown (required to be buildable with MSVC) --- libs/audiographer/src/general/broadcast_info.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/audiographer') diff --git a/libs/audiographer/src/general/broadcast_info.cc b/libs/audiographer/src/general/broadcast_info.cc index 43e5008e52..df69ac9c79 100644 --- a/libs/audiographer/src/general/broadcast_info.cc +++ b/libs/audiographer/src/general/broadcast_info.cc @@ -34,7 +34,7 @@ namespace AudioGrapher static void snprintf_bounded_null_filled (char* target, size_t target_size, char const * fmt, ...) { - char buf[target_size+1]; + char *buf = (char*)alloca(target_size+1); va_list ap; va_start (ap, fmt); -- cgit v1.2.3 From 6daeba047ebba794a7e64d22667ad1206b5d450d Mon Sep 17 00:00:00 2001 From: John Emmas Date: Thu, 5 Sep 2013 09:21:30 +0100 Subject: 'libs/audiographer' - Try 'lrintf' instead of 'rintf' which isn't available in MSVC --- libs/audiographer/private/gdither/gdither.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/audiographer') diff --git a/libs/audiographer/private/gdither/gdither.cc b/libs/audiographer/private/gdither/gdither.cc index d2a237eb74..75e16d7863 100644 --- a/libs/audiographer/private/gdither/gdither.cc +++ b/libs/audiographer/private/gdither/gdither.cc @@ -292,7 +292,7 @@ inline static void gdither_innner_loop_fp(const GDitherType dt, break; } - clamped = rintf(tmp); + clamped = (double)lrintf(tmp); if (clamped > clamp_u) { clamped = clamp_u; } else if (clamped < clamp_l) { -- cgit v1.2.3