|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deken.game.sound.audio.streamAudioFilter.StreamAudioFilter
org.deken.game.sound.audio.streamAudioFilter.DistanceStreamFilter
public class DistanceStreamFilter
Title: DistanceFilter
Description: DistanceFilter is based on the Sound3DFilter from David Brackeen. The sound fades in and out based on the distance from the listener.
Copyright: Copyright (c) 2007
Constructor Summary | |
---|---|
DistanceStreamFilter(Sprite source,
Sprite listener,
int maxDistance)
DistanceFilter Creates a new DistanceFilter with the specified source and listener GamePieces. |
Method Summary | |
---|---|
void |
filter(byte[] samples,
int offset,
int length)
filter Filters the sound so that it gets more quiet with distance. |
Methods inherited from class org.deken.game.sound.audio.streamAudioFilter.StreamAudioFilter |
---|
filter, getRemainingSize, getSample, reset, setAudioFormat, setSample |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DistanceStreamFilter(Sprite source, Sprite listener, int maxDistance)
The maxDistance parameter is the maximum distance that the sound can be heard.
source
- GamePiecelistener
- GamePiecemaxDistance
- intMethod Detail |
---|
public void filter(byte[] samples, int offset, int length)
filter
in class StreamAudioFilter
samples
- byte[]offset
- intlength
- int
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |