1 |
/* |
/* |
2 |
* JSampler - a java front-end for LinuxSampler |
* JSampler - a java front-end for LinuxSampler |
3 |
* |
* |
4 |
* Copyright (C) 2005-2006 Grigor Iliev <grigor@grigoriliev.com> |
* Copyright (C) 2011 Grigor Iliev <grigor@grigoriliev.com> |
5 |
* |
* |
6 |
* This file is part of JSampler. |
* This file is part of JSampler. |
7 |
* |
* |
23 |
package org.jsampler.event; |
package org.jsampler.event; |
24 |
|
|
25 |
import org.jsampler.AudioDeviceModel; |
import org.jsampler.AudioDeviceModel; |
26 |
|
import org.jsampler.EffectChain; |
27 |
|
|
28 |
|
|
29 |
/** |
/** |
33 |
public class AudioDeviceEvent extends java.util.EventObject { |
public class AudioDeviceEvent extends java.util.EventObject { |
34 |
private AudioDeviceModel audioDeviceModel; |
private AudioDeviceModel audioDeviceModel; |
35 |
|
|
36 |
|
private EffectChain chain; |
37 |
|
|
38 |
/** |
/** |
39 |
* Constructs an <code>AudioDeviceEvent</code> object. |
* Constructs an <code>AudioDeviceEvent</code> object. |
40 |
* |
* |
43 |
*/ |
*/ |
44 |
public |
public |
45 |
AudioDeviceEvent(Object source, AudioDeviceModel audioDeviceModel) { |
AudioDeviceEvent(Object source, AudioDeviceModel audioDeviceModel) { |
46 |
|
this(source, audioDeviceModel, null); |
47 |
|
} |
48 |
|
|
49 |
|
/** |
50 |
|
* Constructs an <code>AudioDeviceEvent</code> object. |
51 |
|
* |
52 |
|
* @param source The object that originated the event. |
53 |
|
* @param audioDeviceModel The model of the audio device for which this event occurs. |
54 |
|
*/ |
55 |
|
public |
56 |
|
AudioDeviceEvent(Object source, AudioDeviceModel audioDeviceModel, EffectChain chain) { |
57 |
super(source); |
super(source); |
58 |
this.audioDeviceModel = audioDeviceModel; |
this.audioDeviceModel = audioDeviceModel; |
59 |
|
this.chain = chain; |
60 |
} |
} |
61 |
|
|
62 |
/** |
/** |
65 |
*/ |
*/ |
66 |
public AudioDeviceModel |
public AudioDeviceModel |
67 |
getAudioDeviceModel() { return audioDeviceModel; } |
getAudioDeviceModel() { return audioDeviceModel; } |
68 |
|
|
69 |
|
/** |
70 |
|
* Depending on the event provides the newly added effect chain when |
71 |
|
* a new chain is added or the removed effect chain when a chain is removed. |
72 |
|
*/ |
73 |
|
public EffectChain |
74 |
|
getEffectChain() { return chain; } |
75 |
} |
} |