[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bgluon=5D_audio=3A_Fix_GluonAudio_compiling_errors_o?=
From:       andriusr <andriusmao () gmail ! com>
Date:       2011-01-25 1:21:14
Message-ID: 20110125012114.CBAD8A6094 () git ! kde ! org
[Download RAW message or body]

Git commit b3f927e05c0bf364e5f537ab74b8343d8dced7b6 by andriusr. on behalf of Andrius da Costa Ribas
Pushed by andriusr into branch 'master'.

Fix GluonAudio compiling errors on Windows/MSVC.

M  +7    -1    audio/CMakeLists.txt     
M  +3    -3    audio/alure/src/streamdec.cpp     
M  +2    -1    audio/engine.cpp     

http://commits.kde.org/fad2ae7b/b3f927e05c0bf364e5f537ab74b8343d8dced7b6

diff --git a/audio/CMakeLists.txt b/audio/CMakeLists.txt
index edee3d9..bfb3e78 100644
--- a/audio/CMakeLists.txt
+++ b/audio/CMakeLists.txt
@@ -72,6 +72,12 @@ if(GLUON_BUILD_ALL)
     add_dependencies(GluonAudio GluonCore)
 endif()
 
+IF(WIN32)
+    SET(ALURE_LIBRARY ALURE32-static)
+ELSE(WIN32)
+    SET(ALURE_LIBRARY alure-static)
+ENDIF(WIN32)
+
 target_link_libraries(
     GluonAudio
     ${GLUON_CORE_LIBS}
@@ -79,7 +85,7 @@ target_link_libraries(
     ${SNDFILE_LIBRARY}
     ${OGG_LIBRARY}
     ${VORBISFILE_LIBRARY}
-    alure-static
+    ${ALURE_LIBRARY}
 )
 
 set(GLUON_AUDIO_LIBS
diff --git a/audio/alure/src/streamdec.cpp b/audio/alure/src/streamdec.cpp
index c2915d5..9c4bf6b 100644
--- a/audio/alure/src/streamdec.cpp
+++ b/audio/alure/src/streamdec.cpp
@@ -258,7 +258,7 @@ struct wavStream : public alureStream {
       : alureStream(_fstream), format(0), dataStart(0)
     {
         ALubyte buffer[25];
-        int length;
+        ALuint length;
 
         if(!fstream->read(reinterpret_cast<char*>(buffer), 12) ||
            memcmp(buffer, "RIFF", 4) != 0 || memcmp(buffer+8, "WAVE", 4) != 0)
@@ -301,13 +301,13 @@ struct wavStream : public alureStream {
                 length -= 16;
 
                 /* Look for any extra data and try to find the format */
-                int extrabytes = 0;
+                ALuint extrabytes = 0;
                 if(length >= 2)
                 {
                     extrabytes = read_le16(fstream);
                     length -= 2;
                 }
-                extrabytes = std::min(extrabytes, length);
+                extrabytes = std::min<ALuint>(extrabytes, length);
 
                 if(type == 0x0001)
                     format = GetSampleFormat(channels, sampleSize, false);
diff --git a/audio/engine.cpp b/audio/engine.cpp
index 0b63d03..38e0c59 100644
--- a/audio/engine.cpp
+++ b/audio/engine.cpp
@@ -21,6 +21,7 @@
 
 #include <QtCore/QStringList>
 #include <QtGui/QVector3D>
+#define ALURE_STATIC_LIBRARY
 #include "alure/include/AL/alure.h"
 
 using namespace GluonAudio;
@@ -30,7 +31,7 @@ template<> Engine* GluonCore::Singleton<Engine>::m_instance = 0;
 class Engine::EnginePrivate {
 public:
     EnginePrivate() : bufferLength(250000), buffersPerStream(3) {}
-    ~EnginePrivate();
+    ~EnginePrivate() {}
     
     QHash<QString, ALuint> bufferHash;
     int bufferLength;

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic