rsked/source.cc
/// Convert an encoding string to an Encoding enum. This is case *sensitive*.
/// * May throw Schedule_error
///
Convert an encoding string to an Encoding enum. This is case *sensitive*.
Convert an encoding string to an Encoding enum . This is case * sensitive * .
Encoding strtoencoding( const std::string &s )
{
    if (s == "none") {
        return Encoding::none;
    } else if (s == "ogg") {
        return Encoding::ogg;
    } else if (s == "mp3") {
        return Encoding::mp3;
    } else if (s == "mp4") {
        return Encoding::mp4;
    } else if (s == "flac") {
        return Encoding::flac;
    } else if (s == "wfm") {
        return Encoding::wfm;
    } else if (s == "nfm") {
        return Encoding::nfm;
    } else if (s == "hd1fm") {
        return Encoding::hd1fm;
    } else if (s == "hd2fm") {
        return Encoding::hd2fm;
    } else if (s == "hd3fm") {
        return Encoding::hd3fm;
    } else if (s == "hd4fm") {
        return Encoding::hd4fm;
    } else if (s == "mixed") {
        return Encoding::mixed;
    }
    LOG_ERROR(Lgr) << "Unknown encoding '" << s << "'";
    throw Schedule_error();
}
Encoding strtoencoding ( const std :: string & s ) { if ( s == " " ) { return Encoding :: none ; } else if ( s == " " ) { return Encoding :: ogg ; } else if ( s == " " ) { return Encoding :: mp3 ; } else if ( s == " " ) { return Encoding :: mp4 ; } else if ( s == " " ) { return Encoding :: flac ; } else if ( s == " " ) { return Encoding :: wfm ; } else if ( s == " " ) { return Encoding :: nfm ; } else if ( s == " " ) { return Encoding :: hd1fm ; } else if ( s == " " ) { return Encoding :: hd2fm ; } else if ( s == " " ) { return Encoding :: hd3fm ; } else if ( s == " " ) { return Encoding :: hd4fm ; } else if ( s == " " ) { return Encoding :: mixed ; } LOG_ERROR ( Lgr ) << " " << s << " " ; throw Schedule_error ( ) ; }
Convert an encoding string to an Encoding enum.
Convert an encoding string to an Encoding enum .