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
5921ffaa
Commit
5921ffaa
authored
Sep 19, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/sndfile: move sf_readf_int() call to sndfile_read_frames()
parent
cf47b68c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
SndfileDecoderPlugin.cxx
src/decoder/plugins/SndfileDecoderPlugin.cxx
+10
-2
No files found.
src/decoder/plugins/SndfileDecoderPlugin.cxx
View file @
5921ffaa
...
...
@@ -154,6 +154,12 @@ sndfile_sample_format(const SF_INFO &info)
return
SampleFormat
::
S32
;
}
static
sf_count_t
sndfile_read_frames
(
SNDFILE
*
sf
,
void
*
buffer
,
sf_count_t
n_frames
)
{
return
sf_readf_int
(
sf
,
(
int
*
)
buffer
,
n_frames
);
}
static
void
sndfile_stream_decode
(
Decoder
&
decoder
,
InputStream
&
is
)
{
...
...
@@ -183,14 +189,16 @@ sndfile_stream_decode(Decoder &decoder, InputStream &is)
decoder_initialized
(
decoder
,
audio_format
,
info
.
seekable
,
sndfile_duration
(
info
));
int
buffer
[
4096
];
char
buffer
[
16384
];
const
size_t
frame_size
=
audio_format
.
GetFrameSize
();
const
sf_count_t
read_frames
=
sizeof
(
buffer
)
/
frame_size
;
DecoderCommand
cmd
;
do
{
sf_count_t
num_frames
=
sf_readf_int
(
sf
,
buffer
,
read_frames
);
sf_count_t
num_frames
=
sndfile_read_frames
(
sf
,
buffer
,
read_frames
);
if
(
num_frames
<=
0
)
break
;
...
...
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