summaryrefslogtreecommitdiff
path: root/libs/audiographer
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-01-10 16:07:57 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-01-10 16:07:57 -0500
commit3020b224fa2d6e1b6b8a576e8e8e211e0585f2a2 (patch)
tree314c3099bcc57d9af09d249e1e7dd8e45baca642 /libs/audiographer
parentd15fda6d751a465d278f477923075d4783f3b1ca (diff)
parent897fbdc652434d3aa1e67223c3c3ef7ae9be2318 (diff)
Merge windows+cc branch into cairocanvas branch. Not finished, need to now merge windows branch to get changes from there
Diffstat (limited to 'libs/audiographer')
-rw-r--r--libs/audiographer/audiographer/broadcast_info.h2
-rw-r--r--libs/audiographer/audiographer/debug_utils.h1
-rw-r--r--libs/audiographer/audiographer/sndfile/tmp_file.h5
-rw-r--r--libs/audiographer/private/gdither/gdither.cc4
-rw-r--r--libs/audiographer/src/general/broadcast_info.cc2
-rw-r--r--libs/audiographer/tests/sndfile/tmp_file_test.cc2
6 files changed, 11 insertions, 5 deletions
diff --git a/libs/audiographer/audiographer/broadcast_info.h b/libs/audiographer/audiographer/broadcast_info.h
index cdc0aaac3a..dd776d17af 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 <stdint.h>
+
#include <string>
#include <ctime>
diff --git a/libs/audiographer/audiographer/debug_utils.h b/libs/audiographer/audiographer/debug_utils.h
index b11f065b42..a8c63e85b6 100644
--- a/libs/audiographer/audiographer/debug_utils.h
+++ b/libs/audiographer/audiographer/debug_utils.h
@@ -8,6 +8,7 @@
#ifdef __GNUC__
#include <cxxabi.h>
+#include <cstdlib>
#endif
#include "audiographer/visibility.h"
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 <cstdio>
#include <string>
+#include <glib.h>
+#include <glib/gstdio.h>
+
#include "sndfile_writer.h"
#include "sndfile_reader.h"
@@ -18,7 +21,7 @@ class TmpFile : public SndfileWriter<T>, public SndfileReader<T>
/// \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)
{}
diff --git a/libs/audiographer/private/gdither/gdither.cc b/libs/audiographer/private/gdither/gdither.cc
index fe9ecc655a..75e16d7863 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);
@@ -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) {
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);
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<float>(SF_FORMAT_WAV | SF_FORMAT_FLOAT, channels, 44100));
AllocatingProcessContext<float> c (random_data, frames, channels);
c.set_flag (ProcessContext<float>::EndOfInput);