table of contents
| MIX_MSToFrames(3) | SDL_mixer3 FUNCTIONS | MIX_MSToFrames(3) |
NAME¶
MIX_MSToFrames - 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¶
| SDL_mixer 3.2.0 | SDL_mixer |