ReplayGainMode: add ToString(), FromString()
Move code from ReplayGainConfig.cxx.
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
#ifndef MPD_REPLAY_GAIN_MODE_HXX
|
||||
#define MPD_REPLAY_GAIN_MODE_HXX
|
||||
|
||||
#include "Compiler.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
enum class ReplayGainMode : uint8_t {
|
||||
@@ -29,4 +31,19 @@ enum class ReplayGainMode : uint8_t {
|
||||
AUTO,
|
||||
};
|
||||
|
||||
/**
|
||||
* Return the string representation of a #ReplayGainMode.
|
||||
*/
|
||||
gcc_pure
|
||||
const char *
|
||||
ToString(ReplayGainMode mode);
|
||||
|
||||
/**
|
||||
* Parse a string to a #ReplayGainMode. Throws std::runtime_error on
|
||||
* error.
|
||||
*/
|
||||
gcc_pure
|
||||
ReplayGainMode
|
||||
FromString(const char *s);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user