Summary
Represents a module that can be used to play tracker music formats. Provides functionality to manipulate and retrieve audio data from the module.
Syntax
public class Module : IDisposable
Properties
Name | Property Type | Summary |
---|---|---|
Pointer | IntPtr |
The pointer representation that can be used with the
Libopenmpt static class.
|
Methods
Name | Return Value | Summary |
---|---|---|
~Module |
void | |
Create |
bool |
Creates a new
Unitune Module instance from the provided byte array of module data.
static
|
CreateAudioClip |
AudioClip |
Creates an
AudioClip from the module's audio data with the specified settings.
|
Create |
AudioClip |
Creates a streaming
AudioClip with the provided PCM reader and position callback functions.
Please note that this method is not available on WebGL and will fall back to CreateAudioClip instead.
|
Create |
AudioClip |
Creates a streaming
AudioClip from the module's audio data with the specified settings. Suitable for large files.
Please note that this method is not available on WebGL and will fall back to CreateAudioClip instead.
|
Dispose |
void |
Releases the unmanaged resources used by the module.
|
Get |
int |
Gets the index of the currently selected subsong.
|
GetDuration |
float |
Gets the duration of the module in seconds.
|
GetFrameCount |
int |
Gets the number of frames based on the specified duration at the given sample rate.
static
|
GetFrameCount |
int |
Gets the number of frames based on the duration of the selected subsong and at the given sample rate.
|
GetMetadata |
string[] |
Retrieves all metadata from the module.
|
GetMetadata |
string |
Retrieves metadata from the module based on the specified
ModuleMetadataType .
|
GetRenderParameter |
bool |
Get render parameter.
|
GetSampleCount |
int |
Gets the number of samples based on the duration of the selected subsong, the given channel count and sample rate.
|
GetSampleCount |
int |
Gets the number of samples based on the specified duration at the given sample rate and channel count.
static
|
GetSubsongCount |
int |
Gets the number of subsongs in the module.
|
GetSubsongName |
string |
Gets the name of the subsong at the specified index.
|
IsChannelCountValid |
bool |
Determines if the specified channel count is valid.
static
|
SelectSubsong |
bool |
Selects the subsong at the specified index for playback.
|
SetContinueAtEnd |
void |
Set the behavior when the end of the song is reached to continue from the loop start.
If the song is not programmed to loop, playback resumed from the song start.
|
SetFadeOutAtEnd |
void |
Set the behavior when the end of the song is reached to fade out for a short while.
This is the default behavior.
|
SetNormalizedTime |
void |
Set the playback position of the module based on a normalized time,
starting from a normalized time of the full duration and within a normalized duration.
That normalized duration corresponds to a portion of the full song.
|
SetNormalizedTime |
void |
Sets the playback position of the module based on a normalized time value.
|
SetPosition |
void |
Sets the frame position of the module based on various settings.
|
SetPosition |
void |
Sets the frame position of the module based on the sample rate.
|
SetRenderParameter |
bool |
Set render parameter.
|
SetSamples |
int |
Sets the audio samples into the specified frame buffer with the given channel count and sample rate.
|
SetStopAtEnd |
void |
Set the behavior when the end of the song is reached to stop abruptly.
|
SetTime |
void |
Sets the playback position of the module based on a time value in seconds.
|