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
c4bea3df
Commit
c4bea3df
authored
Jul 11, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/sndfile: implement scan_stream() instead of scan_file()
parent
eaa9a1e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
NEWS
NEWS
+1
-0
SndfileDecoderPlugin.cxx
src/decoder/plugins/SndfileDecoderPlugin.cxx
+6
-5
No files found.
NEWS
View file @
c4bea3df
...
...
@@ -33,6 +33,7 @@ ver 0.19 (not yet released)
- vorbis, flac, opus: honor DESCRIPTION= tag in Xiph-based files as a comment to the song
- audiofile: support scanning remote files
- audiofile: log libaudiofile errors
- sndfile: support scanning remote files
- sndfile: support tags "comment", "album", "track", "genre"
* encoder:
- shine: new encoder plugin
...
...
src/decoder/plugins/SndfileDecoderPlugin.cxx
View file @
c4bea3df
...
...
@@ -234,21 +234,22 @@ static constexpr struct {
};
static
bool
sndfile_scan_
file
(
Path
path_f
s
,
const
struct
tag_handler
*
handler
,
void
*
handler_ctx
)
sndfile_scan_
stream
(
InputStream
&
i
s
,
const
struct
tag_handler
*
handler
,
void
*
handler_ctx
)
{
SF_INFO
info
;
info
.
format
=
0
;
SNDFILE
*
const
sf
=
sf_open
(
path_fs
.
c_str
(),
SFM_READ
,
&
info
);
SndfileInputStream
sis
{
nullptr
,
is
};
SNDFILE
*
const
sf
=
sf_open_virtual
(
&
vio
,
SFM_READ
,
&
info
,
&
sis
);
if
(
sf
==
nullptr
)
return
false
;
if
(
!
audio_valid_sample_rate
(
info
.
samplerate
))
{
sf_close
(
sf
);
FormatWarning
(
sndfile_domain
,
"Invalid sample rate in %s"
,
path_fs
.
c_str
());
"Invalid sample rate in %s"
,
is
.
GetURI
());
return
false
;
}
...
...
@@ -299,8 +300,8 @@ const struct DecoderPlugin sndfile_decoder_plugin = {
nullptr
,
sndfile_stream_decode
,
nullptr
,
sndfile_scan_file
,
nullptr
,
sndfile_scan_stream
,
nullptr
,
sndfile_suffixes
,
sndfile_mime_types
,
...
...
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