Skip to content

Commit

Permalink
Fix voice stream steam-to-steam
Browse files Browse the repository at this point in the history
  • Loading branch information
s1lentq committed Jul 9, 2017
1 parent b83914b commit d271a42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion revoice/src/SteamP2PCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ int CSteamP2PCodec::StreamDecode(const char *pCompressed, int compressedBytes, c

// Invalid or unknown opcode
default:
LCPrintf(true, "CSteamP2PCodec::StreamDecode() called on client(%d) with unknown voice codec opcode (%d)\n", m_Client->GetId(), opcode);
// LCPrintf(true, "CSteamP2PCodec::StreamDecode() called on client(%d) with unknown voice codec opcode (%d)\n", m_Client->GetId(), opcode);
return 0;
}
}
Expand Down
6 changes: 2 additions & 4 deletions revoice/src/revoice_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,9 @@ void SV_ParseVoiceData_emu(IGameClient *cl)

char transcodedBuf[4096];

char *opusData = nullptr;
char *silkData = nullptr;
char *speexData = nullptr;

int opusDataLen = 0;
int silkDataLen = 0;
int speexDataLen = 0;

Expand All @@ -105,9 +103,9 @@ void SV_ParseVoiceData_emu(IGameClient *cl)
if (nDataLength > MAX_OPUS_DATA_LEN || srcPlayer->GetVoiceRate() > MAX_OPUS_VOICE_RATE)
return;

opusData = chReceived; opusDataLen = nDataLength;
silkData = chReceived; silkDataLen = nDataLength;
speexData = transcodedBuf;
speexDataLen = TranscodeVoice(srcPlayer, opusData, opusDataLen, srcPlayer->GetOpusCodec(), srcPlayer->GetSpeexCodec(), transcodedBuf, sizeof(transcodedBuf));
speexDataLen = TranscodeVoice(srcPlayer, silkData, silkDataLen, srcPlayer->GetOpusCodec(), srcPlayer->GetSpeexCodec(), transcodedBuf, sizeof(transcodedBuf));
break;
}
case vct_speex:
Expand Down

0 comments on commit d271a42

Please sign in to comment.