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
22ff0d80
Commit
22ff0d80
authored
Jun 10, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/pcm: add MIME type "audio/x-mpd-float"
parent
5a22a0c2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
NEWS
NEWS
+1
-1
user.xml
doc/user.xml
+3
-1
PcmDecoderPlugin.cxx
src/decoder/plugins/PcmDecoderPlugin.cxx
+9
-1
No files found.
NEWS
View file @
22ff0d80
...
@@ -23,7 +23,7 @@ ver 0.20 (not yet released)
...
@@ -23,7 +23,7 @@ ver 0.20 (not yet released)
- gme: add option "accuracy"
- gme: add option "accuracy"
- mad: reduce memory usage while scanning tags
- mad: reduce memory usage while scanning tags
- mpcdec: read the bit rate
- mpcdec: read the bit rate
- pcm: support audio/L16 (RFC 2586)
- pcm: support audio/L16 (RFC 2586)
and audio/x-mpd-float
* playlist
* playlist
- cue: don't skip pregap
- cue: don't skip pregap
- embcue: fix last track
- embcue: fix last track
...
...
doc/user.xml
View file @
22ff0d80
...
@@ -1944,7 +1944,9 @@ buffer_size: 16384</programlisting>
...
@@ -1944,7 +1944,9 @@ buffer_size: 16384</programlisting>
<para>
<para>
Read raw PCM samples. It understands the "audio/L16" MIME
Read raw PCM samples. It understands the "audio/L16" MIME
type with parameters "rate" and "channels" according to RFC
type with parameters "rate" and "channels" according to RFC
2586.
2586. It also understands the
<application>
MPD
</application>
-specific MIME type
"audio/x-mpd-float".
</para>
</para>
</section>
</section>
...
...
src/decoder/plugins/PcmDecoderPlugin.cxx
View file @
22ff0d80
...
@@ -45,11 +45,16 @@ pcm_stream_decode(Decoder &decoder, InputStream &is)
...
@@ -45,11 +45,16 @@ pcm_stream_decode(Decoder &decoder, InputStream &is)
const
bool
l16
=
mime
!=
nullptr
&&
const
bool
l16
=
mime
!=
nullptr
&&
GetMimeTypeBase
(
mime
)
==
"audio/L16"
;
GetMimeTypeBase
(
mime
)
==
"audio/L16"
;
if
(
l16
)
{
const
bool
is_float
=
mime
!=
nullptr
&&
GetMimeTypeBase
(
mime
)
==
"audio/x-mpd-float"
;
if
(
l16
||
is_float
)
{
audio_format
.
sample_rate
=
0
;
audio_format
.
sample_rate
=
0
;
audio_format
.
channels
=
1
;
audio_format
.
channels
=
1
;
}
}
if
(
is_float
)
audio_format
.
format
=
SampleFormat
::
FLOAT
;
{
{
const
auto
mime_parameters
=
ParseMimeTypeParameters
(
mime
);
const
auto
mime_parameters
=
ParseMimeTypeParameters
(
mime
);
Error
error
;
Error
error
;
...
@@ -154,6 +159,9 @@ static const char *const pcm_mime_types[] = {
...
@@ -154,6 +159,9 @@ static const char *const pcm_mime_types[] = {
/* RFC 2586 */
/* RFC 2586 */
"audio/L16"
,
"audio/L16"
,
/* MPD-specific: float32 native-endian */
"audio/x-mpd-float"
,
/* for streams obtained by the cdio_paranoia input plugin */
/* for streams obtained by the cdio_paranoia input plugin */
"audio/x-mpd-cdda-pcm"
,
"audio/x-mpd-cdda-pcm"
,
...
...
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