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
49c04ccf
Commit
49c04ccf
authored
Oct 27, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/sidplay: fix playback speed with libsidplayfp
https://bugs.musicpd.org/view.php?id=4577
parent
11ba4487
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
NEWS
NEWS
+1
-0
SidplayDecoderPlugin.cxx
src/decoder/plugins/SidplayDecoderPlugin.cxx
+10
-3
No files found.
NEWS
View file @
49c04ccf
ver 0.19.20 (not yet released)
* decoder
- ffmpeg: ignore empty packets
- sidplay: fix playback speed with libsidplayfp
ver 0.19.19 (2016/08/23)
* decoder
...
...
src/decoder/plugins/SidplayDecoderPlugin.cxx
View file @
49c04ccf
...
...
@@ -354,12 +354,19 @@ sidplay_file_decode(Decoder &decoder, Path path_fs)
DecoderCommand
cmd
;
do
{
short
buffer
[
4096
];
size_t
nbytes
;
nbytes
=
player
.
play
(
buffer
,
ARRAY_SIZE
(
buffer
));
if
(
nbytes
=
=
0
)
const
auto
result
=
player
.
play
(
buffer
,
ARRAY_SIZE
(
buffer
));
if
(
result
<
=
0
)
break
;
#ifdef HAVE_SIDPLAYFP
/* libsidplayfp returns the number of samples */
const
size_t
nbytes
=
result
*
sizeof
(
buffer
[
0
]);
#else
/* libsidplay2 returns the number of bytes */
const
size_t
nbytes
=
result
;
#endif
decoder_timestamp
(
decoder
,
(
double
)
player
.
time
()
/
timebase
);
cmd
=
decoder_data
(
decoder
,
nullptr
,
buffer
,
nbytes
,
0
);
...
...
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