Commit 0762e5c2 authored by borine's avatar borine

decoder/plugins/PcmDecoderPlugin: guard alsa specific code with pre-processor macro test

parent 5d18559c
......@@ -28,9 +28,12 @@
#include "util/StaticFifoBuffer.hxx"
#include "util/NumberParser.hxx"
#include "util/MimeType.hxx"
#include "AudioParser.hxx"
#include "Log.hxx"
#ifdef ENABLE_ALSA
#include "AudioParser.hxx"
#endif
#include <exception>
#include <assert.h>
......@@ -135,6 +138,7 @@ pcm_stream_decode(DecoderClient &client, InputStream &is)
audio_format.channels = value;
}
#ifdef ENABLE_ALSA
if (GetMimeTypeBase(mime) == "audio/x-mpd-alsa-pcm") {
i = mime_parameters.find("format");
if (i != mime_parameters.end()) {
......@@ -148,6 +152,7 @@ pcm_stream_decode(DecoderClient &client, InputStream &is)
}
}
}
#endif
}
if (audio_format.sample_rate == 0) {
......@@ -236,8 +241,10 @@ static const char *const pcm_mime_types[] = {
/* same as above, but with reverse byte order */
"audio/x-mpd-cdda-pcm-reverse",
#ifdef ENABLE_ALSA
/* for streams obtained by the alsa input plugin */
"audio/x-mpd-alsa-pcm",
#endif
nullptr
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment