input/alsa: use libfmt instead of std::string concatenation
This commit is contained in:
		| @@ -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(); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann