MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / WaveAdjustToFactValue

Function WaveAdjustToFactValue

deps/SDL2/src/audio/SDL_wave.c:322–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320#endif
321
322static Sint64
323WaveAdjustToFactValue(WaveFile *file, Sint64 sampleframes)
324{
325 if (file->fact.status == 2) {
326 if (file->facthint == FactStrict && sampleframes < file->fact.samplelength) {
327 return SDL_SetError("Invalid number of sample frames in WAVE fact chunk (too many)");
328 } else if (sampleframes > file->fact.samplelength) {
329 return file->fact.samplelength;
330 }
331 }
332
333 return sampleframes;
334}
335
336static int
337MS_ADPCM_CalculateSampleFrames(WaveFile *file, size_t datalength)

Callers 6

LAW_InitFunction · 0.85
LAW_DecodeFunction · 0.85
PCM_InitFunction · 0.85
PCM_DecodeFunction · 0.85

Calls 1

SDL_SetErrorFunction · 0.85

Tested by

no test coverage detected