mixResumeTag function mixer

bool mixResumeTag(
  1. Pointer<MixMixer> mixer,
  2. String? tag
)

Resume all tracks with a specific tag.

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.

This function makes all currently-paused tracks on the specified mixer, with a specific tag, move to a playing state.

Tracks that match the specified tag that aren't currently paused are ignored.

\param mixer the mixer on which to resume tracks. \param tag the tag to use when searching for tracks. \returns true on success, 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 \sa MIX_PauseTrack \sa MIX_PauseTag \sa MIX_TagTrack

extern SDL_DECLSPEC bool SDLCALL MIX_ResumeTag(MIX_Mixer *mixer, const char *tag)

Implementation

bool mixResumeTag(Pointer<MixMixer> mixer, String? tag) {
  final mixResumeTagLookupFunction = _libMixer
      .lookupFunction<
        Uint8 Function(Pointer<MixMixer> mixer, Pointer<Utf8> tag),
        int Function(Pointer<MixMixer> mixer, Pointer<Utf8> tag)
      >('MIX_ResumeTag');
  final tagPointer = tag != null ? tag.toNativeUtf8() : nullptr;
  final result = mixResumeTagLookupFunction(mixer, tagPointer) == 1;
  calloc.free(tagPointer);
  return result;
}