mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
Select DSound for windows and JavaSound for others
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@7626 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
@ -33,6 +33,7 @@ import org.jivesoftware.spark.ui.rooms.ChatRoomImpl;
|
|||||||
import org.jivesoftware.spark.util.SwingWorker;
|
import org.jivesoftware.spark.util.SwingWorker;
|
||||||
import org.jivesoftware.spark.util.log.Log;
|
import org.jivesoftware.spark.util.log.Log;
|
||||||
import org.jivesoftware.sparkplugin.JingleStateManager.JingleRoomState;
|
import org.jivesoftware.sparkplugin.JingleStateManager.JingleRoomState;
|
||||||
|
import org.jivesoftware.Spark;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.text.BadLocationException;
|
import javax.swing.text.BadLocationException;
|
||||||
@ -80,8 +81,11 @@ public class JinglePlugin implements Plugin, JingleSessionListener, Phone {
|
|||||||
|
|
||||||
JingleTransportManager transportManager = new ICETransportManager(SparkManager.getConnection(), stunServer, stunPort);
|
JingleTransportManager transportManager = new ICETransportManager(SparkManager.getConnection(), stunServer, stunPort);
|
||||||
|
|
||||||
|
// if running on Windows use Direct Sound for better performance
|
||||||
|
String locator = Spark.isWindows() ? "dsound://" : "javasound://";
|
||||||
|
|
||||||
MultiMediaManager jingleMediaManager = new MultiMediaManager();
|
MultiMediaManager jingleMediaManager = new MultiMediaManager();
|
||||||
jingleMediaManager.addMediaManager(new JmfMediaManager());
|
jingleMediaManager.addMediaManager(new JmfMediaManager(locator));
|
||||||
jingleMediaManager.addMediaManager(new SpeexMediaManager());
|
jingleMediaManager.addMediaManager(new SpeexMediaManager());
|
||||||
|
|
||||||
if (System.getProperty("codec") != null) {
|
if (System.getProperty("codec") != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user