10 #ifndef LIBOPENMPT_HPP 11 #define LIBOPENMPT_HPP 22 #ifndef LIBOPENMPT_QUIRK_NO_CSTDINT 28 typedef ::int8_t int8_t;
29 typedef ::int16_t int16_t;
30 typedef ::int32_t int32_t;
31 typedef ::int64_t int64_t;
32 typedef ::uint8_t uint8_t;
33 typedef ::uint16_t uint16_t;
34 typedef ::uint32_t uint32_t;
35 typedef ::uint64_t uint64_t;
36 using namespace ::
std;
151 class LIBOPENMPT_CXX_API
exception :
public std::exception {
155 exception(
const std::string & text ) LIBOPENMPT_NOEXCEPT;
156 virtual ~
exception() LIBOPENMPT_NOEXCEPT;
157 virtual const char * what()
const LIBOPENMPT_NOEXCEPT;
179 LIBOPENMPT_DEPRECATED static const char library_features LIBOPENMPT_ATTR_DEPRECATED [] =
"library_features";
211 LIBOPENMPT_CXX_API std::string
get(
const std::string & key );
238 LIBOPENMPT_CXX_API
double could_open_propability( std::istream & stream,
double effort = 1.0, std::ostream & log = std::clog );
246 typedef std::map< std::string, std::string > initial_ctls_map;
264 RENDER_MASTERGAIN_MILLIBEL = 1,
271 RENDER_STEREOSEPARATION_PERCENT = 2,
284 RENDER_INTERPOLATIONFILTER_LENGTH = 3,
293 RENDER_VOLUMERAMPING_STRENGTH = 4
299 command_instrument = 1,
300 command_volumeffect = 2,
303 command_parameter = 5
311 void operator = (
const module & );
315 void set_impl( module_impl * i );
326 module( std::istream & stream, std::ostream & log = std::clog,
const std::map< std::string, std::string > & ctls = detail::initial_ctls_map() );
335 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() );
345 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() );
355 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() );
364 module(
const std::vector<char> & data, std::ostream & log = std::clog,
const std::map< std::string, std::string > & ctls = detail::initial_ctls_map() );
374 module(
const char * beg,
const char * end, std::ostream & log = std::clog,
const std::map< std::string, std::string > & ctls = detail::initial_ctls_map() );
384 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() );
394 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() );
405 void select_subsong( std::int32_t subsong );
414 void set_repeat_count( std::int32_t repeat_count );
423 std::int32_t get_repeat_count()
const;
429 double get_duration_seconds()
const;
437 double set_position_seconds(
double seconds );
443 double get_position_seconds()
const;
454 double set_position_order_row( std::int32_t order, std::int32_t row );
464 std::int32_t get_render_param(
int param )
const;
473 void set_render_param(
int param, std::int32_t value );
488 std::size_t read( std::int32_t samplerate, std::size_t count, std::int16_t * mono );
502 std::size_t read( std::int32_t samplerate, std::size_t count, std::int16_t * left, std::int16_t * right );
518 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 );
531 std::size_t read( std::int32_t samplerate, std::size_t count,
float * mono );
545 std::size_t read( std::int32_t samplerate, std::size_t count,
float * left,
float * right );
561 std::size_t read( std::int32_t samplerate, std::size_t count,
float * left,
float * right,
float * rear_left,
float * rear_right );
574 std::size_t read_interleaved_stereo( std::int32_t samplerate, std::size_t count, std::int16_t * interleaved_stereo );
587 std::size_t read_interleaved_quad( std::int32_t samplerate, std::size_t count, std::int16_t * interleaved_quad );
600 std::size_t read_interleaved_stereo( std::int32_t samplerate, std::size_t count,
float * interleaved_stereo );
613 std::size_t read_interleaved_quad( std::int32_t samplerate, std::size_t count,
float * interleaved_quad );
621 std::vector<std::string> get_metadata_keys()
const;
640 std::string get_metadata(
const std::string & key )
const;
646 std::int32_t get_current_speed()
const;
651 std::int32_t get_current_tempo()
const;
656 std::int32_t get_current_order()
const;
661 std::int32_t get_current_pattern()
const;
666 std::int32_t get_current_row()
const;
671 std::int32_t get_current_playing_channels()
const;
679 float get_current_channel_vu_mono( std::int32_t channel )
const;
686 float get_current_channel_vu_left( std::int32_t channel )
const;
693 float get_current_channel_vu_right( std::int32_t channel )
const;
700 float get_current_channel_vu_rear_left( std::int32_t channel )
const;
707 float get_current_channel_vu_rear_right( std::int32_t channel )
const;
714 std::int32_t get_num_subsongs()
const;
720 std::int32_t get_num_channels()
const;
725 std::int32_t get_num_orders()
const;
730 std::int32_t get_num_patterns()
const;
735 std::int32_t get_num_instruments()
const;
740 std::int32_t get_num_samples()
const;
747 std::vector<std::string> get_subsong_names()
const;
753 std::vector<std::string> get_channel_names()
const;
759 std::vector<std::string> get_order_names()
const;
765 std::vector<std::string> get_pattern_names()
const;
771 std::vector<std::string> get_instrument_names()
const;
777 std::vector<std::string> get_sample_names()
const;
784 std::int32_t get_order_pattern( std::int32_t order )
const;
791 std::int32_t get_pattern_num_rows( std::int32_t pattern )
const;
801 std::uint8_t get_pattern_row_channel_command( std::int32_t pattern, std::int32_t row, std::int32_t channel,
int command )
const;
812 std::string format_pattern_row_channel_command( std::int32_t pattern, std::int32_t row, std::int32_t channel,
int command )
const;
834 std::string highlight_pattern_row_channel_command( std::int32_t pattern, std::int32_t row, std::int32_t channel,
int command )
const;
846 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;
857 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;
879 std::vector<std::string> get_ctls()
const;
887 std::string ctl_get(
const std::string & ctl )
const;
894 void ctl_set(
const std::string & ctl,
const std::string & value );
906 #endif // LIBOPENMPT_HPP #define LIBOPENMPT_DEPRECATED
Definition: libopenmpt_config.h:120
command_index
Parameter index to use with openmpt::module::get_pattern_row_channel_command, openmpt::module::format...
Definition: libopenmpt.hpp:297
static const char library_version LIBOPENMPT_ATTR_DEPRECATED[]
Return a verbose library version string from openmpt::string::get().
Definition: libopenmpt.hpp:177
LIBOPENMPT_CXX_API double could_open_propability(std::istream &stream, double effort=1.0, std::ostream &log=std::clog)
Roughly scan the input stream to find out whether libopenmpt might be able to open it...
Definition: libopenmpt.hpp:151
LIBOPENMPT_CXX_API std::uint32_t get_core_version()
Get the core version number.
Definition: libopenmpt.hpp:149
LIBOPENMPT_CXX_API std::uint32_t get_library_version()
Get the libopenmpt version number.
LIBOPENMPT_CXX_API bool is_extension_supported(const std::string &extension)
Query whether a file extension is supported.
render_param
Parameter index to use with openmpt::module::get_render_param and openmpt::module::set_render_param.
Definition: libopenmpt.hpp:257
Definition: libopenmpt_ext.hpp:59
Definition: libopenmpt.hpp:250
LIBOPENMPT_CXX_API std::vector< std::string > get_supported_extensions()
Get a list of supported file extensions.