|
From: Tapio V. <aa...@us...> - 2010-08-22 18:47:40
|
Module: performous
Branch: master
Commit: 6dc50b4e3ef9105546efaf257c0be23182a3453a
Author: Tapio Vierros <tap...@gm...>
Date: Sun Aug 22 21:46:55 2010 +0300
Increase audio config output verbosity.
---
game/audio.cc | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/game/audio.cc b/game/audio.cc
index 374b366..83a00f4 100644
--- a/game/audio.cc
+++ b/game/audio.cc
@@ -456,6 +456,8 @@ struct Audio::Impl {
int tmp;
if (iss >> tmp && iss.get() == EOF && tmp >= 0 && tmp < count) dev = tmp;
}
+ std::clog << "Trying audio device \"" << params.dev << "\", id: " << dev
+ << ", in: " << params.mics.size() << ", out: " << params.out << std::endl;
bool skip_partial = false;
bool found = false;
// Try exact match first, then partial
@@ -473,6 +475,7 @@ struct Audio::Impl {
if (match_partial && std::string(info->name).find(params.dev) == std::string::npos) continue;
}
// Match found if we got here
+ int assigned_mics = 0;
bool device_init_threw = true;
try {
devices.push_back(new Device(params.mics.size(), params.out, params.rate, i));
@@ -494,6 +497,7 @@ struct Audio::Impl {
Analyzer* a = new Analyzer(d.rate);
analyzers.push_back(a);
d.mics[j] = a;
+ ++assigned_mics;
}
// Assign playback output for the first available stereo output
if (!playback && d.out == 2) { d.outptr = &output; playback = true; }
@@ -504,6 +508,10 @@ struct Audio::Impl {
}
skip_partial = true;
found = true;
+ std::clog << "Using audio device: " << i;
+ if (assigned_mics) std::clog << ", input channels: " << assigned_mics;
+ if (params.out) std::clog << ", output channels: " << params.out;
+ std::clog << std::endl;
break;
}
}
|