libopenmpt
0.6.9+release
cross-platform C++ and C library to decode tracked music files
|
#include <libopenmpt/libopenmpt.hpp>
Public Types | |
enum | render_param { RENDER_MASTERGAIN_MILLIBEL = 1 , RENDER_STEREOSEPARATION_PERCENT = 2 , RENDER_INTERPOLATIONFILTER_LENGTH = 3 , RENDER_VOLUMERAMPING_STRENGTH = 4 } |
Parameter index to use with openmpt::module::get_render_param and openmpt::module::set_render_param. More... | |
enum | command_index { command_note = 0 , command_instrument = 1 , command_volumeffect = 2 , command_effect = 3 , command_volume = 4 , command_parameter = 5 } |
Parameter index to use with openmpt::module::get_pattern_row_channel_command, openmpt::module::format_pattern_row_channel_command and openmpt::module::highlight_pattern_row_channel_command. More... | |
Public Member Functions | |
module (std::istream &stream, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) | |
Construct an openmpt::module. More... | |
module (const std::vector< std::byte > &data, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) | |
module (const std::byte *beg, const std::byte *end, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) | |
module (const std::byte *data, std::size_t size, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) | |
module (const std::vector< std::uint8_t > &data, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) | |
module (const std::uint8_t *beg, const std::uint8_t *end, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) | |
module (const std::uint8_t *data, std::size_t size, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) | |
module (const std::vector< char > &data, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) | |
module (const char *beg, const char *end, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) | |
module (const char *data, std::size_t size, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) | |
module (const void *data, std::size_t size, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) | |
virtual | ~module () |
void | select_subsong (std::int32_t subsong) |
Select a sub-song from a multi-song module. More... | |
std::int32_t | get_selected_subsong () const |
Get currently selected sub-song from a multi-song module. More... | |
void | set_repeat_count (std::int32_t repeat_count) |
Set Repeat Count. More... | |
std::int32_t | get_repeat_count () const |
Get Repeat Count. More... | |
double | get_duration_seconds () const |
Get approximate song duration. More... | |
double | set_position_seconds (double seconds) |
Set approximate current song position. More... | |
double | get_position_seconds () const |
Get current song position. More... | |
double | set_position_order_row (std::int32_t order, std::int32_t row) |
Set approximate current song position. More... | |
std::int32_t | get_render_param (int param) const |
Get render parameter. More... | |
void | set_render_param (int param, std::int32_t value) |
Set render parameter. More... | |
std::size_t | read (std::int32_t samplerate, std::size_t count, std::int16_t *mono) |
Render audio data. More... | |
std::size_t | read (std::int32_t samplerate, std::size_t count, std::int16_t *left, std::int16_t *right) |
Render audio data. More... | |
std::size_t | read (std::int32_t samplerate, std::size_t count, std::int16_t *left, std::int16_t *right, std::int16_t *rear_left, std::int16_t *rear_right) |
Render audio data. More... | |
std::size_t | read (std::int32_t samplerate, std::size_t count, float *mono) |
Render audio data. More... | |
std::size_t | read (std::int32_t samplerate, std::size_t count, float *left, float *right) |
Render audio data. More... | |
std::size_t | read (std::int32_t samplerate, std::size_t count, float *left, float *right, float *rear_left, float *rear_right) |
Render audio data. More... | |
std::size_t | read_interleaved_stereo (std::int32_t samplerate, std::size_t count, std::int16_t *interleaved_stereo) |
Render audio data. More... | |
std::size_t | read_interleaved_quad (std::int32_t samplerate, std::size_t count, std::int16_t *interleaved_quad) |
Render audio data. More... | |
std::size_t | read_interleaved_stereo (std::int32_t samplerate, std::size_t count, float *interleaved_stereo) |
Render audio data. More... | |
std::size_t | read_interleaved_quad (std::int32_t samplerate, std::size_t count, float *interleaved_quad) |
Render audio data. More... | |
std::vector< std::string > | get_metadata_keys () const |
Get the list of supported metadata item keys. More... | |
std::string | get_metadata (const std::string &key) const |
Get a metadata item value. More... | |
double | get_current_estimated_bpm () const |
Get the current estimated beats per minute (BPM). More... | |
std::int32_t | get_current_speed () const |
Get the current speed. More... | |
std::int32_t | get_current_tempo () const |
Get the current tempo. More... | |
std::int32_t | get_current_order () const |
Get the current order. More... | |
std::int32_t | get_current_pattern () const |
Get the current pattern. More... | |
std::int32_t | get_current_row () const |
Get the current row. More... | |
std::int32_t | get_current_playing_channels () const |
Get the current amount of playing channels. More... | |
float | get_current_channel_vu_mono (std::int32_t channel) const |
Get an approximate indication of the channel volume. More... | |
float | get_current_channel_vu_left (std::int32_t channel) const |
Get an approximate indication of the channel volume on the front-left speaker. More... | |
float | get_current_channel_vu_right (std::int32_t channel) const |
Get an approximate indication of the channel volume on the front-right speaker. More... | |
float | get_current_channel_vu_rear_left (std::int32_t channel) const |
Get an approximate indication of the channel volume on the rear-left speaker. More... | |
float | get_current_channel_vu_rear_right (std::int32_t channel) const |
Get an approximate indication of the channel volume on the rear-right speaker. More... | |
std::int32_t | get_num_subsongs () const |
Get the number of sub-songs. More... | |
std::int32_t | get_num_channels () const |
Get the number of pattern channels. More... | |
std::int32_t | get_num_orders () const |
Get the number of orders. More... | |
std::int32_t | get_num_patterns () const |
Get the number of patterns. More... | |
std::int32_t | get_num_instruments () const |
Get the number of instruments. More... | |
std::int32_t | get_num_samples () const |
Get the number of samples. More... | |
std::vector< std::string > | get_subsong_names () const |
Get a list of sub-song names. More... | |
std::vector< std::string > | get_channel_names () const |
Get a list of channel names. More... | |
std::vector< std::string > | get_order_names () const |
Get a list of order names. More... | |
std::vector< std::string > | get_pattern_names () const |
Get a list of pattern names. More... | |
std::vector< std::string > | get_instrument_names () const |
Get a list of instrument names. More... | |
std::vector< std::string > | get_sample_names () const |
Get a list of sample names. More... | |
std::int32_t | get_order_pattern (std::int32_t order) const |
Get pattern at order position. More... | |
std::int32_t | get_pattern_num_rows (std::int32_t pattern) const |
Get the number of rows in a pattern. More... | |
std::uint8_t | get_pattern_row_channel_command (std::int32_t pattern, std::int32_t row, std::int32_t channel, int command) const |
Get raw pattern content. More... | |
std::string | format_pattern_row_channel_command (std::int32_t pattern, std::int32_t row, std::int32_t channel, int command) const |
Get formatted (human-readable) pattern content. More... | |
std::string | highlight_pattern_row_channel_command (std::int32_t pattern, std::int32_t row, std::int32_t channel, int command) const |
Get highlighting information for formatted pattern content. More... | |
std::string | format_pattern_row_channel (std::int32_t pattern, std::int32_t row, std::int32_t channel, std::size_t width=0, bool pad=true) const |
Get formatted (human-readable) pattern content. More... | |
std::string | highlight_pattern_row_channel (std::int32_t pattern, std::int32_t row, std::int32_t channel, std::size_t width=0, bool pad=true) const |
Get highlighting information for formatted pattern content. More... | |
std::vector< std::string > | get_ctls () const |
Retrieve supported ctl keys. More... | |
LIBOPENMPT_ATTR_DEPRECATED std::string | ctl_get (const std::string &ctl) const |
Get current ctl value. More... | |
bool | ctl_get_boolean (std::string_view ctl) const |
Get current ctl boolean value. More... | |
std::int64_t | ctl_get_integer (std::string_view ctl) const |
Get current ctl integer value. More... | |
double | ctl_get_floatingpoint (std::string_view ctl) const |
Get current ctl floatingpoint value. More... | |
std::string | ctl_get_text (std::string_view ctl) const |
Get current ctl text value. More... | |
LIBOPENMPT_ATTR_DEPRECATED void | ctl_set (const std::string &ctl, const std::string &value) |
Set ctl value. More... | |
void | ctl_set_boolean (std::string_view ctl, bool value) |
Set ctl boolean value. More... | |
void | ctl_set_integer (std::string_view ctl, std::int64_t value) |
Set ctl integer value. More... | |
void | ctl_set_floatingpoint (std::string_view ctl, double value) |
Set ctl floatingpoint value. More... | |
void | ctl_set_text (std::string_view ctl, std::string_view value) |
Set ctl text value. More... | |
Friends | |
class | module_ext |
Parameter index to use with openmpt::module::get_pattern_row_channel_command, openmpt::module::format_pattern_row_channel_command and openmpt::module::highlight_pattern_row_channel_command.
Enumerator | |
---|---|
command_note | |
command_instrument | |
command_volumeffect | |
command_effect | |
command_volume | |
command_parameter |
Parameter index to use with openmpt::module::get_render_param and openmpt::module::set_render_param.
openmpt::module::module | ( | std::istream & | stream, |
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
Construct an openmpt::module.
stream | Input stream from which the module is loaded. After the constructor has finished successfully, the input position of stream is set to the byte after the last byte that has been read. If the constructor fails, the state of the input position of stream is undefined. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
openmpt::module::module | ( | const std::vector< std::byte > & | data, |
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
data | Data to load the module from. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
openmpt::module::module | ( | const std::byte * | beg, |
const std::byte * | end, | ||
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
beg | Begin of data to load the module from. |
end | End of data to load the module from. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
openmpt::module::module | ( | const std::byte * | data, |
std::size_t | size, | ||
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
data | Data to load the module from. |
size | Amount of data available. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
openmpt::module::module | ( | const std::vector< std::uint8_t > & | data, |
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
data | Data to load the module from. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
openmpt::module::module | ( | const std::uint8_t * | beg, |
const std::uint8_t * | end, | ||
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
beg | Begin of data to load the module from. |
end | End of data to load the module from. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
openmpt::module::module | ( | const std::uint8_t * | data, |
std::size_t | size, | ||
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
data | Data to load the module from. |
size | Amount of data available. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
openmpt::module::module | ( | const std::vector< char > & | data, |
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
data | Data to load the module from. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
openmpt::module::module | ( | const char * | beg, |
const char * | end, | ||
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
beg | Begin of data to load the module from. |
end | End of data to load the module from. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
openmpt::module::module | ( | const char * | data, |
std::size_t | size, | ||
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
data | Data to load the module from. |
size | Amount of data available. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
openmpt::module::module | ( | const void * | data, |
std::size_t | size, | ||
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
data | Data to load the module from. |
size | Amount of data available. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
|
virtual |
LIBOPENMPT_ATTR_DEPRECATED std::string openmpt::module::ctl_get | ( | const std::string & | ctl | ) | const |
Get current ctl value.
ctl | The ctl key whose value should be retrieved. |
bool openmpt::module::ctl_get_boolean | ( | std::string_view | ctl | ) | const |
Get current ctl boolean value.
ctl | The ctl key whose value should be retrieved. |
double openmpt::module::ctl_get_floatingpoint | ( | std::string_view | ctl | ) | const |
Get current ctl floatingpoint value.
ctl | The ctl key whose value should be retrieved. |
std::int64_t openmpt::module::ctl_get_integer | ( | std::string_view | ctl | ) | const |
Get current ctl integer value.
ctl | The ctl key whose value should be retrieved. |
std::string openmpt::module::ctl_get_text | ( | std::string_view | ctl | ) | const |
Get current ctl text value.
ctl | The ctl key whose value should be retrieved. |
LIBOPENMPT_ATTR_DEPRECATED void openmpt::module::ctl_set | ( | const std::string & | ctl, |
const std::string & | value | ||
) |
Set ctl value.
ctl | The ctl key whose value should be set. |
value | The value that should be set. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the value is not sensible (e.g. negative tempo factor) or under the circumstances outlined in openmpt::module::get_ctls. |
void openmpt::module::ctl_set_boolean | ( | std::string_view | ctl, |
bool | value | ||
) |
Set ctl boolean value.
ctl | The ctl key whose value should be set. |
value | The value that should be set. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the value is not sensible (e.g. negative tempo factor) or under the circumstances outlined in openmpt::module::get_ctls. |
void openmpt::module::ctl_set_floatingpoint | ( | std::string_view | ctl, |
double | value | ||
) |
Set ctl floatingpoint value.
ctl | The ctl key whose value should be set. |
value | The value that should be set. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the value is not sensible (e.g. negative tempo factor) or under the circumstances outlined in openmpt::module::get_ctls. |
void openmpt::module::ctl_set_integer | ( | std::string_view | ctl, |
std::int64_t | value | ||
) |
Set ctl integer value.
ctl | The ctl key whose value should be set. |
value | The value that should be set. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the value is not sensible (e.g. negative tempo factor) or under the circumstances outlined in openmpt::module::get_ctls. |
void openmpt::module::ctl_set_text | ( | std::string_view | ctl, |
std::string_view | value | ||
) |
Set ctl text value.
ctl | The ctl key whose value should be set. |
value | The value that should be set. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the value is not sensible (e.g. negative tempo factor) or under the circumstances outlined in openmpt::module::get_ctls. |
std::string openmpt::module::format_pattern_row_channel | ( | std::int32_t | pattern, |
std::int32_t | row, | ||
std::int32_t | channel, | ||
std::size_t | width = 0 , |
||
bool | pad = true |
||
) | const |
Get formatted (human-readable) pattern content.
pattern | The pattern whose data should be retrieved. |
row | The row from which the data should be retrieved. |
channel | The channel from which the data should be retrieved. |
width | The maximum number of characters the string should contain. 0 means no limit. |
pad | If true, the string will be resized to the exact length provided in the width parameter. |
std::string openmpt::module::format_pattern_row_channel_command | ( | std::int32_t | pattern, |
std::int32_t | row, | ||
std::int32_t | channel, | ||
int | command | ||
) | const |
Get formatted (human-readable) pattern content.
pattern | The pattern whose data should be retrieved. |
row | The row from which the data should be retrieved. |
channel | The channel from which the data should be retrieved. |
command | The cell index at which the data should be retrieved. |
std::vector<std::string> openmpt::module::get_channel_names | ( | ) | const |
std::vector<std::string> openmpt::module::get_ctls | ( | ) | const |
Retrieve supported ctl keys.
An exclamation mark ("!") or a question mark ("?") can be appended to any ctl key in order to influence the behaviour in case of an unknown ctl key. "!" causes an exception to be thrown; "?" causes the ctl to be silently ignored. In case neither is appended to the key name, unknown init_ctls are ignored by default and other ctls throw an exception by default.
float openmpt::module::get_current_channel_vu_left | ( | std::int32_t | channel | ) | const |
Get an approximate indication of the channel volume on the front-left speaker.
channel | The channel whose volume should be retrieved. |
float openmpt::module::get_current_channel_vu_mono | ( | std::int32_t | channel | ) | const |
Get an approximate indication of the channel volume.
channel | The channel whose volume should be retrieved. |
float openmpt::module::get_current_channel_vu_rear_left | ( | std::int32_t | channel | ) | const |
Get an approximate indication of the channel volume on the rear-left speaker.
channel | The channel whose volume should be retrieved. |
float openmpt::module::get_current_channel_vu_rear_right | ( | std::int32_t | channel | ) | const |
Get an approximate indication of the channel volume on the rear-right speaker.
channel | The channel whose volume should be retrieved. |
float openmpt::module::get_current_channel_vu_right | ( | std::int32_t | channel | ) | const |
Get an approximate indication of the channel volume on the front-right speaker.
channel | The channel whose volume should be retrieved. |
double openmpt::module::get_current_estimated_bpm | ( | ) | const |
Get the current estimated beats per minute (BPM).
std::int32_t openmpt::module::get_current_order | ( | ) | const |
Get the current order.
std::int32_t openmpt::module::get_current_pattern | ( | ) | const |
Get the current pattern.
std::int32_t openmpt::module::get_current_playing_channels | ( | ) | const |
Get the current amount of playing channels.
std::int32_t openmpt::module::get_current_row | ( | ) | const |
Get the current row.
std::int32_t openmpt::module::get_current_speed | ( | ) | const |
Get the current speed.
std::int32_t openmpt::module::get_current_tempo | ( | ) | const |
Get the current tempo.
double openmpt::module::get_duration_seconds | ( | ) | const |
Get approximate song duration.
std::vector<std::string> openmpt::module::get_instrument_names | ( | ) | const |
Get a list of instrument names.
std::string openmpt::module::get_metadata | ( | const std::string & | key | ) | const |
Get a metadata item value.
key | Metadata item key to query. Use openmpt::module::get_metadata_keys to check for available keys. Possible keys are:
|
std::vector<std::string> openmpt::module::get_metadata_keys | ( | ) | const |
Get the list of supported metadata item keys.
std::int32_t openmpt::module::get_num_channels | ( | ) | const |
Get the number of pattern channels.
std::int32_t openmpt::module::get_num_instruments | ( | ) | const |
Get the number of instruments.
std::int32_t openmpt::module::get_num_orders | ( | ) | const |
Get the number of orders.
std::int32_t openmpt::module::get_num_patterns | ( | ) | const |
Get the number of patterns.
std::int32_t openmpt::module::get_num_samples | ( | ) | const |
Get the number of samples.
std::int32_t openmpt::module::get_num_subsongs | ( | ) | const |
Get the number of sub-songs.
std::vector<std::string> openmpt::module::get_order_names | ( | ) | const |
std::int32_t openmpt::module::get_order_pattern | ( | std::int32_t | order | ) | const |
Get pattern at order position.
order | The order item whose pattern index should be retrieved. |
std::vector<std::string> openmpt::module::get_pattern_names | ( | ) | const |
std::int32_t openmpt::module::get_pattern_num_rows | ( | std::int32_t | pattern | ) | const |
Get the number of rows in a pattern.
pattern | The pattern whose row count should be retrieved. |
std::uint8_t openmpt::module::get_pattern_row_channel_command | ( | std::int32_t | pattern, |
std::int32_t | row, | ||
std::int32_t | channel, | ||
int | command | ||
) | const |
Get raw pattern content.
pattern | The pattern whose data should be retrieved. |
row | The row from which the data should be retrieved. |
channel | The channel from which the data should be retrieved. |
command | The cell index at which the data should be retrieved. See openmpt::module::command_index |
double openmpt::module::get_position_seconds | ( | ) | const |
Get current song position.
std::int32_t openmpt::module::get_render_param | ( | int | param | ) | const |
Get render parameter.
param | Parameter to query. See openmpt::module::render_param. |
openmpt::exception | Throws an exception derived from openmpt::exception if param is invalid. |
std::int32_t openmpt::module::get_repeat_count | ( | ) | const |
Get Repeat Count.
std::vector<std::string> openmpt::module::get_sample_names | ( | ) | const |
std::int32_t openmpt::module::get_selected_subsong | ( | ) | const |
Get currently selected sub-song from a multi-song module.
std::vector<std::string> openmpt::module::get_subsong_names | ( | ) | const |
Get a list of sub-song names.
std::string openmpt::module::highlight_pattern_row_channel | ( | std::int32_t | pattern, |
std::int32_t | row, | ||
std::int32_t | channel, | ||
std::size_t | width = 0 , |
||
bool | pad = true |
||
) | const |
Get highlighting information for formatted pattern content.
pattern | The pattern whose data should be retrieved. |
row | The row from which the data should be retrieved. |
channel | The channel from which the data should be retrieved. |
width | The maximum number of characters the string should contain. 0 means no limit. |
pad | If true, the string will be resized to the exact length provided in the width parameter. |
std::string openmpt::module::highlight_pattern_row_channel_command | ( | std::int32_t | pattern, |
std::int32_t | row, | ||
std::int32_t | channel, | ||
int | command | ||
) | const |
Get highlighting information for formatted pattern content.
pattern | The pattern whose data should be retrieved. |
row | The row from which the data should be retrieved. |
channel | The channel from which the data should be retrieved. |
command | The cell index at which the data should be retrieved. See openmpt::module::command_index |
std::size_t openmpt::module::read | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
float * | left, | ||
float * | right | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
left | Pointer to a buffer of at least count elements that receives the left output. |
right | Pointer to a buffer of at least count elements that receives the right output. |
0 | The end of song has been reached. |
std::size_t openmpt::module::read | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
float * | left, | ||
float * | right, | ||
float * | rear_left, | ||
float * | rear_right | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
left | Pointer to a buffer of at least count elements that receives the left output. |
right | Pointer to a buffer of at least count elements that receives the right output. |
rear_left | Pointer to a buffer of at least count elements that receives the rear left output. |
rear_right | Pointer to a buffer of at least count elements that receives the rear right output. |
0 | The end of song has been reached. |
std::size_t openmpt::module::read | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
float * | mono | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
mono | Pointer to a buffer of at least count elements that receives the mono/center output. |
0 | The end of song has been reached. |
std::size_t openmpt::module::read | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
std::int16_t * | left, | ||
std::int16_t * | right | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
left | Pointer to a buffer of at least count elements that receives the left output. |
right | Pointer to a buffer of at least count elements that receives the right output. |
0 | The end of song has been reached. |
std::size_t openmpt::module::read | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
std::int16_t * | left, | ||
std::int16_t * | right, | ||
std::int16_t * | rear_left, | ||
std::int16_t * | rear_right | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
left | Pointer to a buffer of at least count elements that receives the left output. |
right | Pointer to a buffer of at least count elements that receives the right output. |
rear_left | Pointer to a buffer of at least count elements that receives the rear left output. |
rear_right | Pointer to a buffer of at least count elements that receives the rear right output. |
0 | The end of song has been reached. |
std::size_t openmpt::module::read | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
std::int16_t * | mono | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
mono | Pointer to a buffer of at least count elements that receives the mono/center output. |
0 | The end of song has been reached. |
std::size_t openmpt::module::read_interleaved_quad | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
float * | interleaved_quad | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
interleaved_quad | Pointer to a buffer of at least count*4 elements that receives the interleaved quad surround output in the order (L,R,RL,RR). |
0 | The end of song has been reached. |
std::size_t openmpt::module::read_interleaved_quad | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
std::int16_t * | interleaved_quad | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
interleaved_quad | Pointer to a buffer of at least count*4 elements that receives the interleaved quad surround output in the order (L,R,RL,RR). |
0 | The end of song has been reached. |
std::size_t openmpt::module::read_interleaved_stereo | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
float * | interleaved_stereo | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
interleaved_stereo | Pointer to a buffer of at least count*2 elements that receives the interleaved stereo output in the order (L,R). |
0 | The end of song has been reached. |
std::size_t openmpt::module::read_interleaved_stereo | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
std::int16_t * | interleaved_stereo | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
interleaved_stereo | Pointer to a buffer of at least count*2 elements that receives the interleaved stereo output in the order (L,R). |
0 | The end of song has been reached. |
void openmpt::module::select_subsong | ( | std::int32_t | subsong | ) |
Select a sub-song from a multi-song module.
subsong | Index of the sub-song. -1 plays all sub-songs consecutively. |
openmpt::exception | Throws an exception derived from openmpt::exception if sub-song is not in range [-1,openmpt::module::get_num_subsongs()[ |
double openmpt::module::set_position_order_row | ( | std::int32_t | order, |
std::int32_t | row | ||
) |
Set approximate current song position.
If order or row are out of range, to position is not modified and the current position is returned.
order | Pattern order number to seek to. |
row | Pattern row number to seek to. |
double openmpt::module::set_position_seconds | ( | double | seconds | ) |
Set approximate current song position.
seconds | Seconds to seek to. If seconds is out of range, the position gets set to song start or end respectively. |
void openmpt::module::set_render_param | ( | int | param, |
std::int32_t | value | ||
) |
Set render parameter.
param | Parameter to set. See openmpt::module::render_param. |
value | The value to set param to. |
openmpt::exception | Throws an exception derived from openmpt::exception if param is invalid or value is out of range. |
void openmpt::module::set_repeat_count | ( | std::int32_t | repeat_count | ) |
Set Repeat Count.
repeat_count | Repeat Count
|
|
friend |