Commit f5b9d33a authored by petter's avatar petter

Integrated more verbose information on audio line in

git-svn-id: https://www2.in.tum.de/repos/ttt/trunk@146 0463f305-d864-43cb-8a47-61cf597d4139
parent 9bbc7981
......@@ -86,6 +86,7 @@ import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import ttt.audio.AudioRecorder;
import ttt.audio.JSAAudioRecorder;
import ttt.connections.TTTConnection;
import ttt.editor.tttEditor.TTTEditor;
import ttt.editor2.Editor2;
......@@ -104,7 +105,7 @@ import ttt.record.LectureProfileDialog;
import ttt.record.Recording;
public class TTT extends JFrame {
static final String version = "23.10.2013";
static final String version = "30.10.2013";
public static boolean debug = !true;
public static boolean verbose = true;
......@@ -1175,7 +1176,8 @@ public class TTT extends JFrame {
+ " Java Vendor: " + System.getProperty("java.vendor") + "\n"
+ " JMF Version " + getJMFVersion() + "\n"
+ " Operating System: " + System.getProperty("os.name") + " ("
+ System.getProperty("os.version") + ")\n" + "\n\n"
+ System.getProperty("os.version") + ")\n"
+ " Available Sound Inputs: "+ JSAAudioRecorder.availableInputs() +"\n"+ "\n\n"
+ " This software may be redistributed under the terms\n"
+ " of the GNU General Public License (version 3 or later)\n"
+ " see <http://www.gnu.org/licenses/>\n";
......
// TeleTeachingTool - Presentation Recording With Automated Indexing
//
// Copyright (C) 2003-2008 Peter Ziewer - Technische Universitt Mnchen
// Copyright (C) 2003-2008 Peter Ziewer - Technische Universit�t M�nchen
//
// This file is part of TeleTeachingTool.
//
......@@ -33,12 +33,12 @@ import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.Line;
import javax.sound.sampled.Mixer;
import javax.sound.sampled.TargetDataLine;
public class JSAAudioRecorder extends Thread implements IAudioRecorder {
private static final AudioFormat[] audioFormats = {
new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 22050.0F, 16, 1, 2, 22050.0F, false),
new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 11025.0F, 16, 1, 2, 11025.0F, false),
......@@ -101,10 +101,26 @@ public class JSAAudioRecorder extends Thread implements IAudioRecorder {
System.exit(0);
}
public static String availableInputs(){
String ret="[";
for (Mixer.Info info: AudioSystem.getMixerInfo()){
TargetDataLine tdl = null;
for (int i = 0; i < audioFormats.length; i++) {
DataLine.Info in = new DataLine.Info(TargetDataLine.class, audioFormats[i]);
if (AudioSystem.isLineSupported(in)) {
break;
}
}
ret+=info.getName()+"/\n ";
}
return ret+"]";
}
/** Creates a new instance of JSAAudioRecorder */
public JSAAudioRecorder(AudioMonitorPanel volumeLevelComponent) throws Exception {
targetDataLine = null;
// Try to get a Targetline from which the audio data is read
for (int i = 0; i < audioFormats.length; i++) {
info = new DataLine.Info(TargetDataLine.class, audioFormats[i]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment