Expose shouldPlay
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@629 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -116,6 +116,18 @@ public abstract class SoundPlayer
|
|||||||
return (!_disabledTypes.contains(type));
|
return (!_disabledTypes.contains(type));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is sound on and is the specified soundtype enabled?
|
||||||
|
*/
|
||||||
|
public boolean shouldPlay (SoundType type)
|
||||||
|
{
|
||||||
|
if (type == null) {
|
||||||
|
type = DEFAULT; // let the lazy kids play too
|
||||||
|
}
|
||||||
|
|
||||||
|
return _clipVol != 0f && isEnabled(type);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turns on or off the specified sound type.
|
* Turns on or off the specified sound type.
|
||||||
*/
|
*/
|
||||||
@@ -250,15 +262,6 @@ public abstract class SoundPlayer
|
|||||||
*/
|
*/
|
||||||
protected abstract Frob loop (String pkgPath, String key, float pan);
|
protected abstract Frob loop (String pkgPath, String key, float pan);
|
||||||
|
|
||||||
protected boolean shouldPlay (SoundType type)
|
|
||||||
{
|
|
||||||
if (type == null) {
|
|
||||||
type = DEFAULT; // let the lazy kids play too
|
|
||||||
}
|
|
||||||
|
|
||||||
return _clipVol != 0f && isEnabled(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the run queue on which sound should be played. It defaults to {@link RunQueue#AWT}.
|
* Gets the run queue on which sound should be played. It defaults to {@link RunQueue#AWT}.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user