diff --git a/swilib/include/swilib.h b/swilib/include/swilib.h index a0cde5aa..aba8928e 100644 --- a/swilib/include/swilib.h +++ b/swilib/include/swilib.h @@ -49,6 +49,7 @@ #include "swilib/file.h" #include "swilib/explorer.h" #include "swilib/sound.h" +#include "swilib/player.h" #include "swilib/obs.h" #include "swilib/settings.h" #include "swilib/system.h" diff --git a/swilib/include/swilib.h.gch b/swilib/include/swilib.h.gch deleted file mode 100644 index c9c27864..00000000 Binary files a/swilib/include/swilib.h.gch and /dev/null differ diff --git a/swilib/include/swilib/player.h b/swilib/include/swilib/player.h new file mode 100644 index 00000000..969b7b54 --- /dev/null +++ b/swilib/include/swilib/player.h @@ -0,0 +1,47 @@ +#pragma once + +#ifndef __IN_SWILIB__ +#include "base.h" +#include "wstring.h" +#endif + +__swilib_begin + +/** + * @addtogroup Player + * @brief Functions for working with builtin media player. + * + * Usage: `#include ` or `#include ` + * @{ + */ + +/** + * Pointer to the magic value for controlling media player. + * @return pointer + * + * ```C + * uint32_t ctrl_code = *RamMPlayer_CtrlCode(); + * ``` + * */ +__swi_begin(0x80E1) +uint32_t *RamMPlayer_CtrlCode() +__swi_end(0x80E1, RamMPlayer_CtrlCode, ()); + +/** + * Play previous song in standart media player. + * */ +__swi_begin(0x1FF) +void MEDIA_PLAYLAST() +__swi_end(0x1FF, MEDIA_PLAYLAST, ()); + +/** + * Get the filename of the current song in the media player. + * @return pointer to the WSHDR + * */ +__swi_begin(0x082) +const WSHDR *GetCurrentTrackFilename() +__swi_end(0x082, GetCurrentTrackFilename, ()); + +__swilib_end + +/** @} */ diff --git a/swilib/include/swilib/sound.h b/swilib/include/swilib/sound.h index a2f22538..044c2449 100644 --- a/swilib/include/swilib/sound.h +++ b/swilib/include/swilib/sound.h @@ -441,25 +441,6 @@ __swi_begin(0x09A) int ChangeVolume(uint8_t volume) __swi_end(0x09A, ChangeVolume, (volume)); -/** - * Pointer to the magic value for controlling media player. - * @return pointer - * - * ```C - * uint32_t ctrl_code = *RamMPlayer_CtrlCode(); - * ``` - * */ -__swi_begin(0x80E1) -uint32_t *RamMPlayer_CtrlCode() -__swi_end(0x80E1, RamMPlayer_CtrlCode, ()); - -/** - * Play previous song in standart media player. - * */ -__swi_begin(0x1FF) -void MEDIA_PLAYLAST() -__swi_end(0x1FF, MEDIA_PLAYLAST, ()); - __swilib_end /** @} */