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
01fd6e5e
Commit
01fd6e5e
authored
Jun 27, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v0.21.x'
parents
beed004b
8bf3f9b8
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
9 deletions
+45
-9
NEWS
NEWS
+4
-0
plugins.rst
doc/plugins.rst
+5
-0
DecoderList.cxx
src/decoder/DecoderList.cxx
+12
-0
WildmidiDecoderPlugin.cxx
src/decoder/plugins/WildmidiDecoderPlugin.cxx
+22
-9
TidalInputPlugin.cxx
src/input/plugins/TidalInputPlugin.cxx
+2
-0
No files found.
NEWS
View file @
01fd6e5e
...
...
@@ -13,6 +13,10 @@ ver 0.22 (not yet released)
- hdcd: new plugin based on FFmpeg's "af_hdcd" for HDCD playback
ver 0.21.11 (not yet released)
* input
- tidal: deprecated because Tidal has changed the protocol
* decoder
- wildmidi: log error if library initialization fails
* output
- alsa, osx: fix distortions with DSD_U32 and DoP on 32 bit CPUs
* protocol
...
...
doc/plugins.rst
View file @
01fd6e5e
...
...
@@ -269,6 +269,11 @@ tidal
Play songs from the commercial streaming service `Tidal <http://tidal.com/>`_. It plays URLs in the form tidal://track/ID, e.g.:
.. warning::
This plugin is currently defunct because Tidal has changed the
protocol and decided not to share documentation.
.. code-block:: none
mpc add tidal://track/59727857
...
...
src/decoder/DecoderList.cxx
View file @
01fd6e5e
...
...
@@ -20,6 +20,8 @@
#include "config.h"
#include "DecoderList.hxx"
#include "DecoderPlugin.hxx"
#include "PluginUnavailable.hxx"
#include "Log.hxx"
#include "config/Data.hxx"
#include "config/Block.hxx"
#include "plugins/AudiofileDecoderPlugin.hxx"
...
...
@@ -45,6 +47,7 @@
#include "plugins/FluidsynthDecoderPlugin.hxx"
#include "plugins/SidplayDecoderPlugin.hxx"
#include "util/Macros.hxx"
#include "util/RuntimeError.hxx"
#include <string.h>
...
...
@@ -147,8 +150,17 @@ decoder_plugin_init_all(const ConfigData &config)
if
(
param
!=
nullptr
)
param
->
SetUsed
();
try
{
if
(
plugin
.
Init
(
*
param
))
decoder_plugins_enabled
[
i
]
=
true
;
}
catch
(
const
PluginUnavailable
&
e
)
{
FormatError
(
e
,
"Decoder plugin '%s' is unavailable"
,
plugin
.
name
);
}
catch
(...)
{
std
::
throw_with_nested
(
FormatRuntimeError
(
"Failed to initialize decoder plugin '%s'"
,
plugin
.
name
));
}
}
}
...
...
src/decoder/plugins/WildmidiDecoderPlugin.cxx
View file @
01fd6e5e
...
...
@@ -20,18 +20,18 @@
#include "WildmidiDecoderPlugin.hxx"
#include "../DecoderAPI.hxx"
#include "tag/Handler.hxx"
#include "util/Domain.hxx"
#include "util/ScopeExit.hxx"
#include "util/StringFormat.hxx"
#include "fs/AllocatedPath.hxx"
#include "fs/FileSystem.hxx"
#include "fs/Path.hxx"
#include "Log.hxx"
#include "PluginUnavailable.hxx"
extern
"C"
{
#include <wildmidi_lib.h>
}
static
constexpr
Domain
wildmidi_domain
(
"wildmidi"
);
static
constexpr
AudioFormat
wildmidi_audio_format
{
48000
,
SampleFormat
::
S16
,
2
};
static
bool
...
...
@@ -43,14 +43,27 @@ wildmidi_init(const ConfigBlock &block)
if
(
!
FileExists
(
path
))
{
const
auto
utf8
=
path
.
ToUTF8
();
FormatDebug
(
wildmidi_domain
,
"configuration file does not exist: %s"
,
utf8
.
c_str
());
return
false
;
throw
PluginUnavailable
(
StringFormat
<
1024
>
(
"configuration file does not exist: %s"
,
utf8
.
c_str
()));
}
return
WildMidi_Init
(
path
.
c_str
(),
wildmidi_audio_format
.
sample_rate
,
0
)
==
0
;
#ifdef LIBWILDMIDI_VERSION
/* WildMidi_ClearError() requires libwildmidi 0.4 */
WildMidi_ClearError
();
AtScopeExit
()
{
WildMidi_ClearError
();
};
#endif
if
(
WildMidi_Init
(
path
.
c_str
(),
wildmidi_audio_format
.
sample_rate
,
0
)
!=
0
)
{
#ifdef LIBWILDMIDI_VERSION
/* WildMidi_GetError() requires libwildmidi 0.4 */
throw
PluginUnavailable
(
WildMidi_GetError
());
#else
throw
PluginUnavailable
(
"WildMidi_Init() failed"
);
#endif
}
return
true
;
}
static
void
...
...
src/input/plugins/TidalInputPlugin.cxx
View file @
01fd6e5e
...
...
@@ -180,6 +180,8 @@ InitTidalInput(EventLoop &event_loop, const ConfigBlock &block)
if
(
password
==
nullptr
)
throw
PluginUnconfigured
(
"No Tidal password configured"
);
FormatWarning
(
tidal_domain
,
"The Tidal input plugin is deprecated because Tidal has changed the protocol and doesn't share documentation"
);
tidal_audioquality
=
block
.
GetBlockValue
(
"audioquality"
,
"HIGH"
);
tidal_session
=
new
TidalSessionManager
(
event_loop
,
base_url
,
token
,
...
...
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