|
From: Tapio V. <aa...@us...> - 2010-08-12 21:28:16
|
Module: performous
Branch: joinmenu
Commit: 2142fb5f72ae7bb7538fef8985a56380f04a7ac3
Author: Tapio Vierros <tap...@gm...>
Date: Thu Aug 12 20:39:13 2010 +0300
Clog vs. cout
cout: Data paths are useful since people keep asking about them.
cout: Audio devs are useful and they wouldn't show even in pdevhelp/michelp.
clog: Joystick IDs read from xml are debug info.
---
game/fs.cc | 4 ++--
game/joystick.cc | 12 ++++++------
game/main.cc | 2 +-
game/portmidi.hh | 6 +++---
libs/libda/plugins/audio_dev_alsa.cpp | 10 +++++-----
libs/libda/plugins/audio_dev_pa19.cpp | 6 +++---
6 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/game/fs.cc b/game/fs.cc
index 2129583..823f78f 100644
--- a/game/fs.cc
+++ b/game/fs.cc
@@ -135,10 +135,10 @@ bool isThemeResource(fs::path filename){
namespace {
bool pathNotExist(fs::path const& p) {
if (exists(p)) {
- std::clog << ">>> Using data path \"" << p.string() << "\"" << std::endl;
+ std::cout << ">>> Using data path \"" << p.string() << "\"" << std::endl;
return false;
}
- std::clog << ">>> Not using \"" << p.string() << "\" (does not exist)" << std::endl;
+ std::cout << ">>> Not using \"" << p.string() << "\" (does not exist)" << std::endl;
return true;
}
}
diff --git a/game/joystick.cc b/game/joystick.cc
index c16ae45..1128fe1 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -234,10 +234,10 @@ namespace {
void readControllers(input::Instruments &instruments, fs::path const& file) {
if (!fs::exists(file)) {
- std::cout << "Skipping " << file << " (not found)" << std::endl;
+ std::clog << "Skipping " << file << " (not found)" << std::endl;
return;
}
- std::cout << "Parsing " << file << std::endl;
+ std::clog << "Parsing " << file << std::endl;
xmlpp::DomParser domParser(file.string());
try {
xmlpp::NodeSet n = domParser.get_document()->get_root_node()->find("/controllers/controller");
@@ -331,7 +331,7 @@ void readControllers(input::Instruments &instruments, fs::path const& file) {
// inserting the instrument
if(instruments.find(name) == instruments.end()) {
- std::cout << " Adding " << type << ": " << name << std::endl;
+ std::clog << " Adding " << type << ": " << name << std::endl;
} else {
std::cout << " Overriding " << type << ": " << name << std::endl;
instruments.erase(name);
@@ -422,9 +422,9 @@ void input::SDL::init() {
// Here we should send an event to have correct state buttons
init_devices();
// Adding keyboard instruments
- std::cout << "Keyboard as guitar controller: " << (config["game/keyboard_guitar"].b() ? "enabled":"disabled") << std::endl;
- std::cout << "Keyboard as drumkit controller: " << (config["game/keyboard_drumkit"].b() ? "enabled":"disabled") << std::endl;
- std::cout << "Keyboard as dance pad controller: " << (config["game/keyboard_dancepad"].b() ? "enabled":"disabled") << std::endl;
+ std::clog << "Keyboard as guitar controller: " << (config["game/keyboard_guitar"].b() ? "enabled":"disabled") << std::endl;
+ std::clog << "Keyboard as drumkit controller: " << (config["game/keyboard_drumkit"].b() ? "enabled":"disabled") << std::endl;
+ std::clog << "Keyboard as dance pad controller: " << (config["game/keyboard_dancepad"].b() ? "enabled":"disabled") << std::endl;
input::SDL::sdl_devices[input::detail::KEYBOARD_ID] = NULL;
input::detail::devices.insert(std::make_pair<unsigned int, input::detail::InputDevPrivate>(input::detail::KEYBOARD_ID, input::detail::InputDevPrivate(g_instruments.find("GUITAR_GUITARHERO")->second)));
input::SDL::sdl_devices[input::detail::KEYBOARD_ID2] = NULL;
diff --git a/game/main.cc b/game/main.cc
index bbc9f4c..242ef2a 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -438,5 +438,5 @@ void outputOptionalFeatureStatus() {
(input::MidiDrums::enabled() ? "Enabled" : "Disabled")
<< std::endl << " Webcam support: " <<
(Webcam::enabled() ? "Enabled" : "Disabled")
- << std::endl;
+ << std::endl << std::endl;
}
diff --git a/game/portmidi.hh b/game/portmidi.hh
index 8e8b1d7..927a31f 100644
--- a/game/portmidi.hh
+++ b/game/portmidi.hh
@@ -12,7 +12,7 @@ namespace pm {
class Stream {
public:
operator PortMidiStream*() { return m_handle; }
-
+
protected:
PortMidiStream* m_handle;
Stream(): m_handle() {}
@@ -27,7 +27,7 @@ namespace pm {
PmDeviceInfo const* info = Pm_GetDeviceInfo(devId);
if (info->input != input) continue;
if (info->opened) continue;
- std::cout << " " << info->name << std::endl;
+ std::cout << " " << info->name << std::endl << std::endl;
}
}
int findDevice(bool input, std::string const& name = "") {
@@ -42,7 +42,7 @@ namespace pm {
throw std::runtime_error("No matching PortMidi device found");
}
}
-
+
class Input: public Stream {
public:
Input(int devId) {
diff --git a/libs/libda/plugins/audio_dev_alsa.cpp b/libs/libda/plugins/audio_dev_alsa.cpp
index b96f7f7..d9d3b47 100644
--- a/libs/libda/plugins/audio_dev_alsa.cpp
+++ b/libs/libda/plugins/audio_dev_alsa.cpp
@@ -29,18 +29,18 @@ namespace {
if (snd_ctl_pcm_info(ctl, pcminfo) < 0) continue;
std::string device = std::string("alsa:hw:") + snd_ctl_card_info_get_id(info) + "," + boost::lexical_cast<std::string>(dev);
std::string desc = std::string(snd_ctl_card_info_get_name(info)) + " (" + snd_pcm_info_get_name(pcminfo) + ")";
- std::clog << " " << device << " " << desc << std::endl;
+ std::cout << " " << device << " " << desc << std::endl;
}
}
}
struct Foo {
Foo() {
- std::clog << "ALSA capture devices:\n";
+ std::cout << "ALSA capture devices:\n";
devices(SND_PCM_STREAM_CAPTURE);
- std::clog << "ALSA playback devices:\n";
+ std::cout << "ALSA playback devices:\n";
devices(SND_PCM_STREAM_PLAYBACK);
- std::clog << std::endl;
+ std::cout << std::endl;
}
} foo;
@@ -95,7 +95,7 @@ namespace {
}
}
*/
-
+
class alsa_record: public record::dev {
settings m_s;
alsa::pcm m_pcm;
diff --git a/libs/libda/plugins/audio_dev_pa19.cpp b/libs/libda/plugins/audio_dev_pa19.cpp
index bf4f6d4..e2b273a 100644
--- a/libs/libda/plugins/audio_dev_pa19.cpp
+++ b/libs/libda/plugins/audio_dev_pa19.cpp
@@ -9,13 +9,13 @@ namespace {
struct Foo {
portaudio::Init init;
Foo() {
- std::clog << "PortAudio devices:\n";
+ std::cout << "PortAudio devices:\n";
for (int i = 0, end = Pa_GetDeviceCount(); i != end; ++i) {
PaDeviceInfo const* info = Pa_GetDeviceInfo(i);
if (!info) continue;
- std::clog << " pa19:" << i << " " << info->name << " (" << info->maxInputChannels << " in, " << info->maxOutputChannels << " out)\n";
+ std::cout << " pa19:" << i << " " << info->name << " (" << info->maxInputChannels << " in, " << info->maxOutputChannels << " out)\n";
}
- std::clog << std::endl;
+ std::cout << std::endl;
}
} foo;
|