Displaying 1 result from an estimated 1 matches for "outputblock".
Did you mean:
output_lock
2013 May 27
1
Empty buffer on encoder write byte
...20ms
size_t count = frameSize*channels / sizeof(opus_int16);
__block opus_int16 *pcmInput = calloc(count,
sizeof(opus_int16));
memcpy(pcmInput, audioBuffer.mData, count * sizeof(opus_int16));
[_encoder encodeWithPCMInput:pcmInput frameSize:frameSize
outputBlock:^(unsigned char *payloadOutput, opus_int32 payloadLength) {
// Send the audio data through UDP socket.
NSData *audioData = [NSData dataWithBytes:payloadOutput
length:payloadLength];
[_socket sendData:audioData toHost:RTC_SERVER_HOST
port:RTC_MEDIA_SE...