/* * mp3plot - Bitrate analysis tool * * Copyright (C) 2007 Toni Corvera * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // $Id: mp3_common.cc 743 2007-05-23 02:27:31Z $ #include "mp3_common.h" namespace net_outlyer { namespace mp3 { using std::string; const bitrate_t BAD_BITRATE = -1; const bitrate_t BITRATE_TABLE[] = { 0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, BAD_BITRATE, }; const uint8_t BITRATE_TABLE_LEN = (sizeof(BITRATE_TABLE) / sizeof(bitrate_t)); e_error::e_error(const string & m, int e) : msg(m), error_code(e) {} const std::string & e_error::get_msg() const { return msg; } e_bad_filetype::e_bad_filetype() : e_error("Unsupported file format.", EX_DATAERR) {} } // namespace mp3 } // namespace net_outlyer /* vim:set ts=4 et ai: */