public class ANIMAudioCommand
extends java.lang.Object
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
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
ANIMAudioCommand(int command,
int volume,
int sound,
int repeats,
int channelMask,
int frequency,
int flags)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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
public ANIMAudioCommand(int command, int volume, int sound, int repeats, int channelMask, int frequency, int flags)
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()