libopenmpt.hpp
Go to the documentation of this file.
/*
* libopenmpt.hpp
* --------------
* Purpose: libopenmpt public c++ interface
* Notes : (currently none)
* Authors: OpenMPT Devs
* The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
*/
#ifndef LIBOPENMPT_HPP
#define LIBOPENMPT_HPP
#include "libopenmpt_config.h"
#include <exception>
#include <iosfwd>
#include <iostream>
#include <map>
#include <string>
#include <string_view>
#include <vector>
#include <cstddef>
#include <cstdint>
namespace openmpt {
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4275)
#endif
class LIBOPENMPT_CXX_API exception : public std::exception {
private:
char * text;
public:
exception( const std::string & text ) noexcept;
exception( const exception & other ) noexcept;
exception( exception && other ) noexcept;
exception & operator = ( const exception & other ) noexcept;
exception & operator = ( exception && other ) noexcept;
virtual ~exception() noexcept;
const char * what() const noexcept override;
}; // class exception
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
LIBOPENMPT_CXX_API std::uint32_t get_library_version();
LIBOPENMPT_CXX_API std::uint32_t get_core_version();
namespace string {
static const char library_version LIBOPENMPT_ATTR_DEPRECATED [] = "library_version";
static const char library_features LIBOPENMPT_ATTR_DEPRECATED [] = "library_features";
static const char core_version LIBOPENMPT_ATTR_DEPRECATED [] = "core_version";
static const char build LIBOPENMPT_ATTR_DEPRECATED [] = "build";
static const char credits LIBOPENMPT_ATTR_DEPRECATED [] = "credits";
static const char contact LIBOPENMPT_ATTR_DEPRECATED [] = "contact";
static const char license LIBOPENMPT_ATTR_DEPRECATED [] = "license";
LIBOPENMPT_CXX_API std::string get( const std::string & key );
} // namespace string
LIBOPENMPT_CXX_API std::vector<std::string> get_supported_extensions();
LIBOPENMPT_ATTR_DEPRECATED LIBOPENMPT_CXX_API bool is_extension_supported( const std::string & extension );
LIBOPENMPT_CXX_API bool is_extension_supported2( std::string_view extension );
LIBOPENMPT_CXX_API double could_open_probability( std::istream & stream, double effort = 1.0, std::ostream & log = std::clog );
LIBOPENMPT_ATTR_DEPRECATED LIBOPENMPT_CXX_API double could_open_propability( std::istream & stream, double effort = 1.0, std::ostream & log = std::clog );
LIBOPENMPT_CXX_API std::size_t probe_file_header_get_recommended_size();
static const std::uint64_t probe_file_header_flags_modules LIBOPENMPT_ATTR_DEPRECATED = 0x1ull;
static const std::uint64_t probe_file_header_flags_containers LIBOPENMPT_ATTR_DEPRECATED = 0x2ull;
static const std::uint64_t probe_file_header_flags_default LIBOPENMPT_ATTR_DEPRECATED = 0x1ull | 0x2ull;
static const std::uint64_t probe_file_header_flags_none LIBOPENMPT_ATTR_DEPRECATED = 0x0ull;
enum probe_file_header_flags : std::uint64_t {
probe_file_header_flags_modules2 = 0x1ull,
probe_file_header_flags_containers2 = 0x2ull,
probe_file_header_flags_default2 = probe_file_header_flags_modules2 | probe_file_header_flags_containers2,
probe_file_header_flags_none2 = 0x0ull
};
enum probe_file_header_result {
probe_file_header_result_success = 1,
probe_file_header_result_failure = 0,
probe_file_header_result_wantmoredata = -1
};
LIBOPENMPT_CXX_API int probe_file_header( std::uint64_t flags, const std::byte * data, std::size_t size, std::uint64_t filesize );
LIBOPENMPT_CXX_API int probe_file_header( std::uint64_t flags, const std::uint8_t * data, std::size_t size, std::uint64_t filesize );
LIBOPENMPT_CXX_API int probe_file_header( std::uint64_t flags, const std::byte * data, std::size_t size );
LIBOPENMPT_CXX_API int probe_file_header( std::uint64_t flags, const std::uint8_t * data, std::size_t size );
LIBOPENMPT_CXX_API int probe_file_header( std::uint64_t flags, std::istream & stream );
class module_impl;
class module_ext;
namespace detail {
typedef std::map< std::string, std::string > initial_ctls_map;
} // namespace detail
class LIBOPENMPT_CXX_API module {
friend class module_ext;
public:
enum render_param {
RENDER_MASTERGAIN_MILLIBEL = 1,
RENDER_STEREOSEPARATION_PERCENT = 2,
RENDER_INTERPOLATIONFILTER_LENGTH = 3,
RENDER_VOLUMERAMPING_STRENGTH = 4
};
enum command_index {
command_note = 0,
command_instrument = 1,
command_volumeffect = 2,
command_effect = 3,
command_volume = 4,
command_parameter = 5
};
private:
module_impl * impl;
private:
// non-copyable
module( const module & );
void operator = ( const module & );
private:
// for module_ext
module();
void set_impl( module_impl * i );
public:
module( std::istream & stream, std::ostream & log = std::clog, const std::map< std::string, std::string > & ctls = detail::initial_ctls_map() );
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();
public:
void select_subsong( std::int32_t subsong );
std::int32_t get_selected_subsong() const;
void set_repeat_count( std::int32_t repeat_count );
std::int32_t get_repeat_count() const;
double get_duration_seconds() const;
double set_position_seconds( double seconds );
double get_position_seconds() const;
double set_position_order_row( std::int32_t order, std::int32_t row );
std::int32_t get_render_param( int param ) const;
void set_render_param( int param, std::int32_t value );
std::size_t read( std::int32_t samplerate, std::size_t count, std::int16_t * mono );
std::size_t read( std::int32_t samplerate, std::size_t count, std::int16_t * left, std::int16_t * right );
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 );
std::size_t read( std::int32_t samplerate, std::size_t count, float * mono );
std::size_t read( std::int32_t samplerate, std::size_t count, float * left, float * right );
std::size_t read( std::int32_t samplerate, std::size_t count, float * left, float * right, float * rear_left, float * rear_right );
std::size_t read_interleaved_stereo( std::int32_t samplerate, std::size_t count, std::int16_t * interleaved_stereo );
std::size_t read_interleaved_quad( std::int32_t samplerate, std::size_t count, std::int16_t * interleaved_quad );
std::size_t read_interleaved_stereo( std::int32_t samplerate, std::size_t count, float * interleaved_stereo );
std::size_t read_interleaved_quad( std::int32_t samplerate, std::size_t count, float * interleaved_quad );
std::vector<std::string> get_metadata_keys() const;
std::string get_metadata( const std::string & key ) const;
double get_current_estimated_bpm() const;
std::int32_t get_current_speed() const;
std::int32_t get_current_tempo() const;
std::int32_t get_current_order() const;
std::int32_t get_current_pattern() const;
std::int32_t get_current_row() const;
std::int32_t get_current_playing_channels() const;
float get_current_channel_vu_mono( std::int32_t channel ) const;
float get_current_channel_vu_left( std::int32_t channel ) const;
float get_current_channel_vu_right( std::int32_t channel ) const;
float get_current_channel_vu_rear_left( std::int32_t channel ) const;
float get_current_channel_vu_rear_right( std::int32_t channel ) const;
std::int32_t get_num_subsongs() const;
std::int32_t get_num_channels() const;
std::int32_t get_num_orders() const;
std::int32_t get_num_patterns() const;
std::int32_t get_num_instruments() const;
std::int32_t get_num_samples() const;
std::vector<std::string> get_subsong_names() const;
std::vector<std::string> get_channel_names() const;
std::vector<std::string> get_order_names() const;
std::vector<std::string> get_pattern_names() const;
std::vector<std::string> get_instrument_names() const;
std::vector<std::string> get_sample_names() const;
std::int32_t get_order_pattern( std::int32_t order ) const;
std::int32_t get_pattern_num_rows( std::int32_t pattern ) const;
std::uint8_t get_pattern_row_channel_command( std::int32_t pattern, std::int32_t row, std::int32_t channel, int command ) const;
std::string format_pattern_row_channel_command( std::int32_t pattern, std::int32_t row, std::int32_t channel, int command ) const;
std::string highlight_pattern_row_channel_command( std::int32_t pattern, std::int32_t row, std::int32_t channel, int command ) const;
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;
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;
std::vector<std::string> get_ctls() const;
LIBOPENMPT_ATTR_DEPRECATED std::string ctl_get( const std::string & ctl ) const;
bool ctl_get_boolean( std::string_view ctl ) const;
std::int64_t ctl_get_integer( std::string_view ctl ) const;
double ctl_get_floatingpoint( std::string_view ctl ) const;
std::string ctl_get_text( std::string_view ctl ) const;
LIBOPENMPT_ATTR_DEPRECATED void ctl_set( const std::string & ctl, const std::string & value );
void ctl_set_boolean( std::string_view ctl, bool value );
void ctl_set_integer( std::string_view ctl, std::int64_t value );
void ctl_set_floatingpoint( std::string_view ctl, double value );
void ctl_set_text( std::string_view ctl, std::string_view value );
// remember to add new functions to both C and C++ interfaces and to increase OPENMPT_API_VERSION_MINOR
}; // class module
} // namespace openmpt
#endif // LIBOPENMPT_HPP
openmpt::exception
libopenmpt exception base class
Definition: libopenmpt.hpp:145
openmpt::exception::exception
exception(exception &&other) noexcept
openmpt::exception::exception
exception(const std::string &text) noexcept
openmpt::exception::exception
exception(const exception &other) noexcept
openmpt::exception::~exception
virtual ~exception() noexcept
openmpt::module_ext
Definition: libopenmpt_ext.hpp:37
openmpt::module
Definition: libopenmpt.hpp:397
openmpt::module::set_repeat_count
void set_repeat_count(std::int32_t repeat_count)
Set Repeat Count.
openmpt::module::get_subsong_names
std::vector< std::string > get_subsong_names() const
Get a list of sub-song names.
openmpt::module::get_current_row
std::int32_t get_current_row() const
Get the current row.
openmpt::module::format_pattern_row_channel
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.
openmpt::module::set_position_seconds
double set_position_seconds(double seconds)
Set approximate current song position.
openmpt::module::get_repeat_count
std::int32_t get_repeat_count() const
Get Repeat Count.
openmpt::module::get_position_seconds
double get_position_seconds() const
Get current song position.
openmpt::module::format_pattern_row_channel_command
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.
openmpt::module::ctl_set_floatingpoint
void ctl_set_floatingpoint(std::string_view ctl, double value)
Set ctl floatingpoint value.
openmpt::module::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())
openmpt::module::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())
openmpt::module::read
std::size_t read(std::int32_t samplerate, std::size_t count, std::int16_t *left, std::int16_t *right)
Render audio data.
openmpt::module::~module
virtual ~module()
openmpt::module::read
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.
openmpt::module::read
std::size_t read(std::int32_t samplerate, std::size_t count, std::int16_t *mono)
Render audio data.
openmpt::module::highlight_pattern_row_channel_command
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.
openmpt::module::get_current_speed
std::int32_t get_current_speed() const
Get the current speed.
openmpt::module::get_current_channel_vu_rear_left
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.
openmpt::module::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())
openmpt::module::get_pattern_names
std::vector< std::string > get_pattern_names() const
Get a list of pattern names.
openmpt::module::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())
openmpt::module::read_interleaved_quad
std::size_t read_interleaved_quad(std::int32_t samplerate, std::size_t count, float *interleaved_quad)
Render audio data.
openmpt::module::ctl_set_integer
void ctl_set_integer(std::string_view ctl, std::int64_t value)
Set ctl integer value.
openmpt::module::get_order_names
std::vector< std::string > get_order_names() const
Get a list of order names.
openmpt::module::read_interleaved_stereo
std::size_t read_interleaved_stereo(std::int32_t samplerate, std::size_t count, float *interleaved_stereo)
Render audio data.
openmpt::module::get_num_subsongs
std::int32_t get_num_subsongs() const
Get the number of sub-songs.
openmpt::module::get_current_estimated_bpm
double get_current_estimated_bpm() const
Get the current estimated beats per minute (BPM).
openmpt::module::get_num_orders
std::int32_t get_num_orders() const
Get the number of orders.
openmpt::module::get_num_samples
std::int32_t get_num_samples() const
Get the number of samples.
openmpt::module::module
module(const std::vector< char > &data, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map())
openmpt::module::get_current_channel_vu_rear_right
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.
openmpt::module::read
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.
openmpt::module::get_current_playing_channels
std::int32_t get_current_playing_channels() const
Get the current amount of playing channels.
openmpt::module::get_current_order
std::int32_t get_current_order() const
Get the current order.
openmpt::module::get_current_channel_vu_mono
float get_current_channel_vu_mono(std::int32_t channel) const
Get an approximate indication of the channel volume.
openmpt::module::get_current_channel_vu_right
float get_current_channel_vu_right(std::int32_t channel) const
Get an approximate indication of the channel volume on the front-right speaker.
openmpt::module::get_current_pattern
std::int32_t get_current_pattern() const
Get the current pattern.
openmpt::module::get_current_channel_vu_left
float get_current_channel_vu_left(std::int32_t channel) const
Get an approximate indication of the channel volume on the front-left speaker.
openmpt::module::get_order_pattern
std::int32_t get_order_pattern(std::int32_t order) const
Get pattern at order position.
openmpt::module::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.
openmpt::module::get_selected_subsong
std::int32_t get_selected_subsong() const
Get currently selected sub-song from a multi-song module.
openmpt::module::read
std::size_t read(std::int32_t samplerate, std::size_t count, float *mono)
Render audio data.
openmpt::module::get_pattern_num_rows
std::int32_t get_pattern_num_rows(std::int32_t pattern) const
Get the number of rows in a pattern.
openmpt::module::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())
openmpt::module::get_num_instruments
std::int32_t get_num_instruments() const
Get the number of instruments.
openmpt::module::set_render_param
void set_render_param(int param, std::int32_t value)
Set render parameter.
openmpt::module::get_num_patterns
std::int32_t get_num_patterns() const
Get the number of patterns.
openmpt::module::ctl_get
LIBOPENMPT_ATTR_DEPRECATED std::string ctl_get(const std::string &ctl) const
Get current ctl value.
openmpt::module::render_param
render_param
Parameter index to use with openmpt::module::get_render_param and openmpt::module::set_render_param.
Definition: libopenmpt.hpp:404
openmpt::module::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())
openmpt::module::ctl_get_floatingpoint
double ctl_get_floatingpoint(std::string_view ctl) const
Get current ctl floatingpoint value.
openmpt::module::get_num_channels
std::int32_t get_num_channels() const
Get the number of pattern channels.
openmpt::module::read_interleaved_quad
std::size_t read_interleaved_quad(std::int32_t samplerate, std::size_t count, std::int16_t *interleaved_quad)
Render audio data.
openmpt::module::command_index
command_index
Parameter index to use with openmpt::module::get_pattern_row_channel_command, openmpt::module::format...
Definition: libopenmpt.hpp:444
openmpt::module::ctl_set_boolean
void ctl_set_boolean(std::string_view ctl, bool value)
Set ctl boolean value.
openmpt::module::read
std::size_t read(std::int32_t samplerate, std::size_t count, float *left, float *right)
Render audio data.
openmpt::module::get_pattern_row_channel_command
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.
openmpt::module::get_duration_seconds
double get_duration_seconds() const
Get approximate song duration.
openmpt::module::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())
openmpt::module::ctl_get_text
std::string ctl_get_text(std::string_view ctl) const
Get current ctl text value.
openmpt::module::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())
openmpt::module::get_current_tempo
std::int32_t get_current_tempo() const
Get the current tempo.
openmpt::module::read_interleaved_stereo
std::size_t read_interleaved_stereo(std::int32_t samplerate, std::size_t count, std::int16_t *interleaved_stereo)
Render audio data.
openmpt::module::get_sample_names
std::vector< std::string > get_sample_names() const
Get a list of sample names.
openmpt::module::ctl_get_boolean
bool ctl_get_boolean(std::string_view ctl) const
Get current ctl boolean value.
openmpt::module::get_metadata_keys
std::vector< std::string > get_metadata_keys() const
Get the list of supported metadata item keys.
openmpt::module::set_position_order_row
double set_position_order_row(std::int32_t order, std::int32_t row)
Set approximate current song position.
openmpt::module::get_render_param
std::int32_t get_render_param(int param) const
Get render parameter.
openmpt::module::get_instrument_names
std::vector< std::string > get_instrument_names() const
Get a list of instrument names.
openmpt::module::get_ctls
std::vector< std::string > get_ctls() const
Retrieve supported ctl keys.
openmpt::module::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())
openmpt::module::get_channel_names
std::vector< std::string > get_channel_names() const
Get a list of channel names.
openmpt::module::get_metadata
std::string get_metadata(const std::string &key) const
Get a metadata item value.
openmpt::module::ctl_set_text
void ctl_set_text(std::string_view ctl, std::string_view value)
Set ctl text value.
openmpt::module::ctl_set
LIBOPENMPT_ATTR_DEPRECATED void ctl_set(const std::string &ctl, const std::string &value)
Set ctl value.
openmpt::module::select_subsong
void select_subsong(std::int32_t subsong)
Select a sub-song from a multi-song module.
openmpt::module::highlight_pattern_row_channel
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.
openmpt::module::ctl_get_integer
std::int64_t ctl_get_integer(std::string_view ctl) const
Get current ctl integer value.
libopenmpt_config.h
openmpt::string::get
LIBOPENMPT_CXX_API std::string get(const std::string &key)
Get library related metadata.
openmpt
Definition: libopenmpt.hpp:134
openmpt::probe_file_header_flags
probe_file_header_flags
Possible values for openmpt::probe_file_header() flags parameter.
Definition: libopenmpt.hpp:288
openmpt::probe_file_header_flags_none2
@ probe_file_header_flags_none2
Probe for no formats in openmpt::probe_file_header().
Definition: libopenmpt.hpp:296
openmpt::probe_file_header_flags_default2
@ probe_file_header_flags_default2
Probe for the default set of formats in openmpt::probe_file_header().
Definition: libopenmpt.hpp:294
openmpt::probe_file_header_flags_containers2
@ probe_file_header_flags_containers2
Probe for module-specific container formats in openmpt::probe_file_header().
Definition: libopenmpt.hpp:292
openmpt::probe_file_header_flags_modules2
@ probe_file_header_flags_modules2
Probe for module formats in openmpt::probe_file_header().
Definition: libopenmpt.hpp:290
openmpt::is_extension_supported2
LIBOPENMPT_CXX_API bool is_extension_supported2(std::string_view extension)
Query whether a file extension is supported.
openmpt::probe_file_header_result
probe_file_header_result
Possible return values for openmpt::probe_file_header().
Definition: libopenmpt.hpp:300
openmpt::probe_file_header_result_success
@ probe_file_header_result_success
Definition: libopenmpt.hpp:301
openmpt::probe_file_header_result_failure
@ probe_file_header_result_failure
Definition: libopenmpt.hpp:302
openmpt::probe_file_header_result_wantmoredata
@ probe_file_header_result_wantmoredata
Definition: libopenmpt.hpp:303
openmpt::is_extension_supported
LIBOPENMPT_ATTR_DEPRECATED LIBOPENMPT_CXX_API bool is_extension_supported(const std::string &extension)
Query whether a file extension is supported.
openmpt::LIBOPENMPT_ATTR_DEPRECATED
static const std::uint64_t probe_file_header_flags_modules LIBOPENMPT_ATTR_DEPRECATED
Probe for module formats in openmpt::probe_file_header().
Definition: libopenmpt.hpp:276
openmpt::could_open_probability
LIBOPENMPT_CXX_API double could_open_probability(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.
openmpt::get_supported_extensions
LIBOPENMPT_CXX_API std::vector< std::string > get_supported_extensions()
Get a list of supported file extensions.
openmpt::could_open_propability
LIBOPENMPT_ATTR_DEPRECATED 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.
openmpt::get_core_version
LIBOPENMPT_CXX_API std::uint32_t get_core_version()
Get the core version number.
openmpt::probe_file_header
LIBOPENMPT_CXX_API int probe_file_header(std::uint64_t flags, const std::byte *data, std::size_t size, std::uint64_t filesize)
Probe the provided bytes from the beginning of a file for supported file format headers to find out w...
openmpt::get_library_version
LIBOPENMPT_CXX_API std::uint32_t get_library_version()
Get the libopenmpt version number.
openmpt::probe_file_header_get_recommended_size
LIBOPENMPT_CXX_API std::size_t probe_file_header_get_recommended_size()
Get recommended header size for successfull format probing.