Audio playback problem with FFmpeg + SDL

use FFmpeg+SDL to play audio files. When the playback is finished, you do not want to quit the player, and users can still play it by sliding the progress bar. So what is the idea of implementation in the program?

  1. where to determine whether the file has finished playing, to get the packet, or when using the packet?
  2. determines that the file has finished playing, so what should I do next? The player cannot be turned off.
Mar.11,2021

do you want to play multiple sounds at the same time?

Menu