| 320 | #endif |
| 321 | |
| 322 | static Sint64 |
| 323 | WaveAdjustToFactValue(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 | |
| 336 | static int |
| 337 | MS_ADPCM_CalculateSampleFrames(WaveFile *file, size_t datalength) |
no test coverage detected