From 58ec452054db2009ee438109d51026fe645c6ea7 Mon Sep 17 00:00:00 2001 From: loki666 Date: Fri, 3 Nov 2017 21:11:32 +0100 Subject: [PATCH] update api doc fluid_player_seek returns FLUID_FAILED if ticks is negative --- src/midi/fluid_midi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/midi/fluid_midi.c b/src/midi/fluid_midi.c index 1e58d4ad..02e7b641 100644 --- a/src/midi/fluid_midi.c +++ b/src/midi/fluid_midi.c @@ -1734,18 +1734,18 @@ fluid_player_get_status(fluid_player_t *player) } /** - * Seek in the current playing file. + * Seek in the currently playing file. * @param player MIDI player instance * @param ticks the position to seek to in the current file - * @return #FLUID_FAILED if ticks is after the latest tick of the file, + * @return #FLUID_FAILED if ticks is negative of after the latest tick of the file, * #FLUID_OK otherwise - * @since 1.1.8 + * @since 1.1.9 * * The actual seek is performed during the player_callback. */ int fluid_player_seek(fluid_player_t *player, int ticks) { - if (ticks > fluid_player_get_total_ticks(player)) { + if (ticks < 0 || ticks > fluid_player_get_total_ticks(player)) { return FLUID_FAILED; } player->seek_ticks = ticks;