1 |
/* |
/* |
2 |
* jlscp - a java LinuxSampler control protocol API |
* jlscp - a java LinuxSampler control protocol API |
3 |
* |
* |
4 |
* Copyright (C) 2005-2007 Grigor Iliev <grigor@grigoriliev.com> |
* Copyright (C) 2005-2008 Grigor Iliev <grigor@grigoriliev.com> |
5 |
* |
* |
6 |
* This file is part of jlscp. |
* This file is part of jlscp. |
7 |
* |
* |
28 |
*/ |
*/ |
29 |
public class GlobalInfoEvent extends java.util.EventObject { |
public class GlobalInfoEvent extends java.util.EventObject { |
30 |
private float volume = 0; |
private float volume = 0; |
31 |
|
private int voiceLimit; |
32 |
|
private int streamLimit; |
33 |
|
|
34 |
/** |
/** |
35 |
* Constructs a <code>GlobalInfoEvent</code> object. |
* Constructs a <code>GlobalInfoEvent</code> object. |
52 |
} |
} |
53 |
|
|
54 |
/** |
/** |
55 |
|
* Constructs a <code>GlobalInfoEvent</code> object. |
56 |
|
* @param source The object that originated the event. |
57 |
|
*/ |
58 |
|
public |
59 |
|
GlobalInfoEvent(Object source, int maxVoices, int maxStreams) { |
60 |
|
super(source); |
61 |
|
voiceLimit = maxVoices; |
62 |
|
streamLimit = maxStreams; |
63 |
|
} |
64 |
|
|
65 |
|
/** |
66 |
* Gets the new global volume value of the sampler. |
* Gets the new global volume value of the sampler. |
67 |
* The returned value is only valid when {@link GlobalInfoListener#volumeChanged} |
* The returned value is only valid when {@link GlobalInfoListener#volumeChanged} |
68 |
* event is fired. |
* event is fired. |
70 |
*/ |
*/ |
71 |
public float |
public float |
72 |
getVolume() { return volume; } |
getVolume() { return volume; } |
73 |
|
|
74 |
|
/** |
75 |
|
* Gets the new global sampler-wide limit of maximum voices. |
76 |
|
* The returned value is only valid when {@link GlobalInfoListener#voiceLimitChanged} |
77 |
|
* event is fired. |
78 |
|
* @return The new global sampler-wide limit of maximum voices. |
79 |
|
*/ |
80 |
|
public int |
81 |
|
getVoiceLimit() { return voiceLimit; } |
82 |
|
|
83 |
|
/** |
84 |
|
* Gets the new global sampler-wide limit of maximum disk streams. |
85 |
|
* The returned value is only valid when {@link GlobalInfoListener#streamLimitChanged} |
86 |
|
* event is fired. |
87 |
|
* @return The new global sampler-wide limit of maximum disk streams. |
88 |
|
*/ |
89 |
|
public int |
90 |
|
getStreamLimit() { return streamLimit; } |
91 |
} |
} |