bug fix for server 64 samples support
This commit is contained in:
parent
0eedcd8061
commit
c7dcfe855e
4 changed files with 9 additions and 7 deletions
|
@ -29,6 +29,8 @@ TODO #71 Increase "stability" of Connection Setup server list
|
||||||
|
|
||||||
TODO update text in CAboutDlg
|
TODO update text in CAboutDlg
|
||||||
|
|
||||||
|
TODO mixer faders linear -> log gain is better
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -790,14 +790,14 @@ void CClient::Init()
|
||||||
opus_custom_encoder_ctl ( OpusEncoderMono,
|
opus_custom_encoder_ctl ( OpusEncoderMono,
|
||||||
OPUS_SET_BITRATE (
|
OPUS_SET_BITRATE (
|
||||||
CalcBitRateBitsPerSecFromCodedBytes (
|
CalcBitRateBitsPerSecFromCodedBytes (
|
||||||
iCeltNumCodedBytes ) ) );
|
iCeltNumCodedBytes, SYSTEM_FRAME_SIZE_SAMPLES ) ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
opus_custom_encoder_ctl ( OpusEncoderStereo,
|
opus_custom_encoder_ctl ( OpusEncoderStereo,
|
||||||
OPUS_SET_BITRATE (
|
OPUS_SET_BITRATE (
|
||||||
CalcBitRateBitsPerSecFromCodedBytes (
|
CalcBitRateBitsPerSecFromCodedBytes (
|
||||||
iCeltNumCodedBytes ) ) );
|
iCeltNumCodedBytes, SYSTEM_FRAME_SIZE_SAMPLES ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// inits for network and channel
|
// inits for network and channel
|
||||||
|
@ -1122,7 +1122,7 @@ void CClient::ProcessAudioDataIntern ( CVector<int16_t>& vecsStereoSndCrd )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// TEST
|
// TEST
|
||||||
// fid=fopen('v.dat','r');x=fread(fid,'int16');fclose(fid);
|
// fid=fopen('c:\\temp\test2.dat','r');x=fread(fid,'int16');fclose(fid);
|
||||||
static FILE* pFileDelay = fopen("c:\\temp\\test2.dat", "wb");
|
static FILE* pFileDelay = fopen("c:\\temp\\test2.dat", "wb");
|
||||||
short sData[2];
|
short sData[2];
|
||||||
for (i = 0; i < iMonoBlockSizeSam; i++)
|
for (i = 0; i < iMonoBlockSizeSam; i++)
|
||||||
|
|
|
@ -1103,7 +1103,7 @@ JitterMeas.Measure();
|
||||||
// so for speed optimization it would be better to set it only if the network
|
// so for speed optimization it would be better to set it only if the network
|
||||||
// frame size is changed
|
// frame size is changed
|
||||||
opus_custom_encoder_ctl ( CurOpusEncoder,
|
opus_custom_encoder_ctl ( CurOpusEncoder,
|
||||||
OPUS_SET_BITRATE ( CalcBitRateBitsPerSecFromCodedBytes ( iCeltNumCodedBytes ) ) );
|
OPUS_SET_BITRATE ( CalcBitRateBitsPerSecFromCodedBytes ( iCeltNumCodedBytes, iCurRawDataLen ) ) );
|
||||||
|
|
||||||
opus_custom_encode ( CurOpusEncoder,
|
opus_custom_encode ( CurOpusEncoder,
|
||||||
&vecsSendData[iB * SYSTEM_FRAME_SIZE_SAMPLES_SMALL * vecNumAudioChannels[i]],
|
&vecsSendData[iB * SYSTEM_FRAME_SIZE_SAMPLES_SMALL * vecNumAudioChannels[i]],
|
||||||
|
|
|
@ -95,10 +95,10 @@ void DebugError ( const QString& pchErDescr,
|
||||||
const double dPar2 );
|
const double dPar2 );
|
||||||
|
|
||||||
// calculate the bit rate in bits per second from the number of coded bytes
|
// calculate the bit rate in bits per second from the number of coded bytes
|
||||||
inline int CalcBitRateBitsPerSecFromCodedBytes ( const int iCeltNumCodedBytes )
|
inline int CalcBitRateBitsPerSecFromCodedBytes ( const int iCeltNumCodedBytes,
|
||||||
|
const int iFrameSize )
|
||||||
{
|
{
|
||||||
return ( SYSTEM_SAMPLE_RATE_HZ * iCeltNumCodedBytes * 8 ) /
|
return ( SYSTEM_SAMPLE_RATE_HZ * iCeltNumCodedBytes * 8 ) / iFrameSize;
|
||||||
SYSTEM_FRAME_SIZE_SAMPLES;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue