changeset in /hg/pulseaudio: 2008-08-15 Omair Majid <omajid at redh...
Omair Majid
omajid at redhat.com
Fri Aug 15 13:23:20 PDT 2008
changeset 6462973e76b1 in /hg/pulseaudio
details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=6462973e76b1
description:
2008-08-15 Omair Majid <omajid at redhat.com>
* src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java: the
mixer can now return Clip as well
diffstat:
1 file changed, 15 insertions(+), 11 deletions(-)
src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 26 +++++-----
diffs (59 lines):
diff -r 17b5e29d9a21 -r 6462973e76b1 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java
--- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Fri Aug 15 12:22:25 2008 -0400
+++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Fri Aug 15 15:19:43 2008 -0400
@@ -69,6 +69,7 @@ public class PulseAudioMixer implements
private Line.Info[] sourceLineInfos;
private Line.Info[] targetLineInfos;
+ private Line.Info[] clipInfos;
private static PulseAudioMixer _instance = null;
@@ -77,18 +78,13 @@ public class PulseAudioMixer implements
private boolean isOpen = false;
- private List<PulseAudioSourceDataLine> sourceLines = new ArrayList<PulseAudioSourceDataLine>();
- // private List<PulseAudioTargetDataLine> targetLines = null;
- private List<PulseAudioClip> clips = new ArrayList<PulseAudioClip>();
-
- // private Line.Info targetDataLineInfo = new
- // Line.Info(PulseAudioTargetDataLine.class);
-
- List<LineListener> lineListeners = null;
+ private final List<PulseAudioSourceDataLine> sourceLines = new ArrayList<PulseAudioSourceDataLine>();
+ private final List<PulseAudioTargetDataLine> targetLines = new ArrayList<PulseAudioTargetDataLine>();
+ private final List<PulseAudioClip> clips = new ArrayList<PulseAudioClip>();
+
+ private final List<LineListener> lineListeners = new ArrayList<LineListener>();
private PulseAudioMixer() {
- lineListeners = new ArrayList<LineListener>();
- sourceLines = new ArrayList<PulseAudioSourceDataLine>();
AudioFormat[] formats = getSupportedFormats();
sourceLineInfos = new Line.Info[] { new DataLine.Info(
SourceDataLine.class, formats, AudioSystem.NOT_SPECIFIED,
@@ -96,7 +92,9 @@ public class PulseAudioMixer implements
targetLineInfos = new Line.Info[] { new DataLine.Info(
TargetDataLine.class, formats, AudioSystem.NOT_SPECIFIED,
AudioSystem.NOT_SPECIFIED) };
- // _targetLines = new ArrayList<PulseAudioTargetDataLine>();
+ clipInfos = new Line.Info[] { new DataLine.Info(PulseAudioClip.class,
+ formats, AudioSystem.NOT_SPECIFIED, AudioSystem.NOT_SPECIFIED) };
+
}
synchronized public static PulseAudioMixer getInstance() {
@@ -406,6 +404,12 @@ public class PulseAudioMixer implements
for (int i = 0; i < targetLineInfos.length; i++) {
if (info.matches(targetLineInfos[i])) {
+ return true;
+ }
+ }
+
+ for (Line.Info clipInfo : clipInfos) {
+ if (info.matches(clipInfo)) {
return true;
}
}
More information about the distro-pkg-dev
mailing list