MIX_MSToFrames - Man Page
Convert milliseconds to sample frames at a specific sample rate.
Synopsis
#include <SDL3_mixer/SDL_mixer.h> Sint64 MIX_MSToFrames(int sample_rate, Sint64 ms);
Description
If sample_rate is <= 0, this returns -1. If ms is < 0, this returns -1.
Function Parameters
- sample_rate
the sample rate to use for conversion.
- ms
the milliseconds to convert to rate-specific sample frames.
Return Value
Returns Converted number of sample frames, or -1 for errors; call SDL_GetError() for details.
Thread Safety
It is safe to call this function from any thread.
Availability
This function is available since SDL_mixer 3.0.0.
See Also
Info
SDL_mixer 3.2.4 SDL_mixer3 FUNCTIONS