|
From: Tapio V. <aa...@us...> - 2010-09-16 10:12:48
|
Module: performous
Branch: master
Commit: 2d0fa43d73528f2d27b3c224079df238dc737255
Author: Tapio Vierros <tap...@gm...>
Date: Thu Sep 16 13:11:12 2010 +0300
AntiAudioHang Technology (tm) to --audiohelp too.
---
game/main.cc | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/game/main.cc b/game/main.cc
index 9ac9117..c5879a4 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -347,6 +347,10 @@ int main(int argc, char** argv) try {
std::cout << " --audio \"dev=1 out=2\" # Pick device id 1 and assign stereo playback" << std::endl;
std::cout << " --audio 'dev=\"HDA Intel\" mics=blue,red' # HDA Intel with two mics" << std::endl;
std::cout << " --audio 'dev=pulse out=2 mics=blue' # PulseAudio with input and output" << std::endl;
+ // Give audio a little time to shutdown but then just quit
+ boost::thread audiokiller(boost::bind(&Audio::close, boost::ref(audio)));
+ if (!audiokiller.timed_join(boost::posix_time::milliseconds(2000)))
+ std::cout << "Audio hung." << std::endl;
return EXIT_SUCCESS;
}
// Override XML config for options that were specified from commandline or performous.conf
|