Struct libxm::XMContext [] [src]

pub struct XMContext { /* fields omitted */ }

The XM context.

Methods

impl XMContext
[src]

Creates an XM context.

Parameters

  • mod_data - The contents of the module.
  • rate - The play rate in Hz. Recommended value is 48000.

Plays the module and puts the sound samples in the specified output buffer. The output is in stereo.

Sets the maximum number of times a module can loop.

After the specified number of loops, calls to generate_samples() will generate silence.

Gets the loop count of the currently playing module.

This value is 0 when the module is still playing, 1 when the module has looped once, etc.

Gets the module name as a byte slice. The string encoding is unknown.

Gets the tracker name as a byte slice. The string encoding is unknown.

Gets the number of channels.

Gets the module length (in patterns).

Gets the number of patterns.

Gets the number of rows in a pattern.

Note

Pattern numbers go from 0 to get_number_of_patterns() - 1

Gets the number of instruments.

Gets the number of samples of an instrument.

Note

Instrument numbers go from 1 to get_number_of_instruments()

Gets the current module speed.

Gets the current position in the module being played.

Gets the latest time (in number of generated samples) when a particular instrument was triggered in any channel.

Note

Instrument numbers go from 1 to get_number_of_instruments()

Get the latest time (in number of generated samples) when a particular sample was triggered in any channel.

Note

Instrument numbers go from 1 to get_number_of_instruments()

Sample numbers go from 0 to get_number_of_samples(instrument) - 1

Get the latest time (in number of generated samples) when any instrument was triggered in a given channel.

Note

Channel numbers go from 1 to get_number_of_channels()

Trait Implementations

impl Send for XMContext
[src]

impl Sync for XMContext
[src]

impl Drop for XMContext
[src]

A method called when the value goes out of scope. Read more