From a64a9ea837d9a308a7dbf6234861d2b63d5035df Mon Sep 17 00:00:00 2001 From: jbebel Date: Sun, 3 Apr 2005 05:10:07 +0000 Subject: [PATCH] Moved initialization of Reporter class so it would happen before instantiation of Darkice class. Any logging that might be reported during the construction of the Darkice class could not function. Originally the Reporter initialization was done through the instance of Darkice (which inherits Reporter), but that obviously isn't possible before Darkice is instantiated. Since Reporter is largely a static class, it is reasonable to call it via the scope resolution operator rather than via an instance of the class, so that's what I did. --- darkice/trunk/src/main.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/darkice/trunk/src/main.cpp b/darkice/trunk/src/main.cpp index 7e69dce..b4a63fc 100644 --- a/darkice/trunk/src/main.cpp +++ b/darkice/trunk/src/main.cpp @@ -124,10 +124,10 @@ main ( std::cout << "Using config file: " << configFileName << std::endl; std::ifstream configFile( configFileName); + Reporter::setReportVerbosity( verbosity ); + Reporter::setReportOutputStream( std::cout ); Config config( configFile); Ref di = new DarkIce( config); - di->setReportVerbosity( verbosity ); - di->setReportOutputStream( std::cout ); res = di->run(); @@ -166,6 +166,16 @@ showUsage ( std::ostream & os ) $Source$ $Log$ + Revision 1.14 2005/04/03 05:10:07 jbebel + Moved initialization of Reporter class so it would happen before + instantiation of Darkice class. Any logging that might be reported + during the construction of the Darkice class could not function. + Originally the Reporter initialization was done through the instance + of Darkice (which inherits Reporter), but that obviously isn't possible + before Darkice is instantiated. Since Reporter is largely a static class, + it is reasonable to call it via the scope resolution operator rather + than via an instance of the class, so that's what I did. + Revision 1.13 2004/02/15 12:06:30 darkeye added ALSA support, thanks to Christian Forster