.\" This manpage content is licensed under Creative Commons
.\"  Attribution 4.0 International (CC BY 4.0)
.\"   https://creativecommons.org/licenses/by/4.0/
.\" This manpage was generated from SDL_mixer's wiki page for MIX_FramesToMS:
.\"   https://wiki.libsdl.org/SDL3_mixer/MIX_FramesToMS
.\" Generated with SDL/build-scripts/wikiheaders.pl
.\"  revision 3.2.0+ds-1
.\" Please report issues in this manpage's content at:
.\"   https://github.com/libsdl-org/sdlwiki/issues/new
.\" Please report issues in the generation of this manpage from the wiki at:
.\"   https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20MIX_FramesToMS
.\" SDL_mixer can be found at https://libsdl.org/projects/SDL_mixer/
.de URL
\$2 \(laURL: \$1 \(ra\$3
..
.if \n[.g] .mso www.tmac
.TH MIX_FramesToMS 3 "SDL_mixer 3.2.0" "SDL_mixer" "SDL_mixer3 FUNCTIONS"
.SH NAME
MIX_FramesToMS \- Convert sample frames, at a specific sample rate, to milliseconds\[char46]
.SH SYNOPSIS
.nf
.B #include <SDL3_mixer/SDL_mixer.h>
.PP
.BI "Sint64 MIX_FramesToMS(int sample_rate, Sint64 frames);
.fi
.SH DESCRIPTION
Sample frames are more precise than milliseconds, so out of necessity, this function will approximate by rounding down to the closest full millisecond\[char46]
.PP
If
.BR sample_rate
is <= 0, this returns -1\[char46] If
.BR frames
is < 0, this returns
-1\[char46]

.SH FUNCTION PARAMETERS
.TP
.I sample_rate
the sample rate to use for conversion\[char46]
.TP
.I frames
the rate-specific sample frames to convert to milliseconds\[char46]
.SH RETURN VALUE
Returns Converted number of milliseconds, or -1 for errors; call SDL_GetError() for details\[char46]

.SH THREAD SAFETY
It is safe to call this function from any thread\[char46]

.SH AVAILABILITY
This function is available since SDL_mixer 3\[char46]0\[char46]0\[char46]

.SH SEE ALSO
.BR MIX_MSToFrames (3)
