table of contents
other versions
- experimental 3.1.2+git20260204~9ea9abe+ds-1
| MIX_AudioMSToFrames(3) | SDL_mixer3 FUNCTIONS | MIX_AudioMSToFrames(3) |
NAME¶
MIX_AudioMSToFrames - Convert milliseconds to sample frames for a MIX_Audio's format.
SYNOPSIS¶
#include <SDL3_mixer/SDL_mixer.h>
Sint64 MIX_AudioMSToFrames(MIX_Audio *audio, Sint64 ms);
DESCRIPTION¶
This calculates time based on the audio's initial format, even if the format would change mid-stream.
If ms is < 0, this returns -1.
FUNCTION PARAMETERS¶
RETURN VALUE¶
Returns Converted number of sample frames, or -1 for errors/no input; 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.1.3 | SDL_mixer |