|
Copyright 2011-01-06 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.media.anim.ANIMAudioCommand
public class ANIMAudioCommand
An ANIMAudioCommand handles an audio command that is associated to a single ANIMFrame of a ANIMMovieTrack. An ANIMFrame may be associated to multiple ANIMAudioCommands.
This version of ANIMAudioCommand is designed to handle audio commands as specified by the ANIM+SLA Sound Control collection chunk (ILBM SCTL).
Here's the specification of the SCTL collection chunk:
typedef UBYTE Command; // Choice of commands
#define cmdPlaySound 1 // Start playing a sound
#define cmdStopSound 2 // Stop the sound in a given channelMask
#define cmdSetFreqvol 3 // Change frequency/volume for a channelMask
typedef USHORT Flags; // Choice of flags
#define flagNoInterrupt 1 // Play the sound, but only if
// the channelMask isn't in use
typedef struct {
Command command; // What to do, see above
UBYTE volume; // Volume 0..64
UWORD sound, // Sound number (one based)
repeats, // Number of times to play the sound
channelMask, // Channel(s) to use for playing (bit mask)
frequency; // If non-zero, overrides the VHDR value
Flags flags; // Flags, see above
UBYTE pad[4]; // For future use
| Field Summary | |
|---|---|
static int |
COMMAND_PLAY_SOUND
Start playing a sound. |
static int |
COMMAND_SET_FREQVOL
Change frequency/volume for a channelMask. |
static int |
COMMAND_STOP_SOUND
Stop the sound in a given channelMask. |
static int |
FLAG_NO_INTERRUPT
Play the sound, but only if the channelMask isn't in use. |
| Constructor Summary | |
|---|---|
ANIMAudioCommand(int command,
int volume,
int sound,
int repeats,
int channelMask,
int frequency,
int flags)
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
dispose()
|
void |
doCommand(ANIMMovieTrack track,
ANIMAudioCommand[] runningCommands)
|
int |
getChannelMask()
|
int |
getCommand()
|
int |
getFrequency()
|
int |
getSound()
|
int |
getVolume()
|
void |
play(ANIMMovieTrack track)
|
void |
prepare(ANIMMovieTrack track)
|
void |
stop(ANIMMovieTrack track)
|
void |
stop(ANIMMovieTrack track,
int channelMask)
Stops playback of this audio command on the specified channels. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int COMMAND_PLAY_SOUND
public static final int COMMAND_STOP_SOUND
public static final int COMMAND_SET_FREQVOL
public static final int FLAG_NO_INTERRUPT
| Constructor Detail |
|---|
public ANIMAudioCommand(int command,
int volume,
int sound,
int repeats,
int channelMask,
int frequency,
int flags)
| Method Detail |
|---|
public int getChannelMask()
public int getFrequency()
public int getSound()
public int getVolume()
public int getCommand()
public void prepare(ANIMMovieTrack track)
public void play(ANIMMovieTrack track)
public void stop(ANIMMovieTrack track)
public void stop(ANIMMovieTrack track,
int channelMask)
public void doCommand(ANIMMovieTrack track,
ANIMAudioCommand[] runningCommands)
public void dispose()
|
Copyright 2011-01-06 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||