src/common/resource/audio/VorbisDecoder.cpp
//! Appends next packet onto data.
Appends next packet onto data.
Appends next packet onto data .
void VorbisDecoder::readNextPacketImpl(std::vector<char> &data) {
	int current_section;
	long readBytes = ov_read(&vf, readBuffer, 4096, 0, 2, 1, &current_section);
	if (readBytes < 0) {
		LOGE("Unavailable to decode ogg stream");
		throw std::runtime_error("Unavailable to decode ogg stream");
	} else if (readBytes > 0) {
		data.insert(data.end(), &(readBuffer[0]), &(readBuffer[readBytes]));
	} else {
		LOGW("No packets left to read from ogg vorbis stream");
	}
}
void VorbisDecoder :: readNextPacketImpl ( std :: vector < char > & data ) { int current_section ; long readBytes = ov_read ( & vf , readBuffer , 4096 , 0 , 2 , 1 , & current_section ) ; if ( readBytes < 0 ) { LOGE ( " " ) ; throw std :: runtime_error ( " " ) ; } else if ( readBytes > 0 ) { data . insert ( data . end ( ) , & ( readBuffer [ 0 ] ) , & ( readBuffer [ readBytes ] ) ) ; } else { LOGW ( " " ) ; } }
Appends next packet onto data.
Appends next packet onto data .