Chris@175: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@175: Chris@175: /* Chris@175: Sonic Visualiser Chris@175: An audio file viewer and annotation editor. Chris@175: Centre for Digital Music, Queen Mary, University of London. Chris@175: This file copyright 2006 Chris Cannam. Chris@175: Chris@175: This program is free software; you can redistribute it and/or Chris@175: modify it under the terms of the GNU General Public License as Chris@175: published by the Free Software Foundation; either version 2 of the Chris@175: License, or (at your option) any later version. See the file Chris@175: COPYING included with this distribution for more information. Chris@175: */ Chris@175: Chris@175: #include "AudioFileReader.h" Chris@175: Chris@285: void Chris@285: AudioFileReader::setError(std::string text, std::string arg) Chris@285: { Chris@285: if (arg == "") m_error = text; Chris@285: else m_error = text + ": " + arg; Chris@285: } Chris@285: Chris@285: void Chris@285: AudioFileReader::setError(std::string text, int arg) Chris@285: { Chris@285: char *buf = new char(text.length() + 100); Chris@285: sprintf(buf, "%s: code %d", text.c_str(), arg); Chris@285: m_error = buf; Chris@285: delete[] buf; Chris@285: } Chris@285: