FluidSynth / fluidsynth

Software synthesizer based on the SoundFont 2 specifications
https://www.fluidsynth.org
GNU Lesser General Public License v2.1
1.82k stars 254 forks source link

Pausing does not work #1296

Closed mmehl closed 9 months ago

mmehl commented 9 months ago

FluidSynth version

Execute fluidsynth --version and provide the output.

FluidSynth runtime version 2.3.3 Copyright (C) 2000-2023 Peter Hanappe and others. Distributed under the LGPL license. SoundFont(R) is a registered trademark of Creative Technology Ltd.

FluidSynth executable version 2.3.3 Sample type=double

Describe the bug

In EasyABC the libfluidsynth is used to play midi files. Playing works as expected, but pausing and resuming does not work. See https://github.com/jwdj/EasyABC/issues/78#issuecomment-1871037480 The message "fluidsynth: error: The maximum playback duration has been reached. Terminating player!" is shown when restart playing after stopping.

The following extract from a Python program shows the sequence of commands executed which leads to this error:

errcode = fluidsynth.fluid_player_add(player, c_char_p(b(midifile)))
if (errcode!=0): logging.warning("add midi failed")

errcode = fluidsynth.fluid_player_seek(player, 0)
if (errcode!=0): logging.warning("seek failed")

errcode = fluidsynth.fluid_player_play(player)
if (errcode!=0): logging.warning("play failed")

time.sleep(1)

errcode = fluidsynth.fluid_player_stop(player)
if (errcode!=0): logging.warning("stop failed")

errcode = fluidsynth.fluid_player_play(player)
if (errcode!=0): logging.warning("continue failed")
derselbst commented 9 months ago

Duplicate of #1272. Use fluidsynth 2.3.4.