fix for Opus

This commit is contained in:
rafael@riseup.net 2013-05-19 18:12:48 +00:00
parent c1a801eaa5
commit 921e519555
1 changed files with 5 additions and 5 deletions

View File

@ -135,11 +135,6 @@ OpusLibEncoder :: init ( unsigned int outMaxBitrate )
#endif
}
int bufferSize = (getInBitsPerSample()/8) * getInChannel() * 480;
internalBuffer = new unsigned char[bufferSize];
internalBufferLength = 0;
memset( internalBuffer, 0, bufferSize);
encoderOpen = false;
}
@ -163,6 +158,11 @@ OpusLibEncoder :: open ( void )
"opus lib opening underlying sink error");
}
int bufferSize = (getInBitsPerSample()/8) * getInChannel() * 480;
internalBuffer = new unsigned char[bufferSize];
internalBufferLength = 0;
memset( internalBuffer, 0, bufferSize);
int err;
opusEncoder = opus_encoder_create( getOutSampleRate(),
getInChannel(),