Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorvald Natvig <slicer@users.sourceforge.net>2009-03-26 23:57:19 +0300
committerThorvald Natvig <slicer@users.sourceforge.net>2009-03-26 23:57:19 +0300
commit1a7e9e8b6b800c24e175370c0fa97e1d1f1585cc (patch)
treec47bf8ee6ede06a329cf00a005b9cf4adf31e09e
parent1718cde75e4c0db7b74376b847d58559d646ce1e (diff)
Indent, changelog and submodule update
-rw-r--r--CHANGES9
-rw-r--r--compiler.pri244
-rw-r--r--main.pro2
-rw-r--r--overlay_macx/injector/mach_inject.h90
-rw-r--r--overlay_macx/overlay/mach_override.h146
-rw-r--r--overlay_macx/stub/stub.h2
-rw-r--r--plugins/dys/dys.pro8
-rw-r--r--plugins/l4d/l4d.pro14
-rw-r--r--plugins/link/link.pro34
-rw-r--r--plugins/tf2/tf2.pro14
-rw-r--r--speexbuild/AGC.cpp102
-rw-r--r--speexbuild/ResampMark.cpp138
-rw-r--r--speexbuild/SpeexMark.cpp20
-rw-r--r--speexbuild/config.h4
-rw-r--r--speexbuild/speexbuild.pro4
-rw-r--r--src/Message.cpp46
-rw-r--r--src/Message.h2
-rw-r--r--src/mumble/ACLEditor.cpp12
-rw-r--r--src/mumble/AudioOutput.cpp14
-rw-r--r--src/mumble/BanEditor.cpp2
-rw-r--r--src/mumble/Messages.cpp8
-rw-r--r--src/mumble/mumble.pro4
-rw-r--r--src/murmur/murmur.pro4
23 files changed, 468 insertions, 455 deletions
diff --git a/CHANGES b/CHANGES
index d25c8d8ac..ba777459b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,12 @@
+2009-03-26
+ Thorvald Natvig <slicer@users.sourceforge.net>
+ 1718cde Make Mumble compile with protobuf.
+
+ Tuck Therebelos <snares@users.sourceforge.net>
+ e36f901 Gmod addresses update
+ efe2334 Updated L4D for Build 3790
+ 35d6fd2 crlf
+
2009-03-23
Thorvald Natvig <slicer@users.sourceforge.net>
2fd181a Make ProtoBuf work on Win32
diff --git a/compiler.pri b/compiler.pri
index b33b880bc..2277c6e49 100644
--- a/compiler.pri
+++ b/compiler.pri
@@ -1,122 +1,122 @@
-CONFIG *= warn_on
-
-win32 {
- INCLUDEPATH *= /dev/WinSDK/include /dev/dxsdk/Include /dev/Boost/include/boost-1_38
- CONFIG(intelcpp) {
- DEFINES *= RESTRICT=restrict
- DEFINES *= VAR_ARRAYS
- QMAKE_CC = icl
- QMAKE_CXX = icl
- QMAKE_LIB = xilib /nologo
- QMAKE_LINK = xilink
- QMAKE_CFLAGS *= -Qstd=c99 -Qrestrict -Qvc9
- QMAKE_CXXFLAGS *= -Qstd=c++0x -Qrestrict -Qvc9
- # Disable IPO and -GL due to bugs in Intel C++ 11.0
- QMAKE_CFLAGS_RELEASE *= -O3 -Ob0
- QMAKE_CFLAGS_RELEASE -= -GL
- QMAKE_CXXFLAGS_RELEASE *= -O3 -Ob0
- QMAKE_CXXFLAGS_RELEASE -= -GL
- QMAKE_CFLAGS_DEBUG *= -O2 -Ob0
- QMAKE_CXXFLAGS_DEBUG *= -O2 -Ob0
-
- CONFIG(optgen) {
- QMAKE_CFLAGS *= -Qprof-gen
- QMAKE_CXXFLAGS *= -Qprof-gen
- }
-
- CONFIG(optimize) {
- QMAKE_CFLAGS *= -Qprof-use
- QMAKE_CXXFLAGS *= -Qprof-use
- }
- } else {
- DEFINES *= RESTRICT=
- }
-
- CONFIG(symbols) {
- QMAKE_CFLAGS_RELEASE *= -GR -Zi -Oy-
- QMAKE_CXXFLAGS_RELEASE *= -GR -Zi -Oy-
- QMAKE_LFLAGS *= -fixed:no -debug
- }
-
-} else {
- DEFINES *= RESTRICT=__restrict__
- CONFIG(opt-gcc) {
- QMAKE_CC = /opt/gcc/bin/gcc
- QMAKE_CXX = /opt/gcc/bin/g++
- QMAKE_LINK = /opt/gcc/bin/g++
- }
-
- QMAKE_CFLAGS *= -Wshadow -Wconversion -Wsign-compare -fvisibility=hidden
- QMAKE_CXXFLAGS *= -Wshadow -Woverloaded-virtual -Wold-style-cast -Wconversion -Wsign-compare -fvisibility=hidden
- !macx {
- QMAKE_LFLAGS *= -Wl,--as-needed
- }
-
- CONFIG(optgen) {
- QMAKE_CFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-generate
- QMAKE_CXXFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-generate
- QMAKE_LFLAGS *= -fprofile-generate
- }
-
- CONFIG(optimize) {
- QMAKE_CFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-use
- QMAKE_CXXFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-use
- }
-
- CONFIG(symbols) {
- QMAKE_CFLAGS *= -g
- QMAKE_CXXFLAGS *= -g
- }
-}
-
-macx {
- INCLUDEPATH *= /opt/mumble/boost
-
- CONFIG(cocoa) {
- QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5
- QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.5.sdk
-
- CONFIG += x86_64
- QMAKE_CFLAGS += -mmmx -msse
- QMAKE_CXXFLAGS += -mmmx -msse
- } else {
- QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
- QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.4u.sdk
-
- CONFIG(debug, debug|release) {
- CONFIG += no-universal
- }
-
- !CONFIG(no-universal) {
- CONFIG += x86 ppc
-
- # Precompiled headers are broken when using Makefiles.
- !macx-xcode {
- CONFIG += no-pch
- }
- }
-
- ARCH=$$system(uname -m)
- GCC42=$$system(readlink /usr/bin/gcc | grep "gcc-4.[2-9][.0-9]*")
- !isEmpty(GCC42):!CONFIG(no-gcc42) {
- QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.5.sdk
- QMAKE_CFLAGS += -mmacosx-version-min=10.4
- QMAKE_CXXFLAGS += -mmacosx-version-min=10.4
- contains(ARCH, 'i386') {
- QMAKE_CFLAGS += -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
- QMAKE_CXXFLAGS += -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
- }
- } else {
- CONFIG(no-universal):contains(ARCH, 'i386') {
- QMAKE_CFLAGS += -mmmx -msse -msse2
- QMAKE_CXXFLAGS += -mmmx -msse -msse2
- }
- }
- }
-}
-
-CONFIG(no-pch) {
- CONFIG -= precompile_header
-} else {
- CONFIG *= precompile_header
-}
+CONFIG *= warn_on
+
+win32 {
+ INCLUDEPATH *= /dev/WinSDK/include /dev/dxsdk/Include /dev/Boost/include/boost-1_38
+ CONFIG(intelcpp) {
+ DEFINES *= RESTRICT=restrict
+ DEFINES *= VAR_ARRAYS
+ QMAKE_CC = icl
+ QMAKE_CXX = icl
+ QMAKE_LIB = xilib /nologo
+ QMAKE_LINK = xilink
+ QMAKE_CFLAGS *= -Qstd=c99 -Qrestrict -Qvc9
+ QMAKE_CXXFLAGS *= -Qstd=c++0x -Qrestrict -Qvc9
+ # Disable IPO and -GL due to bugs in Intel C++ 11.0
+ QMAKE_CFLAGS_RELEASE *= -O3 -Ob0
+ QMAKE_CFLAGS_RELEASE -= -GL
+ QMAKE_CXXFLAGS_RELEASE *= -O3 -Ob0
+ QMAKE_CXXFLAGS_RELEASE -= -GL
+ QMAKE_CFLAGS_DEBUG *= -O2 -Ob0
+ QMAKE_CXXFLAGS_DEBUG *= -O2 -Ob0
+
+ CONFIG(optgen) {
+ QMAKE_CFLAGS *= -Qprof-gen
+ QMAKE_CXXFLAGS *= -Qprof-gen
+ }
+
+ CONFIG(optimize) {
+ QMAKE_CFLAGS *= -Qprof-use
+ QMAKE_CXXFLAGS *= -Qprof-use
+ }
+ } else {
+ DEFINES *= RESTRICT=
+ }
+
+ CONFIG(symbols) {
+ QMAKE_CFLAGS_RELEASE *= -GR -Zi -Oy-
+ QMAKE_CXXFLAGS_RELEASE *= -GR -Zi -Oy-
+ QMAKE_LFLAGS *= -fixed:no -debug
+ }
+
+} else {
+ DEFINES *= RESTRICT=__restrict__
+ CONFIG(opt-gcc) {
+ QMAKE_CC = /opt/gcc/bin/gcc
+ QMAKE_CXX = /opt/gcc/bin/g++
+ QMAKE_LINK = /opt/gcc/bin/g++
+ }
+
+ QMAKE_CFLAGS *= -Wshadow -Wconversion -Wsign-compare -fvisibility=hidden
+ QMAKE_CXXFLAGS *= -Wshadow -Woverloaded-virtual -Wold-style-cast -Wconversion -Wsign-compare -fvisibility=hidden
+ !macx {
+ QMAKE_LFLAGS *= -Wl,--as-needed
+ }
+
+ CONFIG(optgen) {
+ QMAKE_CFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-generate
+ QMAKE_CXXFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-generate
+ QMAKE_LFLAGS *= -fprofile-generate
+ }
+
+ CONFIG(optimize) {
+ QMAKE_CFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-use
+ QMAKE_CXXFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-use
+ }
+
+ CONFIG(symbols) {
+ QMAKE_CFLAGS *= -g
+ QMAKE_CXXFLAGS *= -g
+ }
+}
+
+macx {
+ INCLUDEPATH *= /opt/mumble/boost
+
+ CONFIG(cocoa) {
+ QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5
+ QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.5.sdk
+
+ CONFIG += x86_64
+ QMAKE_CFLAGS += -mmmx -msse
+ QMAKE_CXXFLAGS += -mmmx -msse
+ } else {
+ QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
+ QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.4u.sdk
+
+ CONFIG(debug, debug|release) {
+ CONFIG += no-universal
+ }
+
+ !CONFIG(no-universal) {
+ CONFIG += x86 ppc
+
+ # Precompiled headers are broken when using Makefiles.
+ !macx-xcode {
+ CONFIG += no-pch
+ }
+ }
+
+ ARCH=$$system(uname -m)
+ GCC42=$$system(readlink /usr/bin/gcc | grep "gcc-4.[2-9][.0-9]*")
+ !isEmpty(GCC42):!CONFIG(no-gcc42) {
+ QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.5.sdk
+ QMAKE_CFLAGS += -mmacosx-version-min=10.4
+ QMAKE_CXXFLAGS += -mmacosx-version-min=10.4
+ contains(ARCH, 'i386') {
+ QMAKE_CFLAGS += -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
+ QMAKE_CXXFLAGS += -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
+ }
+ } else {
+ CONFIG(no-universal):contains(ARCH, 'i386') {
+ QMAKE_CFLAGS += -mmmx -msse -msse2
+ QMAKE_CXXFLAGS += -mmmx -msse -msse2
+ }
+ }
+ }
+}
+
+CONFIG(no-pch) {
+ CONFIG -= precompile_header
+} else {
+ CONFIG *= precompile_header
+}
diff --git a/main.pro b/main.pro
index eefa861c1..8bba1ac79 100644
--- a/main.pro
+++ b/main.pro
@@ -6,7 +6,7 @@ CONFIG *= ordered debug_and_release
CONFIG *= no-bundled-speex
}
!CONFIG(no-bundled-speex) {
- SUBDIRS *= speexbuild
+ SUBDIRS *= speexbuild
}
SUBDIRS *= src/mumble plugins
diff --git a/overlay_macx/injector/mach_inject.h b/overlay_macx/injector/mach_inject.h
index 65b977e03..4df66aa7b 100644
--- a/overlay_macx/injector/mach_inject.h
+++ b/overlay_macx/injector/mach_inject.h
@@ -4,11 +4,11 @@
Some rights reserved: <http://opensource.org/licenses/mit-license.php>
***************************************************************************/
-
+
/***************************************************************************//**
@mainpage mach_inject
@author Jonathan 'Wolf' Rentzsch: <http://rentzsch.com>
-
+
This package, coded in C to the Mach API, allows you to "inject" code into
an arbitrary process. "Injection" means both 1) copying over the necessary
code into the target's address space and 2) remotely creating a new thread
@@ -25,7 +25,7 @@
#include <stddef.h> // for ptrdiff_t
#ifdef __cplusplus
- extern "C" {
+extern "C" {
#endif
#define err_threadEntry_image_not_found (err_local|1)
@@ -33,55 +33,55 @@
#define INJECT_ENTRY injectEntry
#define INJECT_ENTRY_SYMBOL "injectEntry"
-typedef void (*mach_inject_entry)( ptrdiff_t codeOffset, void *paramBlock,
- size_t paramSize, void* dummy_pthread_data );
-
-/***************************************************************************//**
- Starts executing threadEntry in a new thread in the process specified by
- targetProcess.
-
- @param threadEntry -> Required pointer to injected thread's entry
- point.
- @param paramBlock -> Optional pointer to block of memory to pass to
- the injected thread.
- @param paramSize -> Optional size of paramBlock.
- @param targetProcess -> Required target process ID.
- @param stackSize -> Optional stack size of threadEntry's thread. Set
- to zero for default (currently 8K usable).
- @result <- mach_error_t
+ typedef void (*mach_inject_entry)(ptrdiff_t codeOffset, void *paramBlock,
+ size_t paramSize, void* dummy_pthread_data);
- ***************************************************************************/
+ /***************************************************************************//**
+ Starts executing threadEntry in a new thread in the process specified by
+ targetProcess.
+
+ @param threadEntry -> Required pointer to injected thread's entry
+ point.
+ @param paramBlock -> Optional pointer to block of memory to pass to
+ the injected thread.
+ @param paramSize -> Optional size of paramBlock.
+ @param targetProcess -> Required target process ID.
+ @param stackSize -> Optional stack size of threadEntry's thread. Set
+ to zero for default (currently 8K usable).
+ @result <- mach_error_t
+
+ ***************************************************************************/
mach_error_t
-mach_inject(
- const mach_inject_entry threadEntry,
- const void *paramBlock,
- size_t paramSize,
- pid_t targetProcess,
- vm_size_t stackSize );
+ mach_inject(
+ const mach_inject_entry threadEntry,
+ const void *paramBlock,
+ size_t paramSize,
+ pid_t targetProcess,
+ vm_size_t stackSize);
-/***************************************************************************//**
- Given a pointer, returns its Mach-O image and image size.
-
- @param pointer -> Required pointer.
- @param image <- Optional returned pointer to image (really a
- mach_header).
- @param size <- Optional returned size of the image.
- @param jumpTableOffset <- Optional returned offset of jump table within image (useful on intel)
- @param jumpTableSize <- Optional returned size of jump table (useful on intel)
- @result <- mach_error_t
-
- ***************************************************************************/
+ /***************************************************************************//**
+ Given a pointer, returns its Mach-O image and image size.
+
+ @param pointer -> Required pointer.
+ @param image <- Optional returned pointer to image (really a
+ mach_header).
+ @param size <- Optional returned size of the image.
+ @param jumpTableOffset <- Optional returned offset of jump table within image (useful on intel)
+ @param jumpTableSize <- Optional returned size of jump table (useful on intel)
+ @result <- mach_error_t
+
+ ***************************************************************************/
mach_error_t
-machImageForPointer(
- const void *pointer,
- const void **image,
- unsigned long *size,
- unsigned int *jumpTableOffset,
- unsigned int *jumpTableSize );
+ machImageForPointer(
+ const void *pointer,
+ const void **image,
+ unsigned long *size,
+ unsigned int *jumpTableOffset,
+ unsigned int *jumpTableSize);
#ifdef __cplusplus
- }
+}
#endif
#endif // _mach_inject_ \ No newline at end of file
diff --git a/overlay_macx/overlay/mach_override.h b/overlay_macx/overlay/mach_override.h
index 8584fc387..685f1deb1 100644
--- a/overlay_macx/overlay/mach_override.h
+++ b/overlay_macx/overlay/mach_override.h
@@ -8,14 +8,14 @@
/***************************************************************************//**
@mainpage mach_override
@author Jonathan 'Wolf' Rentzsch: <http://rentzsch.com>
-
+
This package, coded in C to the Mach API, allows you to override ("patch")
program- and system-supplied functions at runtime. You can fully replace
functions with your implementations, or merely head- or tail-patch the
original implementations.
-
+
Use it by #include'ing mach_override.h from your .c, .m or .mm file(s).
-
+
@todo Discontinue use of Carbon's MakeDataExecutable() and
CompareAndSwap() calls and start using the Mach equivalents, if they
exist. If they don't, write them and roll them in. That way, this
@@ -49,79 +49,79 @@
#include <mach/error.h>
#ifdef __cplusplus
- extern "C" {
+extern "C" {
#endif
-/**
- Returned if the function to be overrided begins with a 'mfctr' instruction.
-*/
+ /**
+ Returned if the function to be overrided begins with a 'mfctr' instruction.
+ */
#define err_cannot_override (err_local|1)
-/***************************************************************************//**
- Dynamically overrides the function implementation referenced by
- originalFunctionSymbolName with the implentation pointed to by
- overrideFunctionAddress. Optionally returns a pointer to a "reentry island"
- which, if jumped to, will resume the original implementation.
-
- @param originalFunctionSymbolName -> Required symbol name of the
- function to override (with
- overrideFunctionAddress).
- Remember, C function name
- symbols are prepended with an
- underscore.
- @param originalFunctionLibraryNameHint -> Optional name of the library
- which contains
- originalFunctionSymbolName. Can
- be NULL, but this may result in
- the wrong function being
- overridden and/or a crash.
- @param overrideFunctionAddress -> Required address to the
- overriding function.
- @param originalFunctionReentryIsland <- Optional pointer to pointer to
- the reentry island. Can be NULL.
- @result <- err_cannot_override if the
- original function's
- implementation begins with the
- 'mfctr' instruction.
+ /***************************************************************************//**
+ Dynamically overrides the function implementation referenced by
+ originalFunctionSymbolName with the implentation pointed to by
+ overrideFunctionAddress. Optionally returns a pointer to a "reentry island"
+ which, if jumped to, will resume the original implementation.
+
+ @param originalFunctionSymbolName -> Required symbol name of the
+ function to override (with
+ overrideFunctionAddress).
+ Remember, C function name
+ symbols are prepended with an
+ underscore.
+ @param originalFunctionLibraryNameHint -> Optional name of the library
+ which contains
+ originalFunctionSymbolName. Can
+ be NULL, but this may result in
+ the wrong function being
+ overridden and/or a crash.
+ @param overrideFunctionAddress -> Required address to the
+ overriding function.
+ @param originalFunctionReentryIsland <- Optional pointer to pointer to
+ the reentry island. Can be NULL.
+ @result <- err_cannot_override if the
+ original function's
+ implementation begins with the
+ 'mfctr' instruction.
+
+ ***************************************************************************/
+
+ mach_error_t
+ mach_override(
+ char *originalFunctionSymbolName,
+ const char *originalFunctionLibraryNameHint,
+ const void *overrideFunctionAddress,
+ void **originalFunctionReentryIsland);
+
+ /************************************************************************************//**
+ Dynamically overrides the function implementation referenced by
+ originalFunctionAddress with the implentation pointed to by overrideFunctionAddress.
+ Optionally returns a pointer to a "reentry island" which, if jumped to, will resume
+ the original implementation.
+
+ @param originalFunctionAddress -> Required address of the function to
+ override (with overrideFunctionAddress).
+ @param overrideFunctionAddress -> Required address to the overriding
+ function.
+ @param originalFunctionReentryIsland <- Optional pointer to pointer to the
+ reentry island. Can be NULL.
+ @result <- err_cannot_override if the original
+ function's implementation begins with
+ the 'mfctr' instruction.
+
+ ************************************************************************************/
+
+ mach_error_t
+ mach_override_ptr(
+ void *originalFunctionAddress,
+ const void *overrideFunctionAddress,
+ void **originalFunctionReentryIsland);
+
+ /************************************************************************************//**
+
+
+ ************************************************************************************/
- ***************************************************************************/
-
- mach_error_t
-mach_override(
- char *originalFunctionSymbolName,
- const char *originalFunctionLibraryNameHint,
- const void *overrideFunctionAddress,
- void **originalFunctionReentryIsland );
-
-/************************************************************************************//**
- Dynamically overrides the function implementation referenced by
- originalFunctionAddress with the implentation pointed to by overrideFunctionAddress.
- Optionally returns a pointer to a "reentry island" which, if jumped to, will resume
- the original implementation.
-
- @param originalFunctionAddress -> Required address of the function to
- override (with overrideFunctionAddress).
- @param overrideFunctionAddress -> Required address to the overriding
- function.
- @param originalFunctionReentryIsland <- Optional pointer to pointer to the
- reentry island. Can be NULL.
- @result <- err_cannot_override if the original
- function's implementation begins with
- the 'mfctr' instruction.
-
- ************************************************************************************/
-
- mach_error_t
-mach_override_ptr(
- void *originalFunctionAddress,
- const void *overrideFunctionAddress,
- void **originalFunctionReentryIsland );
-
-/************************************************************************************//**
-
-
- ************************************************************************************/
-
#ifdef __cplusplus
#define MACH_OVERRIDE( ORIGINAL_FUNCTION_RETURN_TYPE, ORIGINAL_FUNCTION_NAME, ORIGINAL_FUNCTION_ARGS, ERR ) \
@@ -148,10 +148,10 @@ mach_override_ptr(
\
err = mach_override_class__##ORIGINAL_FUNCTION_NAME::override((void*)ORIGINAL_FUNCTION_NAME); \
}
-
+
#endif
#ifdef __cplusplus
- }
+}
#endif
#endif // _mach_override_ \ No newline at end of file
diff --git a/overlay_macx/stub/stub.h b/overlay_macx/stub/stub.h
index 02beab019..b94502f3f 100644
--- a/overlay_macx/stub/stub.h
+++ b/overlay_macx/stub/stub.h
@@ -4,7 +4,7 @@
Based on mach_inject_bundle_stub.h
Copyright (c) 2003-2009 Jonathan 'Wolf' Rentzsch: <http://rentzsch.com>
Some rights reserved: <http://opensource.org/licenses/mit-license.php>
-
+
Design inspired by SCPatchLoader, by Jon Gotow of St. Clair Software:
<http://www.stclairsoft.com>
diff --git a/plugins/dys/dys.pro b/plugins/dys/dys.pro
index f5d61ee49..8b99e7520 100644
--- a/plugins/dys/dys.pro
+++ b/plugins/dys/dys.pro
@@ -1,5 +1,5 @@
-include(../plugins.pri)
-
-TARGET = dys
-SOURCES = dys.cpp
+include(../plugins.pri)
+
+TARGET = dys
+SOURCES = dys.cpp
LIBS += -luser32 \ No newline at end of file
diff --git a/plugins/l4d/l4d.pro b/plugins/l4d/l4d.pro
index 8b4eedf4c..19a41f583 100644
--- a/plugins/l4d/l4d.pro
+++ b/plugins/l4d/l4d.pro
@@ -1,7 +1,7 @@
-include(../plugins.pri)
-
-TARGET = l4d
-SOURCES = l4d.cpp
-LIBS += -luser32
-
-
+include(../plugins.pri)
+
+TARGET = l4d
+SOURCES = l4d.cpp
+LIBS += -luser32
+
+
diff --git a/plugins/link/link.pro b/plugins/link/link.pro
index 849c63206..10694b901 100644
--- a/plugins/link/link.pro
+++ b/plugins/link/link.pro
@@ -1,17 +1,17 @@
-include(../plugins.pri)
-
-TARGET = link
-
-win32 {
- SOURCES = link.cpp
- LIBS += -luser32
-}
-
-unix {
- SOURCES = link-posix.cpp
-
- !macx {
- LIBS += -lrt
- }
-}
-
+include(../plugins.pri)
+
+TARGET = link
+
+win32 {
+ SOURCES = link.cpp
+ LIBS += -luser32
+}
+
+unix {
+ SOURCES = link-posix.cpp
+
+ !macx {
+ LIBS += -lrt
+ }
+}
+
diff --git a/plugins/tf2/tf2.pro b/plugins/tf2/tf2.pro
index 0f95c989d..891b35250 100644
--- a/plugins/tf2/tf2.pro
+++ b/plugins/tf2/tf2.pro
@@ -1,7 +1,7 @@
-include(../plugins.pri)
-
-TARGET = tf2
-SOURCES = tf2.cpp
-LIBS += -luser32
-
-
+include(../plugins.pri)
+
+TARGET = tf2
+SOURCES = tf2.cpp
+LIBS += -luser32
+
+
diff --git a/speexbuild/AGC.cpp b/speexbuild/AGC.cpp
index 96b7060a4..06595b51d 100644
--- a/speexbuild/AGC.cpp
+++ b/speexbuild/AGC.cpp
@@ -19,32 +19,34 @@
template<class T>
static inline double veccomp(const QVector<T> &a, const QVector<T> &b, const char *n) {
- long double rms = 0.0;
- long double gdiff = 0.0;
- if (a.size() != b.size()) {
- qFatal("%s: %d <=> %d", n, a.size(), b.size());
- }
- for(int i=0;i<a.size();++i) {
- double diff = fabs(a[i] - b[i]);
- rms += diff * diff;
- if (diff > gdiff)
- gdiff = diff;
+ long double rms = 0.0;
+ long double gdiff = 0.0;
+ if (a.size() != b.size()) {
+ qFatal("%s: %d <=> %d", n, a.size(), b.size());
+ }
+ for (int i=0;i<a.size();++i) {
+ double diff = fabs(a[i] - b[i]);
+ rms += diff * diff;
+ if (diff > gdiff)
+ gdiff = diff;
#ifdef EXACT
- if (a[i] != b[i]) {
+ if (a[i] != b[i]) {
#else
- union { T tv; uint32_t uv; } v1, v2;
- v1.uv = v2.uv = 0;
- v1.tv = a[i];
- v2.tv = b[i];
- if (fabsf(a[i] - b[i]) > 1000) {
- qWarning("%08x %08x %08x", v1.uv, v2.uv, v1.uv ^ v2.uv);
+ union { T tv;
+ uint32_t uv;
+ } v1, v2;
+ v1.uv = v2.uv = 0;
+ v1.tv = a[i];
+ v2.tv = b[i];
+ if (fabsf(a[i] - b[i]) > 1000) {
+ qWarning("%08x %08x %08x", v1.uv, v2.uv, v1.uv ^ v2.uv);
#endif
- qFatal("%s: Offset %d: %.10g <=> %.10g", n, i, static_cast<double>(a[i]), static_cast<double>(b[i]));
- }
- }
- return gdiff;
- return sqrt(rms / a.size());
+ qFatal("%s: Offset %d: %.10g <=> %.10g", n, i, static_cast<double>(a[i]), static_cast<double>(b[i]));
+ }
+ }
+ return gdiff;
+ return sqrt(rms / a.size());
}
int main(int argc, char **argv) {
@@ -59,15 +61,15 @@ int main(int argc, char **argv) {
qFatal("Failed to open file!");
}
f.seek(36 + 8);
-
+
QFile o("output.agc");
if (! o.open(QIODevice::WriteOnly))
qFatal("Failed to open out file!");
-
+
QFile vf("verify.agc");
- if (! vf.open(QIODevice::ReadOnly))
+ if (! vf.open(QIODevice::ReadOnly))
qWarning("No verify!");
-
+
QDataStream out(&o);
QDataStream verify(&vf);
@@ -80,15 +82,15 @@ int main(int argc, char **argv) {
speex_preprocess_ctl(spp, SPEEX_PREPROCESS_SET_DENOISE, &iarg);
speex_preprocess_ctl(spp, SPEEX_PREPROCESS_SET_AGC, &iarg);
speex_preprocess_ctl(spp, SPEEX_PREPROCESS_SET_DEREVERB, &iarg);
-
+
iarg = 1;
speex_preprocess_ctl(spp, SPEEX_PREPROCESS_SET_AGC, &iarg);
iarg = 21747;
speex_preprocess_ctl(spp, SPEEX_PREPROCESS_SET_AGC_TARGET, &iarg);
-
+
QVector<QByteArray> v;
- while(1) {
+ while (1) {
QByteArray qba = f.read(iFrameSize * sizeof(short));
if (qba.size() != iFrameSize * sizeof(short))
break;
@@ -101,18 +103,18 @@ int main(int argc, char **argv) {
QVector<short *> qvIn;
QVector<short> sIn(nframes * iFrameSize);
-
- for(int i=0;i<nframes;i++) {
+
+ for (int i=0;i<nframes;i++) {
const short *ptr = reinterpret_cast<const short *>(v[i].constData());
short *s = sIn.data() + i * iFrameSize;
- for(int j=0;j<iFrameSize;++j)
+ for (int j=0;j<iFrameSize;++j)
s[j] = ptr[j];
qvIn.append(s);
}
-
+
#ifdef Q_OS_WIN
- if (!SetPriorityClass(GetCurrentProcess(),REALTIME_PRIORITY_CLASS))
- qWarning("Application: Failed to set priority!");
+ if (!SetPriorityClass(GetCurrentProcess(),REALTIME_PRIORITY_CLASS))
+ qWarning("Application: Failed to set priority!");
#endif
Timer t;
@@ -120,36 +122,36 @@ int main(int argc, char **argv) {
CALLGRIND_START_INSTRUMENTATION;
- for(int i=0;i<nframes;i++) {
+ for (int i=0;i<nframes;i++) {
speex_preprocess_run(spp, qvIn[i]);
-
+
int v;
speex_preprocess_ctl(spp, SPEEX_PREPROCESS_GET_AGC_GAIN, &v);
qWarning("%d %d", i, v);
-
+
}
CALLGRIND_STOP_INSTRUMENTATION;
quint64 e = t.elapsed();
#ifdef Q_OS_WIN
- if (!SetPriorityClass(GetCurrentProcess(),NORMAL_PRIORITY_CLASS))
- qWarning("Application: Failed to reset priority!");
+ if (!SetPriorityClass(GetCurrentProcess(),NORMAL_PRIORITY_CLASS))
+ qWarning("Application: Failed to reset priority!");
#endif
qWarning("Used %llu usec", e);
qWarning("%.2f times realtime", (20000ULL * nframes) / (e * 1.0));
-
- if (! RUNNING_ON_VALGRIND) {
-
- out << sIn;
-
- if (vf.isOpen()) {
- QVector<short> vIn;
- verify >> vIn;
- veccomp(vIn, sIn, "AGC");
+
+ if (! RUNNING_ON_VALGRIND) {
+
+ out << sIn;
+
+ if (vf.isOpen()) {
+ QVector<short> vIn;
+ verify >> vIn;
+ veccomp(vIn, sIn, "AGC");
+ }
}
-}
return 0;
}
diff --git a/speexbuild/ResampMark.cpp b/speexbuild/ResampMark.cpp
index 195486d2a..ea26fe350 100644
--- a/speexbuild/ResampMark.cpp
+++ b/speexbuild/ResampMark.cpp
@@ -38,7 +38,7 @@ static inline double veccomp(const QVector<T> &a, const QVector<T> &b, const cha
if (a.size() != b.size()) {
qFatal("%s: %d <=> %d", n, a.size(), b.size());
}
- for(int i=0;i<a.size();++i) {
+ for (int i=0;i<a.size();++i) {
double diff = fabs(a[i] - b[i]);
rms += diff * diff;
if (diff > gdiff)
@@ -47,7 +47,9 @@ static inline double veccomp(const QVector<T> &a, const QVector<T> &b, const cha
if (a[i] != b[i]) {
#else
- union { T tv; quint32 uv; } v1, v2;
+ union { T tv;
+ quint32 uv;
+ } v1, v2;
v1.uv = v2.uv = 0;
v1.tv = a[i];
v2.tv = b[i];
@@ -63,23 +65,23 @@ static inline double veccomp(const QVector<T> &a, const QVector<T> &b, const cha
template<class T>
QPair<T, T> confint(const QVector<T> &vecin) {
- long double avg = 0.0;
- long double stddev = 0.0;
- QVector<T> vec = vecin;
- qSort(vec.begin(), vec.end());
- for(int i=0;i<vec.count() / 20;++i) {
- vec.pop_front();
- vec.pop_back();
- }
-
- foreach(T v, vec)
- avg += v;
- avg /= vec.count();
-
- foreach(T v, vec)
- stddev += (v-avg)*(v-avg);
- stddev = sqrtl(stddev / vec.count());
- return QPair<T,T>(static_cast<T>(avg), static_cast<T>(1.96 * stddev));
+ long double avg = 0.0;
+ long double stddev = 0.0;
+ QVector<T> vec = vecin;
+ qSort(vec.begin(), vec.end());
+ for (int i=0;i<vec.count() / 20;++i) {
+ vec.pop_front();
+ vec.pop_back();
+ }
+
+ foreach(T v, vec)
+ avg += v;
+ avg /= vec.count();
+
+ foreach(T v, vec)
+ stddev += (v-avg)*(v-avg);
+ stddev = sqrtl(stddev / vec.count());
+ return QPair<T,T>(static_cast<T>(avg), static_cast<T>(1.96 * stddev));
}
int main(int argc, char **argv) {
@@ -111,7 +113,7 @@ int main(int argc, char **argv) {
const int iFrameSize = 320;
QVector<QByteArray> v;
- while(1) {
+ while (1) {
QByteArray qba = f.read(iFrameSize * 2);
if (qba.size() != iFrameSize * 2)
break;
@@ -154,11 +156,11 @@ int main(int argc, char **argv) {
QVector<float> f96(nframes * iOutSize96);
QVector<float> f8(nframes *iOutSize8);
- for(int i=0;i<nframes;i++) {
+ for (int i=0;i<nframes;i++) {
short *s = reinterpret_cast<short *>(v[i].data());
float *f = fInput.data() + i * iFrameSize;
- for(int j=0;j<iFrameSize;j++)
+ for (int j=0;j<iFrameSize;j++)
f[j]=s[j]+20;
qvInShort.append(s);
@@ -183,8 +185,8 @@ int main(int argc, char **argv) {
#ifdef Q_OS_WIN
- if (!SetPriorityClass(GetCurrentProcess(),REALTIME_PRIORITY_CLASS))
- qWarning("Application: Failed to set priority!");
+ if (!SetPriorityClass(GetCurrentProcess(),REALTIME_PRIORITY_CLASS))
+ qWarning("Application: Failed to set priority!");
#endif
int len;
@@ -213,7 +215,7 @@ int main(int argc, char **argv) {
sched_yield();
#endif
- for(int i=0;i<nframes;++i) {
+ for (int i=0;i<nframes;++i) {
inlen = iFrameSize;
outlen = iOutSize96;
speex_resampler_process_float(srsto96, 0, qvIn[i], &inlen, qv96[i], &outlen);
@@ -222,9 +224,9 @@ int main(int argc, char **argv) {
QVector<unsigned long long> qvTimes;
QPair<unsigned long long, unsigned long long> ci;
- for(int j=0;j<loops;j++) {
+ for (int j=0;j<loops;j++) {
t.restart();
- for(int i=0;i<nframes;i++) {
+ for (int i=0;i<nframes;i++) {
inlen = iFrameSize;
outlen = iOutSize1;
speex_resampler_process_float(srs1, 0, qvIn[i], &inlen, qvDirect[i], &outlen);
@@ -234,12 +236,12 @@ int main(int argc, char **argv) {
}
ci = confint(qvTimes);
qWarning("Direct: %8llu +/- %3llu usec (%d)", ci.first, ci.second, qvTimes.count(), qvTimes.count());
-
+
qvTimes.clear();
- for(int j=0;j<loops;j++) {
+ for (int j=0;j<loops;j++) {
t.restart();
- for(int i=0;i<nframes;i++) {
+ for (int i=0;i<nframes;i++) {
inlen = iFrameSize;
outlen = iOutSize2;
speex_resampler_process_float(srs2, 0, qvIn[i], &inlen, qvInterpolate[i], &outlen);
@@ -251,9 +253,9 @@ int main(int argc, char **argv) {
qWarning("Interpolate: %8llu +/- %3llu usec (%d)", ci.first, ci.second, qvTimes.count());
qvTimes.clear();
- for(int j=0;j<loops;j++) {
+ for (int j=0;j<loops;j++) {
t.restart();
- for(int i=0;i<nframes;i++) {
+ for (int i=0;i<nframes;i++) {
inlen = iOutSize96;
outlen = iOutSize8;
speex_resampler_process_float(srs96to8, 0, qv96[i], &inlen, qv8[i], &outlen);
@@ -266,9 +268,9 @@ int main(int argc, char **argv) {
qvTimes.clear();
t.restart();
- for(int j=0;j<loops;j++) {
+ for (int j=0;j<loops;j++) {
t.restart();
- for(int i=0;i<nframes;i++) {
+ for (int i=0;i<nframes;i++) {
inlen = iOutSize8;
outlen = iOutSize96;
speex_resampler_process_float(srs8to96, 0, qv8[i], &inlen, qv96[i], &outlen);
@@ -279,14 +281,14 @@ int main(int argc, char **argv) {
ci = confint(qvTimes);
qWarning("8 => 96: %8llu +/- %3llu usec (%d)", ci.first, ci.second, qvTimes.count());
- speex_resampler_reset_mem(srs1);
- speex_resampler_reset_mem(srs2);
+ speex_resampler_reset_mem(srs1);
+ speex_resampler_reset_mem(srs2);
}
t.restart();
CALLGRIND_START_INSTRUMENTATION;
- for(int i=0;i<nframes;i++) {
+ for (int i=0;i<nframes;i++) {
inlen = iFrameSize;
outlen = iOutSize1;
speex_resampler_process_float(srs1, 0, qvIn[i], &inlen, qvDirect[i], &outlen);
@@ -306,48 +308,48 @@ int main(int argc, char **argv) {
e = t.elapsed();
#ifdef Q_OS_WIN
- if (!SetPriorityClass(GetCurrentProcess(),NORMAL_PRIORITY_CLASS))
- qWarning("Application: Failed to reset priority!");
+ if (!SetPriorityClass(GetCurrentProcess(),NORMAL_PRIORITY_CLASS))
+ qWarning("Application: Failed to reset priority!");
#endif
const int freq[10] = { 22050, 32000, 11025, 16000, 48000, 41000, 8000, 96000, 11025, 1600 };
QVector<float> fMagic;
- for(int f=0;f<10;f++) {
+ for (int f=0;f<10;f++) {
float fbuff[32767];
speex_resampler_set_rate(srs1, 16000, freq[f]);
- for(int q = 0;q < 10;q++) {
+ for (int q = 0;q < 10;q++) {
speex_resampler_set_quality(srs1, (3*q) % 7);
inlen = iFrameSize;
outlen = 32767;
speex_resampler_process_float(srs1, 0, qvIn[(f*10+q) % nframes], &inlen, fbuff, &outlen);
- for(int j=0;j<outlen;j++)
+ for (int j=0;j<outlen;j++)
fMagic.append(fbuff[j]);
}
inlen = iFrameSize;
outlen = 32767;
speex_resampler_process_float(srs1, 0, NULL, &inlen, fbuff, &outlen);
- for(int j=0;j<outlen;j++)
+ for (int j=0;j<outlen;j++)
fMagic.append(fbuff[j]);
}
// Cropped magic test
- for(int f=0;f<10;f++) {
+ for (int f=0;f<10;f++) {
float fbuff[32767];
speex_resampler_set_rate(srs1, 16000, freq[f]);
- for(int q = 0;q < 10;q++) {
+ for (int q = 0;q < 10;q++) {
speex_resampler_set_quality(srs1, (3*q) % 7);
inlen = iFrameSize;
outlen = 16;
speex_resampler_process_float(srs1, 0, qvIn[(f*10+q) % nframes], &inlen, fbuff, &outlen);
- for(int j=0;j<outlen;j++)
+ for (int j=0;j<outlen;j++)
fMagic.append(fbuff[j]);
}
inlen = iFrameSize;
outlen = 32767;
speex_resampler_process_float(srs1, 0, NULL, &inlen, fbuff, &outlen);
- for(int j=0;j<outlen;j++)
+ for (int j=0;j<outlen;j++)
fMagic.append(fbuff[j]);
}
@@ -358,27 +360,27 @@ int main(int argc, char **argv) {
qWarning("%.2f times realtime", (20000ULL * nframes) / (e * 1.0));
if (! RUNNING_ON_VALGRIND) {
- QVector<float> vDirect;
- QVector<float> vInterpolate;
- QVector<short> vsInterpolate;
- QVector<float> vMagic;
- QVector<float> vInterpolateMC;
-
- out << fDirect << fInterpolate << sInterpolate << fMagic << fInterpolateMC;
-
- if (vf.isOpen()) {
- verify >> vDirect >> vInterpolate >> vsInterpolate >> vMagic >> vInterpolateMC;
-
- double rmsd = veccomp(vDirect, fDirect, "SRS1");
- double rmsi = veccomp(vInterpolate, fInterpolate, "SRS2");
- veccomp(vsInterpolate, sInterpolate, "SRS2i");
- veccomp(vMagic, fMagic, "Magic");
- veccomp(vInterpolateMC, fInterpolateMC, "MC");
- qWarning("Direct: %g", rmsd);
- qWarning("Interp: %g", rmsi);
- } else {
- qWarning("No verification!");
- }
+ QVector<float> vDirect;
+ QVector<float> vInterpolate;
+ QVector<short> vsInterpolate;
+ QVector<float> vMagic;
+ QVector<float> vInterpolateMC;
+
+ out << fDirect << fInterpolate << sInterpolate << fMagic << fInterpolateMC;
+
+ if (vf.isOpen()) {
+ verify >> vDirect >> vInterpolate >> vsInterpolate >> vMagic >> vInterpolateMC;
+
+ double rmsd = veccomp(vDirect, fDirect, "SRS1");
+ double rmsi = veccomp(vInterpolate, fInterpolate, "SRS2");
+ veccomp(vsInterpolate, sInterpolate, "SRS2i");
+ veccomp(vMagic, fMagic, "Magic");
+ veccomp(vInterpolateMC, fInterpolateMC, "MC");
+ qWarning("Direct: %g", rmsd);
+ qWarning("Interp: %g", rmsi);
+ } else {
+ qWarning("No verification!");
+ }
}
return 0;
diff --git a/speexbuild/SpeexMark.cpp b/speexbuild/SpeexMark.cpp
index c23d6533e..cf997ef6e 100644
--- a/speexbuild/SpeexMark.cpp
+++ b/speexbuild/SpeexMark.cpp
@@ -66,7 +66,7 @@ int main(int argc, char **argv) {
void *dec = speex_decoder_init(&speex_wb_mode);
iarg = 1;
- speex_decoder_ctl(dec, SPEEX_SET_ENH, &iarg);
+ speex_decoder_ctl(dec, SPEEX_SET_ENH, &iarg);
SpeexPreprocessState *spp = speex_preprocess_state_init(iFrameSize, 16000);
iarg = 1;
@@ -81,7 +81,7 @@ int main(int argc, char **argv) {
speex_preprocess_ctl(spp, SPEEX_PREPROCESS_SET_ECHO_STATE, ses);
QVector<QByteArray> v;
- while(1) {
+ while (1) {
QByteArray qba = f.read(iFrameSize * 2);
if (qba.size() != iFrameSize * 2)
break;
@@ -95,10 +95,10 @@ int main(int argc, char **argv) {
QVector<short *> sv;
short tframe[2048];
- for(int i=0;i<iFrameSize;i++)
+ for (int i=0;i<iFrameSize;i++)
tframe[i] = 0;
- for(int i=0;i<nframes;i++) {
+ for (int i=0;i<nframes;i++) {
sv.append(reinterpret_cast<short *>(v[i].data()));
}
@@ -122,8 +122,8 @@ int main(int argc, char **argv) {
speex_bits_init(&sb);
#ifdef Q_OS_WIN
- if (!SetPriorityClass(GetCurrentProcess(),REALTIME_PRIORITY_CLASS))
- qWarning("Application: Failed to set priority!");
+ if (!SetPriorityClass(GetCurrentProcess(),REALTIME_PRIORITY_CLASS))
+ qWarning("Application: Failed to set priority!");
#endif
int len;
@@ -140,8 +140,8 @@ int main(int argc, char **argv) {
CALLGRIND_START_INSTRUMENTATION;
- for(int j=0;j<iter;j++) {
- for(int i=0;i<nframes-2;i++) {
+ for (int j=0;j<iter;j++) {
+ for (int i=0;i<nframes-2;i++) {
speex_bits_reset(&sb);
speex_echo_cancellation(ses, sv[i], sv[i+2], tframe);
@@ -170,8 +170,8 @@ int main(int argc, char **argv) {
quint64 e = t.elapsed();
#ifdef Q_OS_WIN
- if (!SetPriorityClass(GetCurrentProcess(),NORMAL_PRIORITY_CLASS))
- qWarning("Application: Failed to reset priority!");
+ if (!SetPriorityClass(GetCurrentProcess(),NORMAL_PRIORITY_CLASS))
+ qWarning("Application: Failed to reset priority!");
#endif
qWarning("Used %llu usec", e);
diff --git a/speexbuild/config.h b/speexbuild/config.h
index 9792b9d10..7b3f42b68 100644
--- a/speexbuild/config.h
+++ b/speexbuild/config.h
@@ -20,7 +20,7 @@
/* #undef FIXED_POINT */
/* Compile as floating-point */
-#define FLOATING_POINT
+#define FLOATING_POINT
/* Define to 1 if you have the <alloca.h> header file. */
#define HAVE_ALLOCA_H 1
@@ -119,7 +119,7 @@
/* #undef USE_ALLOCA */
/* Use C99 variable-size arrays */
-#define VAR_ARRAYS
+#define VAR_ARRAYS
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
diff --git a/speexbuild/speexbuild.pro b/speexbuild/speexbuild.pro
index ef63befe7..de3c42aa3 100644
--- a/speexbuild/speexbuild.pro
+++ b/speexbuild/speexbuild.pro
@@ -23,7 +23,7 @@ DEFINES += NDEBUG HAVE_CONFIG_H
INCLUDEPATH = ../speex/include ../speex/libspeex
win32 {
- INCLUDEPATH += ../speex/win32
+ INCLUDEPATH += ../speex/win32
DEFINES+=WIN32 _WINDOWS _USE_SSE _USE_MATH_DEFINES
}
@@ -44,5 +44,5 @@ CONFIG(debug, debug|release) {
CONFIG(release, debug|release) {
DESTDIR = ../release
}
-
+
diff --git a/src/Message.cpp b/src/Message.cpp
index 7e42de08a..8a3b06253 100644
--- a/src/Message.cpp
+++ b/src/Message.cpp
@@ -32,30 +32,30 @@
#include "murmur_pch.h"
void MessageHandler::dispatch(Connection *cCon, const QByteArray &msg) {
-/*
- switch (type) {
- case MessageHandler::Version: {
- MumbleProto::Version mpv;
- mpv.ParseFromArray(msg.constData(), msg.size());
- msgVersion(cCon, &mpv);
- }
- break;
- default:
- break;
- }
-*/
+ /*
+ switch (type) {
+ case MessageHandler::Version: {
+ MumbleProto::Version mpv;
+ mpv.ParseFromArray(msg.constData(), msg.size());
+ msgVersion(cCon, &mpv);
+ }
+ break;
+ default:
+ break;
+ }
+ */
}
void MessageHandler::messageToNetwork(const ::google::protobuf::Message &msg, unsigned int msgType, QByteArray &cache) {
- int len = msg.ByteSize();
- if (len > 0x7fffff)
- return;
- cache.resize(len + 4);
- unsigned char *uc = reinterpret_cast<unsigned char *>(cache.data());
- uc[0] = msgType;
- uc[1] = (len >> 16) & 0xFF;
- uc[2] = (len >> 8) & 0xFF;
- uc[3] = len & 0xFF;
-
- msg.SerializeToArray(uc + 4, len);
+ int len = msg.ByteSize();
+ if (len > 0x7fffff)
+ return;
+ cache.resize(len + 4);
+ unsigned char *uc = reinterpret_cast<unsigned char *>(cache.data());
+ uc[0] = msgType;
+ uc[1] = (len >> 16) & 0xFF;
+ uc[2] = (len >> 8) & 0xFF;
+ uc[3] = len & 0xFF;
+
+ msg.SerializeToArray(uc + 4, len);
}
diff --git a/src/Message.h b/src/Message.h
index 1cf5a5489..28fee884d 100644
--- a/src/Message.h
+++ b/src/Message.h
@@ -60,7 +60,7 @@ class MessageHandler {
#define MUMBLE_MH_MSG(x) x,
enum MessageType {
- MUMBLE_MH_ALL
+ MUMBLE_MH_ALL
};
#undef MUMBLE_MH_MSG
static void messageToNetwork(const ::google::protobuf::Message &msg, unsigned int msgType, QByteArray &cache);
diff --git a/src/mumble/ACLEditor.cpp b/src/mumble/ACLEditor.cpp
index 80d1eafb6..6a6f7705e 100644
--- a/src/mumble/ACLEditor.cpp
+++ b/src/mumble/ACLEditor.cpp
@@ -83,7 +83,7 @@ ACLEditor::ACLEditor(const MumbleProto::ACL &mea, QWidget *p) : QDialog(p) {
qlACLs << def;
- for(int i=0;i<mea.acls_size();++i) {
+ for (int i=0;i<mea.acls_size();++i) {
const MumbleProto::ACL_ChanACL &as = mea.acls(i);
ChanACL *acl = new ChanACL(NULL);
@@ -101,15 +101,15 @@ ACLEditor::ACLEditor(const MumbleProto::ACL &mea, QWidget *p) : QDialog(p) {
qlACLs << acl;
}
- for(int i=0;i<mea.groups_size();++i) {
+ for (int i=0;i<mea.groups_size();++i) {
const MumbleProto::ACL_ChanGroup &gs = mea.groups(i);
Group *gp = new Group(NULL, u8(gs.name()));
- for(int j=0;j<gs.add_size();++j)
+ for (int j=0;j<gs.add_size();++j)
gp->qsAdd.insert(gs.add(j));
- for(int j=0;j<gs.remove_size();++j)
+ for (int j=0;j<gs.remove_size();++j)
gp->qsRemove.insert(gs.remove(j));
- for(int j=0;j<gs.inherited_members_size();++j)
+ for (int j=0;j<gs.inherited_members_size();++j)
gp->qsTemporary.insert(gs.inherited_members(j));
qlGroups << gp;
@@ -234,7 +234,7 @@ void ACLEditor::returnQuery(const MumbleProto::QueryUsers &mqu) {
if (mqu.names_size() != mqu.ids_size())
return;
- for(int i=0;i < mqu.names_size(); ++i) {
+ for (int i=0;i < mqu.names_size(); ++i) {
int id = mqu.ids(i);
QString name = u8(mqu.names(i));
qhIDCache.insert(name, id);
diff --git a/src/mumble/AudioOutput.cpp b/src/mumble/AudioOutput.cpp
index 907575b8b..23e40d437 100644
--- a/src/mumble/AudioOutput.cpp
+++ b/src/mumble/AudioOutput.cpp
@@ -408,13 +408,13 @@ bool AudioOutputSpeech::needSamples(unsigned int snum) {
bLastAlive = false;
} else {
*/
- iMissCount++;
- if (iMissCount < 5) {
- speex_decode(dsDecState, NULL, pOut);
- } else {
- memset(pOut, 0, sizeof(float) * iFrameSize);
- bLastAlive = false;
- }
+ iMissCount++;
+ if (iMissCount < 5) {
+ speex_decode(dsDecState, NULL, pOut);
+ } else {
+ memset(pOut, 0, sizeof(float) * iFrameSize);
+ bLastAlive = false;
+ }
}
int activity;
diff --git a/src/mumble/BanEditor.cpp b/src/mumble/BanEditor.cpp
index ca1ac7c3a..9d98a7336 100644
--- a/src/mumble/BanEditor.cpp
+++ b/src/mumble/BanEditor.cpp
@@ -43,7 +43,7 @@ BanEditor::BanEditor(const MumbleProto::BanList &msg, QWidget *p) : QDialog(p) {
qleIP->setValidator(validator);
qlBans.clear();
- for(int i=0;i < msg.bans_size(); ++i) {
+ for (int i=0;i < msg.bans_size(); ++i) {
const MumbleProto::BanList_BanEntry &be = msg.bans(i);
quint32 v = 0;
std::string s = be.address();
diff --git a/src/mumble/Messages.cpp b/src/mumble/Messages.cpp
index d094f828c..f305881a7 100644
--- a/src/mumble/Messages.cpp
+++ b/src/mumble/Messages.cpp
@@ -261,7 +261,7 @@ void MainWindow::msgChannelState(Connection *, MumbleProto::ChannelState *msg) {
if (p) {
Channel *pp = p;
- while(pp) {
+ while (pp) {
if (pp == c)
return;
pp = pp->cParent;
@@ -278,7 +278,7 @@ void MainWindow::msgChannelState(Connection *, MumbleProto::ChannelState *msg) {
if (msg->links_size()) {
QList<Channel *> ql;
pmModel->unlinkAll(c);
- for(int i=0;i<msg->links_size();++i) {
+ for (int i=0;i<msg->links_size();++i) {
Channel *l = Channel::get(msg->links(i));
if (l)
ql << l;
@@ -288,7 +288,7 @@ void MainWindow::msgChannelState(Connection *, MumbleProto::ChannelState *msg) {
}
if (msg->links_remove_size()) {
QList<Channel *> ql;
- for(int i=0;i<msg->links_remove_size();++i) {
+ for (int i=0;i<msg->links_remove_size();++i) {
Channel *l = Channel::get(msg->links_remove(i));
if (l)
ql << l;
@@ -298,7 +298,7 @@ void MainWindow::msgChannelState(Connection *, MumbleProto::ChannelState *msg) {
}
if (msg->links_add_size()) {
QList<Channel *> ql;
- for(int i=0;i<msg->links_add_size();++i) {
+ for (int i=0;i<msg->links_add_size();++i) {
Channel *l = Channel::get(msg->links_add(i));
if (l)
ql << l;
diff --git a/src/mumble/mumble.pro b/src/mumble/mumble.pro
index 8144dfd24..c92fdb2ae 100644
--- a/src/mumble/mumble.pro
+++ b/src/mumble/mumble.pro
@@ -225,12 +225,12 @@ CONFIG(no-update) {
copytrans.CONFIG *= no_link target_predeps
QMAKE_EXTRA_COMPILERS *= copytrans
-
+
RESOURCES *= mumble_qt.qrc
}
lrel.output = ${QMAKE_FILE_BASE}.qm
-lrel.commands = $${QMAKE_LRELEASE} ${QMAKE_FILE_NAME}
+lrel.commands = $${QMAKE_LRELEASE} ${QMAKE_FILE_NAME}
lrel.input = TRANSLATIONS
lrel.CONFIG *= no_link target_predeps
diff --git a/src/murmur/murmur.pro b/src/murmur/murmur.pro
index acf464971..4adbf1df9 100644
--- a/src/murmur/murmur.pro
+++ b/src/murmur/murmur.pro
@@ -49,7 +49,7 @@ unix {
contains(UNAME, Linux) {
LIBS *= -lcap
}
-
+
contains(UNAME, FreeBSD) {
LIBS *= -lcrypto
} else {
@@ -86,7 +86,7 @@ ice {
LIBS *= -lIce -lIceUtil
}
DEFINES *= USE_ICE
-
+
win32 {
INCLUDEPATH *= /dev/Ice/include
LIBPATH *= /dev/Ice/lib