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 <fmt/core.h>
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include <string.h>
|
||||
|
@ -182,9 +184,8 @@ AlsaInputStream::AlsaInputStream(EventLoop &_loop,
|
|||
{
|
||||
OpenDevice(spec);
|
||||
|
||||
std::string mimestr = "audio/x-mpd-alsa-pcm;format=";
|
||||
mimestr += spec.GetFormatString();
|
||||
SetMimeType(mimestr.c_str());
|
||||
SetMimeType(fmt::format("audio/x-mpd-alsa-pcm;format={}",
|
||||
spec.GetFormatString()));
|
||||
|
||||
InputStream::SetReady();
|
||||
|
||||
|
|
Loading…
Reference in New Issue