Mercurial > hg > svcore
annotate data/fileio/AudioFileReader.cpp @ 289:3020904de772
* Layer tree view updating when visibility / audibility changed (and layers
updating when they are changed in view) -- still some problems when a model
is loaded while the tree is visible
* FFTW_MEASURE throughout -- it does turn out to make an appreciable
difference sometimes
author | Chris Cannam |
---|---|
date | Thu, 16 Aug 2007 16:47:07 +0000 |
parents | 20028c634494 |
children | 92e8dbde73cd |
rev | line source |
---|---|
Chris@175 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
Chris@175 | 2 |
Chris@175 | 3 /* |
Chris@175 | 4 Sonic Visualiser |
Chris@175 | 5 An audio file viewer and annotation editor. |
Chris@175 | 6 Centre for Digital Music, Queen Mary, University of London. |
Chris@175 | 7 This file copyright 2006 Chris Cannam. |
Chris@175 | 8 |
Chris@175 | 9 This program is free software; you can redistribute it and/or |
Chris@175 | 10 modify it under the terms of the GNU General Public License as |
Chris@175 | 11 published by the Free Software Foundation; either version 2 of the |
Chris@175 | 12 License, or (at your option) any later version. See the file |
Chris@175 | 13 COPYING included with this distribution for more information. |
Chris@175 | 14 */ |
Chris@175 | 15 |
Chris@175 | 16 #include "AudioFileReader.h" |
Chris@175 | 17 |
Chris@285 | 18 void |
Chris@285 | 19 AudioFileReader::setError(std::string text, std::string arg) |
Chris@285 | 20 { |
Chris@285 | 21 if (arg == "") m_error = text; |
Chris@285 | 22 else m_error = text + ": " + arg; |
Chris@285 | 23 } |
Chris@285 | 24 |
Chris@285 | 25 void |
Chris@285 | 26 AudioFileReader::setError(std::string text, int arg) |
Chris@285 | 27 { |
Chris@285 | 28 char *buf = new char(text.length() + 100); |
Chris@285 | 29 sprintf(buf, "%s: code %d", text.c_str(), arg); |
Chris@285 | 30 m_error = buf; |
Chris@285 | 31 delete[] buf; |
Chris@285 | 32 } |
Chris@285 | 33 |