Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
b1bbd70f
Commit
b1bbd70f
authored
Aug 15, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/fluidsynth: stop playback at end of file
Use libfluidsynth's new function fluid_player_get_status().
parent
c31d11bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
NEWS
NEWS
+1
-0
fluidsynth_decoder_plugin.c
src/decoder/fluidsynth_decoder_plugin.c
+4
-5
No files found.
NEWS
View file @
b1bbd70f
...
...
@@ -3,6 +3,7 @@ ver 0.17.2 (2012/??/??)
- fix crash in local file check
* decoder:
- fluidsynth: remove throttle (requires libfluidsynth 1.1)
- fluidsynth: stop playback at end of file
- fluidsynth: check MIDI file format while scanning
* output:
- httpd: use monotonic clock, avoid hiccups after system clock adjustment
...
...
src/decoder/fluidsynth_decoder_plugin.c
View file @
b1bbd70f
...
...
@@ -168,7 +168,7 @@ fluidsynth_file_decode(struct decoder *decoder, const char *path_fs)
decoder_initialized
(
decoder
,
&
audio_format
,
false
,
-
1
);
do
{
while
(
fluid_player_get_status
(
player
)
==
FLUID_PLAYER_PLAYING
)
{
int16_t
buffer
[
2048
];
const
unsigned
max_frames
=
G_N_ELEMENTS
(
buffer
)
/
2
;
...
...
@@ -178,15 +178,14 @@ fluidsynth_file_decode(struct decoder *decoder, const char *path_fs)
ret
=
fluid_synth_write_s16
(
synth
,
max_frames
,
buffer
,
0
,
2
,
buffer
,
1
,
2
);
/* XXX how do we see whether the player is done? We
can't access the private attribute
player->status */
if
(
ret
!=
0
)
break
;
cmd
=
decoder_data
(
decoder
,
NULL
,
buffer
,
sizeof
(
buffer
),
0
);
}
while
(
cmd
==
DECODE_COMMAND_NONE
);
if
(
cmd
!=
DECODE_COMMAND_NONE
)
break
;
}
/* clean up */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment