diff options
author | Bob Igo <bob@stormlogic.com> | 2009-02-10 02:49:15 (GMT) |
---|---|---|
committer | Bob Igo <bob@stormlogic.com> | 2009-02-10 02:49:15 (GMT) |
commit | 3c23b95df42b8ec226ab4110364cd69a50b48b2b (patch) | |
tree | c3efc89feceb2110f9ae9f75c7f2425bc9995b87 /abs/core-testing/tweaker/bin/twk_audio.pl | |
parent | dcfc40ff3b29121365037a5ed0845bd64efb6c55 (diff) | |
download | linhes_pkgbuild-3c23b95df42b8ec226ab4110364cd69a50b48b2b.zip linhes_pkgbuild-3c23b95df42b8ec226ab4110364cd69a50b48b2b.tar.gz linhes_pkgbuild-3c23b95df42b8ec226ab4110364cd69a50b48b2b.tar.bz2 |
Tweaker integration progress.
Diffstat (limited to 'abs/core-testing/tweaker/bin/twk_audio.pl')
-rwxr-xr-x | abs/core-testing/tweaker/bin/twk_audio.pl | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/abs/core-testing/tweaker/bin/twk_audio.pl b/abs/core-testing/tweaker/bin/twk_audio.pl index 72b9c86..b3bdd89 100755 --- a/abs/core-testing/tweaker/bin/twk_audio.pl +++ b/abs/core-testing/tweaker/bin/twk_audio.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -# Copyright 2007, 2008 Robert ("Bob") Igo of StormLogic, LLC and mythic.tv. +# Copyright 2007-2009 Robert ("Bob") Igo of StormLogic, LLC and mythic.tv. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -30,11 +30,16 @@ sub poll_for_digital_output_device { my @digital_matches = ( "digital", "IEC958" ); my $results = execute_shell_command($poll_command); - foreach my $digital_match (@digital_matches) { - if ($results =~ /card (\d):.*device (\d).*$digital_match.*/i) { - $card = $1; - $device = $2; + if ($results) { + foreach my $digital_match (@digital_matches) { + if ($results =~ /card (\d):.*device (\d).*$digital_match.*/i) { + $card = $1; + $device = $2; + } } + } else { + recommendation_level("not available", "No audio devices detected."); + exit(-1); } return ($card, $device); } @@ -336,6 +341,7 @@ sub poll_options { } } case "analogsurround" { + my ($card, $device) = poll_for_digital_output_device; recommendation_level("unsupported", "No configuration data exists yet for this option."); } case "digital" { |