MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / EncodeFlush

Function EncodeFlush

AudioEncode/aencode.cpp:974–988  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

972}
973
974void EncodeFlush(Encoder &enc) {
975 if (enc.m_samplesPerBlock == enc.m_blockSamplesRemaining) {
976 // no data in the block
977 return;
978 }
979
980 // Zero out the remaining data in the block
981 while (enc.m_blockSamplesRemaining != 0) {
982 *enc.m_pCurrBlockData++ = 0.0f;
983 --enc.m_blockSamplesRemaining;
984 }
985
986 // Send it off for processing
987 ProcessBlock(enc);
988}
989
990int32_t AudioEncode(ReadSampleFunction *read, void *data, unsigned channels, unsigned sample_rate, float volume,
991 FILE *out, int levels, int samples_per_subband, float comp_ratio) {

Callers 1

AudioEncodeFunction · 0.85

Calls 1

ProcessBlockFunction · 0.85

Tested by

no test coverage detected