remove a bunch of cerr output and/or convert to use error<<

git-svn-id: svn://localhost/ardour2/branches/3.0@13477 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-11-13 15:11:07 +00:00
parent 06fa1b73e5
commit 98834c0532
13 changed files with 24 additions and 46 deletions

View file

@ -401,7 +401,7 @@ ARDOUR_UI::post_engine ()
vector<string>::iterator n; vector<string>::iterator n;
vector<string>::iterator k; vector<string>::iterator k;
for (n = names.begin(), k = keys.begin(); n != names.end(); ++n, ++k) { for (n = names.begin(), k = keys.begin(); n != names.end(); ++n, ++k) {
cerr << "Action: " << (*n) << " bound to " << (*k) << endl; cout << "Action: " << (*n) << " bound to " << (*k) << endl;
} }
exit (0); exit (0);

View file

@ -268,7 +268,6 @@ void
AudioRegionView::region_changed (const PropertyChange& what_changed) AudioRegionView::region_changed (const PropertyChange& what_changed)
{ {
ENSURE_GUI_THREAD (*this, &AudioRegionView::region_changed, what_changed); ENSURE_GUI_THREAD (*this, &AudioRegionView::region_changed, what_changed);
cerr << "AudioRegionView::region_changed() called" << endl;
RegionView::region_changed (what_changed); RegionView::region_changed (what_changed);
@ -276,28 +275,21 @@ AudioRegionView::region_changed (const PropertyChange& what_changed)
region_scale_amplitude_changed (); region_scale_amplitude_changed ();
} }
if (what_changed.contains (ARDOUR::Properties::fade_in)) { if (what_changed.contains (ARDOUR::Properties::fade_in)) {
cerr << region()->name() << " in changed\n";
stacktrace (cerr, 40);
fade_in_changed (); fade_in_changed ();
} }
if (what_changed.contains (ARDOUR::Properties::fade_out)) { if (what_changed.contains (ARDOUR::Properties::fade_out)) {
cerr << region()->name() << " out changed\n";
fade_out_changed (); fade_out_changed ();
} }
if (what_changed.contains (ARDOUR::Properties::fade_in_active)) { if (what_changed.contains (ARDOUR::Properties::fade_in_active)) {
cerr << region()->name() << " in active changed\n";
fade_in_active_changed (); fade_in_active_changed ();
} }
if (what_changed.contains (ARDOUR::Properties::fade_out_active)) { if (what_changed.contains (ARDOUR::Properties::fade_out_active)) {
cerr << region()->name() << " out active changed\n";
fade_out_active_changed (); fade_out_active_changed ();
} }
if (what_changed.contains (ARDOUR::Properties::fade_in_is_xfade)) { if (what_changed.contains (ARDOUR::Properties::fade_in_is_xfade)) {
cerr << region()->name() << " in is xfade changed\n";
fade_in_changed (); fade_in_changed ();
} }
if (what_changed.contains (ARDOUR::Properties::fade_out_is_xfade)) { if (what_changed.contains (ARDOUR::Properties::fade_out_is_xfade)) {
cerr << region()->name() << " out is xfade changed\n";
fade_out_changed (); fade_out_changed ();
} }
if (what_changed.contains (ARDOUR::Properties::envelope_active)) { if (what_changed.contains (ARDOUR::Properties::envelope_active)) {

View file

@ -208,12 +208,6 @@ static const gchar *_rb_opt_strings[] = {
}; };
#endif #endif
void
show_me_the_size (Requisition* r, const char* what)
{
cerr << "size of " << what << " = " << r->width << " x " << r->height << endl;
}
static void static void
pane_size_watcher (Paned* pane) pane_size_watcher (Paned* pane)
{ {

View file

@ -3718,7 +3718,7 @@ RangeMarkerBarDrag::motion (GdkEvent* event, bool first_move)
crect = _editor->cd_marker_bar_drag_rect; crect = _editor->cd_marker_bar_drag_rect;
break; break;
default: default:
cerr << "Error: unknown range marker op passed to Editor::drag_range_markerbar_op ()" << endl; error << string_compose (_("programming_error: %1"), "Error: unknown range marker op passed to Editor::drag_range_markerbar_op ()") << endmsg;
return; return;
break; break;
} }

View file

@ -4746,8 +4746,6 @@ Editor::insert_patch_change (bool from_context)
const framepos_t p = get_preferred_edit_position (false, from_context); const framepos_t p = get_preferred_edit_position (false, from_context);
cerr << "Got " << rs.size() << " regions to add patch change to\n";
/* XXX: bit of a hack; use the MIDNAM from the first selected region; /* XXX: bit of a hack; use the MIDNAM from the first selected region;
there may be more than one, but the PatchChangeDialog can only offer there may be more than one, but the PatchChangeDialog can only offer
one set of patch menus. one set of patch menus.

View file

@ -641,12 +641,11 @@ EngineControl::setup_engine ()
error << string_compose (_("cannot open JACK rc file %1 to store parameters"), jackdrc_path) << endmsg; error << string_compose (_("cannot open JACK rc file %1 to store parameters"), jackdrc_path) << endmsg;
return -1; return -1;
} }
cerr << "JACK COMMAND: ";
for (vector<string>::iterator i = args.begin(); i != args.end(); ++i) { for (vector<string>::iterator i = args.begin(); i != args.end(); ++i) {
cerr << (*i) << ' ';
jackdrc << (*i) << ' '; jackdrc << (*i) << ' ';
} }
cerr << endl;
jackdrc << endl; jackdrc << endl;
jackdrc.close (); jackdrc.close ();

View file

@ -428,7 +428,7 @@ int main (int argc, char *argv[])
if (no_splash) { if (no_splash) {
cerr << _("Copyright (C) 1999-2012 Paul Davis") << endl cerr << _("Copyright (C) 1999-2012 Paul Davis") << endl
<< _("Some portions Copyright (C) Steve Harris, Ari Johnson, Brett Viren, Joel Baker") << endl << _("Some portions Copyright (C) Steve Harris, Ari Johnson, Brett Viren, Joel Baker, Robin Gareus") << endl
<< endl << endl
<< string_compose (_("%1 comes with ABSOLUTELY NO WARRANTY"), PROGRAM_NAME) << endl << string_compose (_("%1 comes with ABSOLUTELY NO WARRANTY"), PROGRAM_NAME) << endl
<< _("not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.") << endl << _("not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.") << endl

View file

@ -305,10 +305,9 @@ PatchChangeDialog::patch_combo_changed ()
for (MIDI::Name::PatchBank::PatchNameList::const_iterator j = patches.begin(); j != patches.end(); ++j) { for (MIDI::Name::PatchBank::PatchNameList::const_iterator j = patches.begin(); j != patches.end(); ++j) {
string n = (*j)->name (); string n = (*j)->name ();
boost::replace_all (n, "_", " "); boost::replace_all (n, "_", " ");
std::cerr << "Looking for " << n << " vs " << _patch_combo.get_active_text() << std::endl;
if (n == _patch_combo.get_active_text ()) { if (n == _patch_combo.get_active_text ()) {
_ignore_signals = true; _ignore_signals = true;
std::cerr << " reset pgm number to " << (int) (*j)->program_number() << std::endl;
_program.set_value ((*j)->program_number() + 1); _program.set_value ((*j)->program_number() + 1);
_ignore_signals = false; _ignore_signals = false;
break; break;

View file

@ -1893,7 +1893,7 @@ ProcessorBox::paste_processor_state (const XMLNodeList& nlist, boost::shared_ptr
} }
catch (...) { catch (...) {
cerr << "plugin insert constructor failed\n"; error << _("plugin insert constructor failed") << endmsg;
} }
} }

View file

@ -24,6 +24,7 @@
#include <gtkmm2ext/utils.h> #include <gtkmm2ext/utils.h>
#include "pbd/xml++.h" #include "pbd/xml++.h"
#include "pbd/error.h"
#include "ardour/session.h" #include "ardour/session.h"
#include "ardour/session_utils.h" #include "ardour/session_utils.h"
@ -32,6 +33,7 @@
using namespace std; using namespace std;
using namespace Glib; using namespace Glib;
using namespace PBD;
#define CALL_MEMBER_FN(object,ptrToMember) ((object).*(ptrToMember)) #define CALL_MEMBER_FN(object,ptrToMember) ((object).*(ptrToMember))
@ -326,7 +328,7 @@ void
SessionMetadataSetImportable::load_extra_data (ARDOUR::SessionMetadata const & data) SessionMetadataSetImportable::load_extra_data (ARDOUR::SessionMetadata const & data)
{ {
if (!_session) { if (!_session) {
std::cerr << "Programming error: no session set for SessionMetaDataSetImportable (in load_data)!" << std::endl; error << string_compose (_("programming error: %1"), "no session set for SessionMetaDataSetImportable (in load_data)!") << endmsg;
return; return;
} }
@ -374,7 +376,7 @@ void
SessionMetadataSetImportable::save_data () SessionMetadataSetImportable::save_data ()
{ {
if (!_session) { if (!_session) {
std::cerr << "Programming error: no session set for SessionMetaDataSetImportable (in import_data)!" << std::endl; error << string_compose (_("programming error: %1"), "no session set for SessionMetaDataSetImportable (in import_data)!") << endmsg;
return; return;
} }
@ -430,7 +432,7 @@ void
SessionMetadataDialog<DataSet>::init_data ( bool skip_user ) SessionMetadataDialog<DataSet>::init_data ( bool skip_user )
{ {
if (!_session) { if (!_session) {
std::cerr << "Programming error: no session set for SessionMetaDataDialog (in init_data)!" << std::endl; error << string_compose (_("programming error: %1"), "no session set for SessionMetaDataDialog (in init_data)!") << endmsg;
return; return;
} }
@ -711,7 +713,7 @@ void
SessionMetadataImporter::run () SessionMetadataImporter::run ()
{ {
if (!_session) { if (!_session) {
std::cerr << "Programming error: no session set for SessionMetaDataImporter (in run)!" << std::endl; error << string_compose (_("programming error: %1"), "no session set for SessionMetaDataImporter (in run)!") << endmsg;
return; return;
} }

View file

@ -54,10 +54,11 @@
#include "ardour/audio_library.h" #include "ardour/audio_library.h"
using namespace PBD;
static const std::string base_url = "http://www.freesound.org/api"; static const std::string base_url = "http://www.freesound.org/api";
static const std::string api_key = "9d77cb8d841b4bcfa960e1aae62224eb"; // ardour3 static const std::string api_key = "9d77cb8d841b4bcfa960e1aae62224eb"; // ardour3
//------------------------------------------------------------------------ //------------------------------------------------------------------------
Mootcher::Mootcher() Mootcher::Mootcher()
: curl(curl_easy_init()) : curl(curl_easy_init())
@ -180,12 +181,11 @@ std::string Mootcher::doRequest(std::string uri, std::string params)
} }
curl_easy_setopt(curl, CURLOPT_URL, url.c_str() ); curl_easy_setopt(curl, CURLOPT_URL, url.c_str() );
std::cerr << "doRequest: " << url << std::endl;
// perform online request // perform online request
CURLcode res = curl_easy_perform(curl); CURLcode res = curl_easy_perform(curl);
if( res != 0 ) { if( res != 0 ) {
std::cerr << "curl error " << res << " (" << curl_easy_strerror(res) << ")" << std::endl; error << string_compose (_("curl error %1 (%2)"), res, curl_easy_strerror(res)) << endmsg;
return ""; return "";
} }
@ -235,8 +235,6 @@ std::string Mootcher::getSoundResourceFile(std::string ID)
std::string xml; std::string xml;
std::cerr << "getSoundResourceFile(" << ID << ")" << std::endl;
// download the xmlfile into xml_page // download the xmlfile into xml_page
xml = doRequest("/sounds/" + ID, ""); xml = doRequest("/sounds/" + ID, "");
@ -246,12 +244,12 @@ std::string Mootcher::getSoundResourceFile(std::string ID)
// if the page is not a valid xml document with a 'freesound' root // if the page is not a valid xml document with a 'freesound' root
if (freesound == NULL) { if (freesound == NULL) {
std::cerr << "getSoundResourceFile: There is no valid root in the xml file" << std::endl; error << _("getSoundResourceFile: There is no valid root in the xml file") << endmsg;
return ""; return "";
} }
if (strcmp(doc.root()->name().c_str(), "response") != 0) { if (strcmp(doc.root()->name().c_str(), "response") != 0) {
std::cerr << "getSoundResourceFile: root =" << doc.root()->name() << ", != response" << std::endl; error << string_compose (_("getSoundResourceFile: root = %1, != response"), doc.root()->name()) << endmsg;
return ""; return "";
} }
@ -302,7 +300,6 @@ std::string Mootcher::getAudioFile(std::string originalFileName, std::string ID,
if (testFile) { if (testFile) {
fseek (testFile , 0 , SEEK_END); fseek (testFile , 0 , SEEK_END);
if (ftell (testFile) > 256) { if (ftell (testFile) > 256) {
std::cerr << "audio file " << audioFileName << " already exists" << std::endl;
fclose (testFile); fclose (testFile);
return audioFileName; return audioFileName;
} }
@ -337,7 +334,6 @@ std::string Mootcher::getAudioFile(std::string originalFileName, std::string ID,
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, audioFileWrite); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, audioFileWrite);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, theFile); curl_easy_setopt(curl, CURLOPT_WRITEDATA, theFile);
std::cerr << "downloading " << audioFileName << " from " << audioURL << "..." << std::endl;
/* hack to get rid of the barber-pole stripes */ /* hack to get rid of the barber-pole stripes */
caller->freesound_progress_bar.hide(); caller->freesound_progress_bar.hide();
caller->freesound_progress_bar.show(); caller->freesound_progress_bar.show();
@ -358,11 +354,10 @@ std::string Mootcher::getAudioFile(std::string originalFileName, std::string ID,
caller->freesound_progress_bar.set_text(""); caller->freesound_progress_bar.set_text("");
if( res != 0 ) { if( res != 0 ) {
std::cerr << "curl error " << res << " (" << curl_easy_strerror(res) << ")" << std::endl; error << string_compose (_("curl error %1 (%2)"), res, curl_easy_strerror(res)) << endmsg;
remove( audioFileName.c_str() ); remove( audioFileName.c_str() );
return ""; return "";
} else { } else {
std::cerr << "done!" << std::endl;
// now download the tags &c. // now download the tags &c.
getSoundResourceFile(ID); getSoundResourceFile(ID);
} }
@ -387,7 +382,6 @@ SoundFileBrowser *sfb = (SoundFileBrowser *) caller;
while (Glib::MainContext::get_default()->iteration (false)) { while (Glib::MainContext::get_default()->iteration (false)) {
/* do nothing */ /* do nothing */
} }
std::cerr << "progress: " << dlnow << " of " << dltotal << " \r";
return 0; return 0;
} }

View file

@ -862,19 +862,19 @@ SoundFileBrowser::freesound_search()
XMLNode *root = doc.root(); XMLNode *root = doc.root();
if (!root) { if (!root) {
cerr << "no root XML node!" << endl; error << "no root XML node!" << endmsg;
break; break;
} }
if ( strcmp(root->name().c_str(), "response") != 0) { if ( strcmp(root->name().c_str(), "response") != 0) {
cerr << "root node name == " << root->name() << ", != \"response\"!" << endl; error << string_compose ("root node name == %1 != \"response\"", root->name()) << endmsg;
break; break;
} }
XMLNode *sounds_root = root->child("sounds"); XMLNode *sounds_root = root->child("sounds");
if (!sounds_root) { if (!sounds_root) {
cerr << "no child node \"sounds\" found!" << endl; error << "no child node \"sounds\" found!" << endmsg;
break; break;
} }
@ -884,7 +884,7 @@ SoundFileBrowser::freesound_search()
for (niter = sounds.begin(); niter != sounds.end(); ++niter) { for (niter = sounds.begin(); niter != sounds.end(); ++niter) {
node = *niter; node = *niter;
if( strcmp( node->name().c_str(), "resource") != 0 ){ if( strcmp( node->name().c_str(), "resource") != 0 ){
cerr << "node->name()=" << node->name() << ",!= \"resource\"!" << endl; error << string_compose ("node->name()=%1 != \"resource\"", node->name()) << endmsg;
freesound_search_cancel = true; freesound_search_cancel = true;
break; break;
} }

View file

@ -549,7 +549,7 @@ get_icon (const char* cname)
} catch (const Gdk::PixbufError &e) { } catch (const Gdk::PixbufError &e) {
cerr << "Caught PixbufError: " << e.what() << endl; cerr << "Caught PixbufError: " << e.what() << endl;
} catch (...) { } catch (...) {
g_message("Caught ... "); error << string_compose (_("Caught exception while loading icon named %1"), cname) << endmsg;
} }
return img; return img;