fix the isnan check for agent bearing

This commit is contained in:
Stephen Birarda 2013-05-29 11:22:25 -07:00
parent f45062a097
commit 1fb61faded

View file

@ -7,6 +7,7 @@
//
#include <cstring>
#include <math.h>
#include "PacketHeaders.h"
@ -57,7 +58,8 @@ int AudioRingBuffer::parseData(unsigned char* sourceBuffer, int numBytes) {
dataBuffer += sizeof(_bearing);
// if this agent sent us a NaN bearing then don't consider this good audio and bail
if (_bearing != _bearing) {
if (std::isnan(_bearing)) {
printf("Got a nan bearing for this agent\n");
_endOfLastWrite = _nextOutput = _buffer;
_started = false;
return 0;