10 #ifndef LIBOPENMPT_EXT_HPP
11 #define LIBOPENMPT_EXT_HPP
16 #if !defined(LIBOPENMPT_EXT_IS_EXPERIMENTAL)
18 #error "libopenmpt_ext is still completely experimental. The ABIs and APIs WILL change. Use at your own risk, and use only internally for now. You have to #define LIBOPENMPT_EXT_IS_EXPERIMENTAL to use it."
20 #else // LIBOPENMPT_EXT_IS_EXPERIMENTAL
57 class module_ext_impl;
62 module_ext_impl * ext_impl;
68 module_ext( std::istream & stream, std::ostream & log = std::clog,
const std::map< std::string, std::string > & ctls = detail::initial_ctls_map() );
69 module_ext(
const std::vector<char> & data, std::ostream & log = std::clog,
const std::map< std::string, std::string > & ctls = detail::initial_ctls_map() );
70 module_ext(
const char * data, std::size_t size, std::ostream & log = std::clog,
const std::map< std::string, std::string > & ctls = detail::initial_ctls_map() );
71 module_ext(
const void * data, std::size_t size, std::ostream & log = std::clog,
const std::map< std::string, std::string > & ctls = detail::initial_ctls_map() );
86 void * get_interface(
const std::string & interface_id );
92 #define LIBOPENMPT_DECLARE_EXT_INTERFACE(name) \
93 static const char name ## _id [] = # name ; \
97 #define LIBOPENMPT_EXT_INTERFACE(name) \
100 virtual ~ name() {} \
105 #define LIBOPENMPT_EXT_INTERFACE_PATTERN_VIS
133 virtual effect_type get_pattern_row_channel_volume_effect_type( std::int32_t pattern, std::int32_t row, std::int32_t channel )
const = 0;
143 virtual effect_type get_pattern_row_channel_effect_type( std::int32_t pattern, std::int32_t row, std::int32_t channel )
const = 0;
148 #define LIBOPENMPT_EXT_INTERFACE_INTERACTIVE
163 virtual
void set_current_speed(
std::int32_t speed ) = 0;
172 virtual
void set_current_tempo(
std::int32_t tempo ) = 0;
181 virtual
void set_tempo_factor(
double factor ) = 0;
188 virtual
double get_tempo_factor( ) const = 0;
198 virtual
void set_pitch_factor(
double factor ) = 0;
205 virtual
double get_pitch_factor( ) const = 0;
214 virtual
void set_global_volume(
double volume ) = 0;
221 virtual
double get_global_volume( ) const = 0;
231 virtual
void set_channel_volume(
std::int32_t channel,
double volume ) = 0;
240 virtual
double get_channel_volume(
std::int32_t channel ) const = 0;
249 virtual
void set_channel_mute_status(
std::int32_t channel,
bool mute ) = 0;
258 virtual
bool get_channel_mute_status(
std::int32_t channel ) const = 0;
267 virtual
void set_instrument_mute_status(
std::int32_t instrument,
bool mute ) = 0;
276 virtual
bool get_instrument_mute_status(
std::int32_t instrument ) const = 0;
288 virtual
std::int32_t play_note(
std::int32_t instrument,
std::int32_t note,
double volume,
double panning ) = 0;
296 virtual
void stop_note(
std::int32_t channel ) = 0;
305 #undef LIBOPENMPT_DECLARE_EXT_INTERFACE
306 #undef LIBOPENMPT_EXT_INTERFACE
316 #endif // LIBOPENMPT_EXT_IS_EXPERIMENTAL
318 #endif // LIBOPENMPT_EXT_HPP
#define LIBOPENMPT_DECLARE_EXT_INTERFACE(name)
Definition: libopenmpt_ext.hpp:92
Definition: libopenmpt_ext.hpp:109
#define LIBOPENMPT_EXT_INTERFACE(name)
Definition: libopenmpt_ext.hpp:97
Definition: libopenmpt_ext.hpp:152
Definition: libopenmpt.hpp:142
effect_type
Pattern command type.
Definition: libopenmpt_ext.hpp:114
Definition: libopenmpt_ext.hpp:59
Definition: libopenmpt.hpp:243