ndspy.soundSequencePlayer
: Sound Sequence Players¶
The ndspy.soundSequencePlayer
module provides a class that represents a
sequence player.
A “sequence player” can play both SSEQ files and SSAR sequences. The sequence player data in an SDAT file defines a sequence player’s limits for memory and hardware channel usage. This lets games use multiple sequence players simultaneously while minimizing conflicts between them.
See also
If you aren’t familiar with how SDAT files are structured, consider reading the appendix explaining this.
- class ndspy.soundSequencePlayer.SequencePlayer([maxSequences[, channels[, heapSize]]])¶
A sequence player.
- Parameters:
maxSequences – The initial value for the
maxSequences
attribute.channels – The initial value for the
channels
attribute.heapSize – The initial value for the
heapSize
attribute.
- channels¶
The hardware channels that this sequence player will be allowed to use. If the player is already using all of its allotted channels and needs to play another wave, the one that has been playing for the longest will be cut off prematurely to allow the new one to play.
All numbers in this set should be between 0 and 15 inclusive.
If this is empty, the allowed channels will be determined at runtime.
- heapSize¶
The total amount of memory that the sequence player will be allowed to use.
If this is 0, the heap size will be determined at runtime.
- Type:
- Default:
0
- maxSequences¶
The maximum number of sequences that this sequence player will be allowed to play simultaneously. If the player is requested to play another sequence while it is already playing this many of them, the one that has been playing for the longest will be cut off prematurely to allow the new one to play.
- Type:
- Default:
1
- save()¶
Return this sequence player’s
maxSequences
,channels
, andheapSize
as a triple. This matches the parameters of the default class constructor.