mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
correct the memcmp for audio stream identifier
This commit is contained in:
parent
82c373242f
commit
cfe4783fff
2 changed files with 6 additions and 2 deletions
|
@ -292,7 +292,9 @@ int main(int argc, const char* argv[]) {
|
|||
for (AgentList::iterator agent = agentList->begin(); agent != agentList->end(); agent++) {
|
||||
if (agent->getLinkedData()) {
|
||||
AudioRingBuffer* ringBuffer = (AudioRingBuffer*) agent->getLinkedData();
|
||||
if (memcmp(ringBuffer->getStreamIdentifier(), packetData + 1, sizeof(STREAM_IDENTIFIER_NUM_BYTES))) {
|
||||
if (memcmp(ringBuffer->getStreamIdentifier(),
|
||||
packetData + 1,
|
||||
sizeof(STREAM_IDENTIFIER_NUM_BYTES) == 0)) {
|
||||
// this is the matching stream, assign to matchingInjector and stop looking
|
||||
matchingInjector = &*agent;
|
||||
break;
|
||||
|
|
|
@ -37,6 +37,8 @@ const float EVE_PELVIS_HEIGHT = 0.565925f;
|
|||
const float AUDIO_INJECT_PROXIMITY = 0.4f;
|
||||
const int EVE_VOLUME_BYTE = 190;
|
||||
|
||||
const char EVE_AUDIO_FILENAME[] = "/etc/highfidelity/eve/resources/eve.raw"";
|
||||
|
||||
bool stopReceiveAgentDataThread;
|
||||
|
||||
void *receiveAgentData(void *args) {
|
||||
|
@ -114,7 +116,7 @@ int main(int argc, const char* argv[]) {
|
|||
AudioInjectionManager::setInjectorSocket(agentList->getAgentSocket());
|
||||
|
||||
// read eve's audio data
|
||||
AudioInjector eveAudioInjector("/etc/highfidelity/eve/resources/eve.raw");
|
||||
AudioInjector eveAudioInjector(EVE_AUDIO_FILENAME);
|
||||
|
||||
// lower Eve's volume by setting the attentuation modifier (this is a value out of 255)
|
||||
eveAudioInjector.setVolume(EVE_VOLUME_BYTE);
|
||||
|
|
Loading…
Reference in a new issue