summaryrefslogtreecommitdiff
path: root/libs/backends/dummy
diff options
context:
space:
mode:
authorJohn Emmas <johne53@tiscali.co.uk>2016-05-03 17:30:58 +0100
committerJohn Emmas <johne53@tiscali.co.uk>2016-05-03 17:30:58 +0100
commitdc1a2fbca78cd0350ee39c75dfb865d57074c769 (patch)
treea6bc4c948eae486e92bed1c27a5ba8f3a7834312 /libs/backends/dummy
parenta12288d9b5188c7472ace238bbf88a345415fea2 (diff)
MSVC won't compile 'const float _demolition[]' because it uses 'divide by zero' while initializing
Hopefully we can use INFINITY and NAN for the relevant initializers ?
Diffstat (limited to 'libs/backends/dummy')
-rw-r--r--libs/backends/dummy/dummy_audiobackend.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/backends/dummy/dummy_audiobackend.cc b/libs/backends/dummy/dummy_audiobackend.cc
index b1e67982dc..069c393882 100644
--- a/libs/backends/dummy/dummy_audiobackend.cc
+++ b/libs/backends/dummy/dummy_audiobackend.cc
@@ -17,6 +17,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <math.h>
#include <sys/time.h>
#include <regex.h>
#include <stdlib.h>
@@ -1801,10 +1802,10 @@ static const float _demolition[] = {
4294967395.0f, /* 2^16 + 100 */
-4294967395.0f,
HUGE, /* Big, non-inf number */
- 1.f/0.f, /* +inf */
- -1.f/0.f, /* -inf */
- -0.f/0.f, /* -nan */
- 0.f/0.f, /* nan */
+ INFINITY, /* +inf */
+ -INFINITY, /* -inf */
+ -NAN, /* -nan */
+ NAN, /* nan */
0.0f, /* some silence to check for recovery */
};