libopenmpt  0.2.4943
cross-platform C++ and C library to decode tracked music files
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openmpt Namespace Reference

Namespaces

namespace  ext
namespace  string

Classes

class  exception
class  module
class  module_ext

Functions

std::uint32_t get_library_version ()
 Get the libopenmpt version number.
std::uint32_t get_core_version ()
 Get the core version number.
std::vector< std::string > get_supported_extensions ()
 Get a list of supported file extensions.
bool is_extension_supported (const std::string &extension)
 Query whether a file extension is supported.
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.

Function Documentation

double openmpt::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.

Parameters
streamInput stream to scan.
effortEffort to make when validating stream. Effort 0.0 does not even look at stream at all and effort 1.0 completely loads the file from stream. A lower effort requires less data to be loaded but only gives a rough estimate answer.
logLog where warning and errors are written.
Returns
Probability between 0.0 and 1.0.
std::uint32_t openmpt::get_core_version ( )

Get the core version number.

Return the OpenMPT core version number.

Returns
The value represents (majormajor << 24 + major << 16 + minor << 8 + minorminor).
std::uint32_t openmpt::get_library_version ( )

Get the libopenmpt version number.

Returns the libopenmpt version number.

Returns
The value represents (major << 24 + minor << 16 + revision).
std::vector<std::string> openmpt::get_supported_extensions ( )

Get a list of supported file extensions.

Returns
The list of extensions supported by this libopenmpt build. The extensions are returned lower-case without a leading dot.
bool openmpt::is_extension_supported ( const std::string &  extension)

Query whether a file extension is supported.

Parameters
extensionfile extension to query without a leading dot. The case is ignored.
Returns
true if the extension is supported by libopenmpt, false otherwise.