From cd3ed720e0b4221ddc5eef22574764967972b1d1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 19 Dec 2017 08:26:06 +0100 Subject: [PATCH] lib/alsa/AllowedFormat: add API documentation --- src/lib/alsa/AllowedFormat.hxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/lib/alsa/AllowedFormat.hxx b/src/lib/alsa/AllowedFormat.hxx index 3182b71b8..12bc5a21f 100644 --- a/src/lib/alsa/AllowedFormat.hxx +++ b/src/lib/alsa/AllowedFormat.hxx @@ -29,14 +29,28 @@ struct StringView; namespace Alsa { +/** + * An audio format for the "allowed_formats" setting of + * #AlsaOutputPlugin. + */ struct AllowedFormat { AudioFormat format; #ifdef ENABLE_DSD bool dop; #endif + /** + * Parse a format string. + * + * Throws std::runtime_error on error. + */ explicit AllowedFormat(StringView s); + /** + * Parse a list of formats separated by space. + * + * Throws std::runtime_error on error. + */ static std::forward_list ParseList(StringView s); };