public void Rewind() { EnsureFileSourceHandleValid(); if (SDL2_nmix.NMIX_Rewind(FileSourceHandle) < 0) { _log.Error($"Failed to rewind the requested audio source: {SDL2.SDL_GetError()}"); } }
public override void Stop() { EnsureHandleValid(); EnsureFileSourceHandleValid(); if (SDL2_nmix.NMIX_Pause(Handle) < 0) { _log.Error($"Failed to stop the audio source [pause]: {SDL2.SDL_GetError()}"); return; } if (SDL2_nmix.NMIX_Rewind(FileSourceHandle) < 0) { _log.Error($"Failed to stop the audio source [rewind]: {SDL2.SDL_GetError()}"); return; } Status = PlaybackStatus.Stopped; }