Class ANIMAudioCommand
java.lang.Object
org.monte.media.anim.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
- Author:
- Werner Randelshofer, Hausmatt 10, CH-6405 Goldau, Switzerland
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intStart playing a sound.static final intChange frequency/volume for a channelMask.static final intStop the sound in a given channelMask.static final intPlay the sound, but only if the channelMask isn't in use. -
Constructor Summary
ConstructorsConstructorDescriptionANIMAudioCommand(int command, int volume, int sound, int repeats, int channelMask, int frequency, int flags) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()voiddoCommand(ANIMMovieResources track, ANIMAudioCommand[] runningCommands) intintintfloatgetPan()intintgetSound()intvoidplay(ANIMMovieResources track) voidprepare(ANIMMovieResources track) voidstop(ANIMMovieResources track) voidstop(ANIMMovieResources track, int channelMask) Stops playback of this audio command on the specified channels.
-
Field Details
-
COMMAND_PLAY_SOUND
public static final int COMMAND_PLAY_SOUNDStart playing a sound.- See Also:
-
COMMAND_STOP_SOUND
public static final int COMMAND_STOP_SOUNDStop the sound in a given channelMask.- See Also:
-
COMMAND_SET_FREQVOL
public static final int COMMAND_SET_FREQVOLChange frequency/volume for a channelMask.- See Also:
-
FLAG_NO_INTERRUPT
public static final int FLAG_NO_INTERRUPTPlay the sound, but only if the channelMask isn't in use.- See Also:
-
-
Constructor Details
-
ANIMAudioCommand
public ANIMAudioCommand(int command, int volume, int sound, int repeats, int channelMask, int frequency, int flags) Creates a new instance.
-
-
Method Details
-
getChannelMask
public int getChannelMask() -
getFrequency
public int getFrequency() -
getSound
public int getSound() -
getVolume
public int getVolume() -
getCommand
public int getCommand() -
getPan
public float getPan() -
prepare
-
play
-
stop
-
stop
Stops playback of this audio command on the specified channels. -
doCommand
-
dispose
public void dispose() -
getRepeats
public int getRepeats()
-