input/alsa: use libfmt instead of std::string concatenation
This commit is contained in:
parent
4c4a3c8664
commit
18cb34825d
|
@ -27,6 +27,8 @@
|
||||||
|
|
||||||
#include <alsa/asoundlib.h>
|
#include <alsa/asoundlib.h>
|
||||||
|
|
||||||
|
#include <fmt/core.h>
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -182,9 +184,8 @@ AlsaInputStream::AlsaInputStream(EventLoop &_loop,
|
||||||
{
|
{
|
||||||
OpenDevice(spec);
|
OpenDevice(spec);
|
||||||
|
|
||||||
std::string mimestr = "audio/x-mpd-alsa-pcm;format=";
|
SetMimeType(fmt::format("audio/x-mpd-alsa-pcm;format={}",
|
||||||
mimestr += spec.GetFormatString();
|
spec.GetFormatString()));
|
||||||
SetMimeType(mimestr.c_str());
|
|
||||||
|
|
||||||
InputStream::SetReady();
|
InputStream::SetReady();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue