$OpenBSD: patch-src_mumble_AudioOutput_cpp,v 1.2 2019/08/05 17:42:40 sthen Exp $

chunk 1 - unbreak with protobuf 3.7+

chunk 2 - do not use non-existent template version of std::abs
commit ea861fe86743c8402bbad77d8d1dd9de8dce447e

Index: src/mumble/AudioOutput.cpp
--- src/mumble/AudioOutput.cpp.orig
+++ src/mumble/AudioOutput.cpp
@@ -37,13 +37,15 @@
 #include "AudioOutputSample.h"
 #include "AudioOutputSpeech.h"
 #include "User.h"
-#include "Global.h"
 #include "Message.h"
 #include "Plugins.h"
 #include "PacketDataStream.h"
 #include "ServerHandler.h"
 #include "VoiceRecorder.h"
 
+// We define a global macro called 'g'. This can lead to issues when included code uses 'g' as a type or parameter name (like protobuf 3.7 does). As such, for now, we have to make this our last include.
+#include "Global.h"
+
 // Remember that we cannot use static member classes that are not pointers, as the constructor
 // for AudioOutputRegistrar() might be called before they are initialized, as the constructor
 // is called from global initialization.
@@ -431,7 +433,7 @@ bool AudioOutput::mix(void *outbuff, unsigned int nsam
 					top[2] = 0.0f;
 				}
 
-				if (std::abs<float>(front[0] * top[0] + front[1] * top[1] + front[2] * top[2]) > 0.01f) {
+				if (std::abs(front[0] * top[0] + front[1] * top[1] + front[2] * top[2]) > 0.01f) {
 					// Not perpendicular. Assume Y up and rotate 90 degrees.
 
 					float azimuth = 0.0f;
