mixPauseTrack function mixer

bool mixPauseTrack(
  1. Pointer<MixTrack> track
)

Pause a currently-playing track.

A paused track is not considered "stopped," so its MIX_TrackStoppedCallback will not fire if paused, but it won't change state by default, generate audio, or generally make progress, until it is resumed.

It is legal to pause a track that's in any state (playing, already paused, or stopped). Unless the track is currently playing, pausing does nothing, and returns true. A false return is only used to signal errors here (such as MIX_Init not being called or track being NULL).

\param track the track to pause. \returns true if the track has paused, false on error; call SDL_GetError() for details.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL_mixer 3.0.0.

\sa MIX_ResumeTrack

extern SDL_DECLSPEC bool SDLCALL MIX_PauseTrack(MIX_Track *track)

Implementation

bool mixPauseTrack(Pointer<MixTrack> track) {
  final mixPauseTrackLookupFunction = _libMixer
      .lookupFunction<
        Uint8 Function(Pointer<MixTrack> track),
        int Function(Pointer<MixTrack> track)
      >('MIX_PauseTrack');
  return mixPauseTrackLookupFunction(track) == 1;
}