From 7f26ba2ba3aa27a2d6d740ab508b6687ea012827 Mon Sep 17 00:00:00 2001 From: Jan Borsodi Date: Thu, 9 Sep 2010 23:25:11 +0200 Subject: [PATCH] Fix for Visual Studio 2008. stdint.h is not bundled with VS 2008, instead we use cstdint.hpp from BOOST. --- sound/outputs/openal_out.cpp | 5 +++-- sound/source.hpp | 4 +++- sound/sources/audiere_source.cpp | 5 ++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sound/outputs/openal_out.cpp b/sound/outputs/openal_out.cpp index 4a3c875d7..c0cae640e 100644 --- a/sound/outputs/openal_out.cpp +++ b/sound/outputs/openal_out.cpp @@ -55,8 +55,9 @@ static void checkALError(const char *where) static void getALFormat(SampleSourcePtr inp, int &fmt, int &rate) { - int ch, bits; - inp->getInfo(&rate, &ch, &bits); + int32_t rate_, ch, bits; + inp->getInfo(&rate_, &ch, &bits); + rate = rate_; fmt = 0; diff --git a/sound/source.hpp b/sound/source.hpp index 8d2a801bc..fbe7cf958 100644 --- a/sound/source.hpp +++ b/sound/source.hpp @@ -2,7 +2,7 @@ #define MANGLE_SOUND_SOURCE_H #include -#include +#include #include #include "../stream/stream.hpp" @@ -10,6 +10,8 @@ namespace Mangle { namespace Sound { +typedef boost::int32_t int32_t; + /// A stream containing raw sound data and information about the format class SampleSource : public Stream::Stream { diff --git a/sound/sources/audiere_source.cpp b/sound/sources/audiere_source.cpp index 9b97165be..4e5b6adce 100644 --- a/sound/sources/audiere_source.cpp +++ b/sound/sources/audiere_source.cpp @@ -17,7 +17,10 @@ using namespace Mangle::Sound; void AudiereSource::getInfo(int32_t *rate, int32_t *channels, int32_t *bits) { SampleFormat fmt; - sample->getFormat(*channels, *rate, fmt); + int channels_, rate_; + sample->getFormat(channels_, rate_, fmt); + *channels = channels_; + *rate = rate_; if(bits) { if(fmt == SF_U8)