From 33cd11ae3e0ec69581ac2961e5777034228002d6 Mon Sep 17 00:00:00 2001 From: Steffen Ohrendorf Date: Fri, 24 Jun 2011 13:15:31 +0200 Subject: [PATCH] updated docs and removed some throw restrictions --- src/ppg/ppgexcept.cpp | 15 ++++++++ src/ppg/ppgexcept.h | 16 ++++++--- src/ppg/screen.cpp | 74 +++++++++++++++++++++++++++++++++------ src/ppg/screen.h | 18 +++++----- src/s3mmod/s3mcell.h | 2 ++ src/s3mmod/s3mchannel.cpp | 62 ++++++++++++++++++++------------ src/s3mmod/s3mchannel.h | 11 ++++-- src/s3mmod/s3mmodule.cpp | 2 +- src/s3mmod/s3mmodule.h | 7 ++-- src/stuff/utils.h | 8 ++--- src/ui_main.cpp | 2 +- src/ui_main.h | 2 +- src/xmmod/xmchannel.cpp | 4 +++ src/xmmod/xmmodule.h | 8 ++++- 14 files changed, 171 insertions(+), 60 deletions(-) diff --git a/src/ppg/ppgexcept.cpp b/src/ppg/ppgexcept.cpp index 09d2b5b..f8280fa 100644 --- a/src/ppg/ppgexcept.cpp +++ b/src/ppg/ppgexcept.cpp @@ -20,8 +20,19 @@ #include #include +/** + * @ingroup Ppg + * @{ + */ + namespace ppg { + /** + * @brief Build a string representing a source file position + * @param[in] lineno Line number + * @param[in] function Function name + * @return String in the form of "{lineno}:{function}" + */ static std::string makePos( int lineno, const char function[] ) { std::ostringstream out; out << std::dec << lineno << ":" << function; @@ -51,3 +62,7 @@ namespace ppg { } } // namespace ppg + +/** + * @} + */ \ No newline at end of file diff --git a/src/ppg/ppgexcept.h b/src/ppg/ppgexcept.h index fa8953f..8904626 100644 --- a/src/ppg/ppgexcept.h +++ b/src/ppg/ppgexcept.h @@ -24,10 +24,14 @@ #include #include +/** + * @ingroup Ppg + * @{ + */ + namespace ppg { /** * @class Exception - * @ingroup Ppg * @brief A simple tracing exception for PeePeeGUI */ class Exception : public std::exception { @@ -42,7 +46,6 @@ namespace ppg { /** * @brief Constructor with additional information * @param[in] msg Initial Message - * @param[in] file File name (use @c __BASE_FILE__ or @c __FILE__ here) * @param[in] lineno Line number (use @c __LINE__ here) * @param[in] function Function (use @c __PRETTY_FUNCTION__ or @c __FUNCTION__ here) */ @@ -50,7 +53,6 @@ namespace ppg { /** * @brief Constructor with additional information for Re-Throws * @param[in] previous Previous PppException - * @param[in] file File name (use @c __BASE_FILE__ or @c __FILE__ here) * @param[in] lineno Line number (use @c __LINE__ here) * @param[in] function Function (use @c __PRETTY_FUNCTION__ or @c __FUNCTION__ here) * @see PPG_RETHROW @@ -65,7 +67,7 @@ namespace ppg { virtual ~Exception() throw(); /** * @brief Get the exception message - * @return Message + * @return m_msg */ virtual const char* what() const throw(); }; @@ -74,7 +76,6 @@ namespace ppg { /** * @brief Catch PeePeeGUI exceptions - * @ingroup Ppg * @details * Catches general exceptions and throws a ppg::Exception for tracing the exception */ @@ -107,4 +108,9 @@ namespace ppg { } // namespace ppg +/** + * @} + */ + + #endif diff --git a/src/ppg/screen.cpp b/src/ppg/screen.cpp index 9895932..4a23894 100644 --- a/src/ppg/screen.cpp +++ b/src/ppg/screen.cpp @@ -24,24 +24,74 @@ #include #include +/** + * @ingroup Ppg + * @{ + */ + namespace ppg { + /** + * @name Internal data and functions + * @{ + * @details + * The g_ABC and g_currentABC arrays are compared everytime the screen needs to be redrawn.@n + * If at least one of the foreground colors, background colors or characters differ, it is redrawn, + * otherwise it is skipped. See ppg::Screen::drawThis().@n + * This reduces the graphical overhead significantly. + */ + /** + * @brief Maps DOS color values to their on-screen representation + * @see ppg::Color + */ static Uint32 g_dosColors[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + /** + * @brief Contains the chars to be displayed + * @see g_currentChars + */ static char* g_chars = NULL; + /** + * @brief Contains the chars currently visible to determine what needs to be drawn + * @see g_chars + */ static char* g_currentChars = NULL; + /** + * @brief Contains the foreground colors to be displayed + */ static Color* g_colorsF = NULL; + /** + * @brief Contains the foreground colors currently visible to determine what needs to be drawn + */ static Color* g_currentColorsF = NULL; + /** + * @brief Contains the background colors to be displayed + */ static Color* g_colorsB = NULL; + /** + * @brief Contains the background colors currently visible to determine what needs to be drawn + */ static Color* g_currentColorsB = NULL; + /** + * @brief The current SDL screen surface instance + */ static SDL_Surface* g_screenSurface = NULL; - static inline void g_drawPixel( int x, int y, Uint32 color ) throw() { + /** + * @brief Draw a pixel + * @param[in] x X position + * @param[in] y Y position + * @param[in] color %Screen color value + */ + static inline void g_drawPixel( int x, int y, Uint32 color ) { if( ( x < 0 ) || ( y < 0 ) || ( y >= g_screenSurface->h ) || ( x >= g_screenSurface->w ) ) return; reinterpret_cast( g_screenSurface->pixels )[( ( y * g_screenSurface->pitch ) >> 2 ) + x] = color; } + /** + * @} + */ - Screen::Screen( int w, int h, const std::string& title ) throw( Exception ) : Widget( NULL ), m_cursorX( 0 ), m_cursorY( 0 ) { + Screen::Screen( int w, int h, const std::string& title ) : Widget( NULL ), m_cursorX( 0 ), m_cursorY( 0 ) { PPG_TEST( g_screenSurface != NULL ); if( !SDL_WasInit( SDL_INIT_VIDEO ) ) { if( SDL_Init( SDL_INIT_VIDEO ) == -1 ) { @@ -102,7 +152,7 @@ namespace ppg { SDL_ShowCursor( 0 ); } - Screen::~Screen() throw() { + Screen::~Screen() { delete[] g_chars; g_chars = NULL; delete[] g_currentChars; @@ -119,7 +169,7 @@ namespace ppg { #include "pfonts.inc" - void Screen::drawChar8( int x, int y, uint8_t c, uint32_t foreground, uint32_t background, bool opaque ) throw() { + void Screen::drawChar8( int x, int y, uint8_t c, uint32_t foreground, uint32_t background, bool opaque ) { x <<= 3; y <<= 3; for( unsigned char py = 0; py < 8; py++ ) { @@ -132,7 +182,7 @@ namespace ppg { } } - void Screen::drawChar16( int x, int y, uint8_t c, uint32_t foreground, uint32_t background, bool opaque ) throw() { + void Screen::drawChar16( int x, int y, uint8_t c, uint32_t foreground, uint32_t background, bool opaque ) { x <<= 3; y <<= 4; for( unsigned char py = 0; py < 16; py++ ) { @@ -145,14 +195,14 @@ namespace ppg { } } - void Screen::clear( uint8_t c, Color foreground, Color background ) throw() { + void Screen::clear( uint8_t c, Color foreground, Color background ) { std::size_t size = area().width() * area().height(); std::fill_n( g_chars, size, c ); std::fill_n( g_colorsF, size, foreground ); std::fill_n( g_colorsB, size, background ); } - void Screen::drawThis() throw( Exception ) { + void Screen::drawThis() { if( SDL_MUSTLOCK( g_screenSurface ) ) { if( SDL_LockSurface( g_screenSurface ) < 0 ) return; @@ -187,7 +237,7 @@ namespace ppg { PPG_THROW( "Flip failed" ); } - void Screen::drawChar( int x, int y, char c ) throw() { + void Screen::drawChar( int x, int y, char c ) { if( !area().contains( x, y ) ) { LOG_ERROR( "Out of range: %d,%d", x, y ); return; @@ -195,13 +245,13 @@ namespace ppg { g_chars[x + y * area().width()] = c; } - void Screen::setFgColorAt( int x, int y, Color c ) throw() { + void Screen::setFgColorAt( int x, int y, Color c ) { if( !area().contains( x, y ) ) return; g_colorsF[x + y * area().width()] = c; } - void Screen::setBgColorAt( int x, int y, Color c ) throw() { + void Screen::setBgColorAt( int x, int y, Color c ) { if( !area().contains( x, y ) ) return; g_colorsB[x + y * area().width()] = c; @@ -215,3 +265,7 @@ namespace ppg { } } // namespace ppg + +/** + * @} + */ diff --git a/src/ppg/screen.h b/src/ppg/screen.h index 306fd98..2dffea8 100644 --- a/src/ppg/screen.h +++ b/src/ppg/screen.h @@ -39,13 +39,13 @@ namespace ppg { * @param[in] background Background color * @param[in] opaque Set to @c false to draw a transparent char */ - void drawChar8( int x, int y, uint8_t c, uint32_t foreground, uint32_t background, bool opaque = true ) throw(); + void drawChar8( int x, int y, uint8_t c, uint32_t foreground, uint32_t background, bool opaque = true ); /** * @copydoc ppg::Screen::drawChar8 * @brief Draw an 8x16 char */ - void drawChar16( int x, int y, uint8_t c, uint32_t foreground, uint32_t background, bool opaque = true ) throw(); - virtual void drawThis() throw( Exception ); + void drawChar16( int x, int y, uint8_t c, uint32_t foreground, uint32_t background, bool opaque = true ); + virtual void drawThis(); int m_cursorX; //!< @brief Cursor X position int m_cursorY; //!< @brief Cursor Y position public: @@ -55,18 +55,18 @@ namespace ppg { * @param[in] h Height in characters * @param[in] title Title of the screen */ - Screen( int w, int h, const std::string& title ) throw( Exception ); - virtual ~Screen() throw(); + Screen( int w, int h, const std::string& title ); + virtual ~Screen(); /** * @brief Clear the screen * @param[in] c Character to overwrite the screen with * @param[in] foreground Foreground color * @param[in] background Background color */ - void clear( uint8_t c, Color foreground, Color background ) throw(); - virtual void drawChar( int x, int y, char c ) throw(); - virtual void setFgColorAt( int x, int y, Color c ) throw(); - virtual void setBgColorAt( int x, int y, Color c ) throw(); + void clear( uint8_t c, Color foreground, Color background ); + virtual void drawChar( int x, int y, char c ); + virtual void setFgColorAt( int x, int y, Color c ); + virtual void setBgColorAt( int x, int y, Color c ); virtual bool onMouseMove( int x, int y ); }; } // namespace ppg diff --git a/src/s3mmod/s3mcell.h b/src/s3mmod/s3mcell.h index e374fff..8dbe3b7 100644 --- a/src/s3mmod/s3mcell.h +++ b/src/s3mmod/s3mcell.h @@ -50,6 +50,8 @@ class S3mCell : public GenCell { /** * @brief Load this cell from a stream * @param[in,out] str Reference to the stream to load from + * @retval true on success + * @retval false if an error occured */ bool load(BinStream& str); virtual void clear(); diff --git a/src/s3mmod/s3mchannel.cpp b/src/s3mmod/s3mchannel.cpp index d1d521b..964b382 100644 --- a/src/s3mmod/s3mchannel.cpp +++ b/src/s3mmod/s3mchannel.cpp @@ -30,6 +30,9 @@ namespace ppp { namespace s3m { +/** + * @brief S3M sine wave lookup + */ static const std::array S3mWaveSine = { { 0, 24, 49, 74, 97, 120, 141, 161, @@ -42,6 +45,10 @@ static const std::array S3mWaveSine = { -180, -161, -141, -120, -97, -74, -49, -24 } }; + +/** + * @brief S3M ramp wave lookup + */ static const std::array S3mWaveRamp = { { 0, -0xF8, -0xF0, -0xE8, -0xE0, -0xD8, -0xD0, -0xC8, @@ -53,6 +60,10 @@ static const std::array S3mWaveRamp = { 0xC8, 0xD0, 0xD8, 0xE0, 0xE8, 0xF0, 0xF8 } }; + +/** + * @brief S3M square wave lookup + */ static const std::array S3mWaveSquare = { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, @@ -63,6 +74,10 @@ static const std::array S3mWaveSquare = { 0, 0, 0, 0, 0, 0 } }; + +/** + * @brief S3M finetunes lookup + */ static const std::array S3mFinetunes = { { 8363, 8413, 8463, 8529, 8581, 8651, 8723, 8757, @@ -71,17 +86,14 @@ static const std::array S3mFinetunes = { }; /** - * @ingroup S3mMod * @brief Note periodic table for frequency calculations */ static const std::array Periods = {{1712 << 4, 1616 << 4, 1524 << 4, 1440 << 4, 1356 << 4, 1280 << 4, 1208 << 4, 1140 << 4, 1076 << 4, 1016 << 4, 960 << 4, 907 << 4}}; /** * @brief Get the octave out of a note - * @ingroup S3mMod * @param[in] x Note value * @return Octave of @a x - * @note Time-critical */ static inline uint8_t S3M_OCTAVE(uint8_t x) { return highNibble(x); @@ -89,10 +101,8 @@ static inline uint8_t S3M_OCTAVE(uint8_t x) { /** * @brief Get the note out of a note - * @ingroup S3mMod * @param[in] x Note value * @return Note of @a x - * @note Time-critical */ static inline uint8_t S3M_NOTE(uint8_t x) { return lowNibble(x); @@ -100,21 +110,18 @@ static inline uint8_t S3M_NOTE(uint8_t x) { /** * @brief A value for frequency calculation - * @ingroup S3mMod */ static const uint32_t FRQ_VALUE = 14317056; /** * @brief Calculate the period for a given note, octave and base frequency - * @ingroup S3mMod - * @param[in] note Note value + * @param[in] note Note value (without octave) * @param[in] oct Note octave * @param[in] c4spd Base frequency of the sample - * @return S3M Period for note @a note and base frequency @a c4spd - * @see S3mSample st3Period + * @param[in] finetune Optional finetune + * @return S3M Period for note @a note, base frequency @a c4spd and finetune @a finetune */ -static inline uint16_t st3PeriodEx(uint8_t note, uint8_t oct, uint16_t c4spd, uint16_t finetune = 8363) throw(PppException) { - //PPP_TEST( c4spd == 0 ); +static inline uint16_t st3PeriodEx(uint8_t note, uint8_t oct, uint16_t c4spd, uint16_t finetune = 8363) { if(c4spd == 0) { c4spd = 8636; } @@ -122,21 +129,20 @@ static inline uint16_t st3PeriodEx(uint8_t note, uint8_t oct, uint16_t c4spd, ui } /** * @brief Calculate the period for a given note and base frequency - * @ingroup S3mMod - * @param[in] note Note value + * @param[in] note Note value (including octave) * @param[in] c4spd Base frequency of the sample - * @return S3M Period for note @a note and base frequency @a c4spd - * @see S3mSample st3PeriodEx + * @param[in] finetune Optional finetune + * @return S3M Period for note @a note, base frequency @a c4spd and finetune @a finetune */ -static inline uint16_t st3Period(uint8_t note, uint16_t c4spd, uint16_t finetune = 8363) throw(PppException) { +static inline uint16_t st3Period(uint8_t note, uint16_t c4spd, uint16_t finetune = 8363) { return st3PeriodEx(S3M_NOTE(note), S3M_OCTAVE(note), c4spd, finetune); } /** * @brief Reverse calculate a note from a given period and C4 frequency - * @ingroup S3mMod * @param[in] per Note period * @param[in] c4spd Base frequency of the sample + * @param[in] finetune Optional finetune * @return Note offset (12*octave+note) */ static inline uint8_t periodToNoteOffset(uint16_t per, uint16_t c4spd, uint16_t finetune = 8363) { @@ -145,14 +151,13 @@ static inline uint8_t periodToNoteOffset(uint16_t per, uint16_t c4spd, uint16_t /** * @brief Reverse-calculate the Note from the given period - * @ingroup S3mMod * @param[in] per Period * @param[in] c2spd Base frequency of the sample + * @param[in] finetune Optional finetune * @return Note string * @note Time-critical - * @todo OPTIMIZE!!! */ -static inline std::string periodToNote(uint16_t per, uint16_t c2spd, uint16_t finetune = 8363) throw() { +static inline std::string periodToNote(uint16_t per, uint16_t c2spd, uint16_t finetune = 8363) { if(per == 0) return "p??"; if(c2spd == 0) @@ -172,16 +177,21 @@ static inline std::string periodToNote(uint16_t per, uint16_t c2spd, uint16_t fi /** * @brief Add/subtract semitones to/from a note - * @ingroup S3mMod * @param[in] note Base note * @param[in] delta Delta value * @return New note */ -static inline uint8_t deltaNote(uint8_t note, int8_t delta) throw() { +static inline uint8_t deltaNote(uint8_t note, int8_t delta) { uint16_t x = S3M_OCTAVE(note) * 12 + S3M_NOTE(note) + delta; return ((x / 12) << 4) | (x % 12); } +/** + * @brief Clip a period if necessary + * @param[in] amiga Set to @c true to use amiga limits + * @param[in] period The period to clip + * @return Clipped period + */ static uint16_t clipPeriod(bool amiga, uint16_t period) { if(amiga) { return clip(period, 0x15c, 0xd60); @@ -738,6 +748,12 @@ void S3mChannel::fxPorta(uint8_t fxByte, bool noReuse) { } } +/** + * @brief Look up a wave value + * @param[in] waveform Waveform selector + * @param[in] phase Wave phase + * @return Lookup value + */ static int16_t waveValue(uint8_t waveform, uint8_t phase) { switch(waveform & 7) { case 1: diff --git a/src/s3mmod/s3mchannel.h b/src/s3mmod/s3mchannel.h index c2811c2..834b5a6 100644 --- a/src/s3mmod/s3mchannel.h +++ b/src/s3mmod/s3mchannel.h @@ -123,10 +123,7 @@ class S3mChannel : public GenChannel { /** * @brief Update the channel * @param[in] cell Pointer to a note cell - * @param[in] tick Current tick * @param[in] patDelay For pattern delays - * @remarks A new value in the Instrument Column changes the instrument with the old playback position - * @note Time-critical */ void update(const S3mCell::Ptr cell, bool patDelay = false); virtual void mixTick(MixerFrameBuffer& mixBuffer); @@ -136,7 +133,15 @@ class S3mChannel : public GenChannel { virtual std::string cellString(); virtual std::string effectName() const; virtual std::string effectDescription() const; + /** + * @brief Recalculates the real output volume + */ void recalcVolume(); + /** + * @brief Set the panning with range check + * @param[in] pan Panning value + * @pre @a pan must be within 0..64 or equal to 0xa4 + */ void setPanning(uint8_t pan); }; } // namespace s3m diff --git a/src/s3mmod/s3mmodule.cpp b/src/s3mmod/s3mmodule.cpp index e57ece6..c1ddcbd 100644 --- a/src/s3mmod/s3mmodule.cpp +++ b/src/s3mmod/s3mmodule.cpp @@ -45,7 +45,7 @@ enum : uint8_t { typedef uint16_t ParaPointer; -inline int16_t s3mPostProcess(int32_t sample) throw() { +inline int16_t s3mPostProcess(int32_t sample) { return clip(sample >> 2, -32768, 32767); } diff --git a/src/s3mmod/s3mmodule.h b/src/s3mmod/s3mmodule.h index fa0fe33..cecc873 100644 --- a/src/s3mmod/s3mmodule.h +++ b/src/s3mmod/s3mmodule.h @@ -81,13 +81,15 @@ class S3mModule : public GenModule { * @brief Adjust the playback position * @param[in] increaseTick Whether to increase the tick value * @param[in] doStore Set this to @c true to store the current state, and to @c false to restore it on order change + * @retval false if the end of the current song is reached + * @retval true otherwise */ bool adjustPosition(bool increaseTick, bool doStore); protected: virtual IArchive& serialize(IArchive* data); public: /** - * @copydoc GenModule::GenModule + * @copydoc ppp::GenModule::GenModule(uint8_t) */ S3mModule(uint8_t maxRpt = 2); virtual ~S3mModule(); @@ -101,7 +103,8 @@ class S3mModule : public GenModule { /** * @brief Check if a sample exists * @param[in] idx Sample index to check - * @return @c true if the sample exists + * @retval true if the sample exists + * @retval false otherwise */ bool existsSample(int16_t idx); virtual uint16_t tickBufferLength() const; diff --git a/src/stuff/utils.h b/src/stuff/utils.h index a794d5b..01b12b0 100644 --- a/src/stuff/utils.h +++ b/src/stuff/utils.h @@ -39,7 +39,7 @@ namespace ppp { * @note Time-critical */ template -inline const T& clip(const T& v, const T& a, const T& b) throw() { +inline const T& clip(const T& v, const T& a, const T& b) { return std::min(b, std::max(v, a)); } @@ -53,7 +53,7 @@ inline const T& clip(const T& v, const T& a, const T& b) throw() { * @note Time-critical */ template -inline bool inRange(const T v, const T a, const T b) throw() { +inline bool inRange(const T v, const T a, const T b) { return (v >= a) && (v <= b); } @@ -81,7 +81,7 @@ std::string stringncpy(const char src[], std::size_t maxlen); * @return Low nibble of @a x * @note Time-critical */ -inline uint8_t lowNibble(uint8_t x) throw() { +inline uint8_t lowNibble(uint8_t x) { return x & 0x0f; } @@ -91,7 +91,7 @@ inline uint8_t lowNibble(uint8_t x) throw() { * @return High nibble of @a x * @note Time-critical */ -inline uint8_t highNibble(uint8_t x) throw() { +inline uint8_t highNibble(uint8_t x) { return x >> 4; } diff --git a/src/ui_main.cpp b/src/ui_main.cpp index ca29a2b..5311cd1 100644 --- a/src/ui_main.cpp +++ b/src/ui_main.cpp @@ -89,7 +89,7 @@ UIMain::UIMain( Widget* parent ): Widget( parent ), m_modTitle->show(); } -void UIMain::drawThis() throw(ppg::Exception) +void UIMain::drawThis() { } diff --git a/src/ui_main.h b/src/ui_main.h index 2ea5a28..76bc7b6 100644 --- a/src/ui_main.h +++ b/src/ui_main.h @@ -37,7 +37,7 @@ class UIMain : public ppg::Widget { std::array m_chanCells; ppg::Label* m_trackerInfo; ppg::Label* m_modTitle; - virtual void drawThis() throw( ppg::Exception ); + virtual void drawThis(); public: UIMain( Widget* parent ); ppg::Label* posLabel(); diff --git a/src/xmmod/xmchannel.cpp b/src/xmmod/xmchannel.cpp index 203fd91..7294f3d 100644 --- a/src/xmmod/xmchannel.cpp +++ b/src/xmmod/xmchannel.cpp @@ -193,6 +193,7 @@ void XmChannel::doKeyOn() { setActive(true); } +#ifndef DOXYGEN_SHOULD_SKIP_THIS static const std::array g_AutoVibTable = {{ 0, -2, -3, -5, -6, -8, -9, -11, -12, -14, -16, -17, -19, -20, -22, -23, -24, -26, -27, -29, -30, -32, @@ -220,6 +221,7 @@ static const std::array g_AutoVibTable = {{ 5, 3, 2 } }; +#endif void XmChannel::update(const ppp::xm::XmCell::Ptr& cell) { if(m_module->playbackInfo().tick == 0) { @@ -955,12 +957,14 @@ void XmChannel::fxVibrato(uint8_t fxByte) { doVibrato(); } +#ifndef DOXYGEN_SHOULD_SKIP_THIS static const std::array g_VibTable = {{ 0, 24, 49, 74, 97, 120, 141, 161, 180, 197, 212, 224, 235, 244, 250, 253, 255, 253, 250, 244, 235, 224, 212, 197, 180, 161, 141, 120, 97, 74, 49, 24 } }; +#endif void XmChannel::doVibrato() { uint8_t value = (m_vibratoPhase >> 2) & 0x1f; diff --git a/src/xmmod/xmmodule.h b/src/xmmod/xmmodule.h index 982d0b1..76b1410 100644 --- a/src/xmmod/xmmodule.h +++ b/src/xmmod/xmmodule.h @@ -89,7 +89,13 @@ class XmModule : public GenModule { * @param[in] maxRpt maximum repeat count per order */ XmModule(uint8_t maxRpt); - virtual bool load(const std::string& filename); + /** + * @brief Try to load a XM module + * @param[in] filename Filename of the module to load + * @retval true on success + * @retval false on error + */ + bool load(const std::string& filename); virtual uint16_t tickBufferLength() const; virtual void buildTick(AudioFrameBuffer& buffer); virtual void simulateTick(std::size_t&);