|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwiiremotej.PrebufferedSound
public class PrebufferedSound
Takes the given array of sound data and packages it into ready-made reports that can be sent immediately via sendCommand. Timing is still important, though, so make sure to use this with a playPrebufferedSound method. PrebufferedSounds are immutable.
| Constructor Summary | |
|---|---|
PrebufferedSound(byte[][] soundData,
int sampleRate,
int sampleSize)
Creates a new prebuffered sound with the given data array. |
|
| Method Summary | |
|---|---|
byte[] |
getReport(int num)
Returns the specified prepackaged sound data report. |
int |
getSampleRate()
Returns the sample rate of the sound data should be played at. |
int |
getSampleSize()
Returns the size of a sample in bits. |
int |
numReports()
Returns the number of prepackaged sound data reports. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PrebufferedSound(byte[][] soundData,
int sampleRate,
int sampleSize)
soundData - the sound data, already pre-packaged in ready-to-go reports.sampleRate - the sample rate of the sound in Hz.sampleSize - the size of a sample (in bits).| Method Detail |
|---|
public byte[] getReport(int num)
public int numReports()
public int getSampleRate()
public int getSampleSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||