The library to play and/or edit music in PTTUNE and PTCOP file formats.
Library developed by Pixel: https://pxtone.org/developer/
This library is a modified version 220910a to add some new features and provide the Big-Endian processors support (for example, PowerPC and MIPS).
- Fixed comparison code at the pxtnPulse_Noise::Compare
- There was a bug that makes all event lists being "always-equal" because they had been compared with self.
- Fixed the object deletion at pxtoneNoise::init()
- Any objects created with
new
operator should be removed bydelete
operator, otherwise, there is a possible chance to produce a memory leak.
- Any objects created with
- Removed all trailing whitespaces
- There are spaces at end of lines: basically a useless ballast that confuses the difference and taking the file size. A lot of IDEs and text editors do have the feature of trailing spaces removal, etc.
- Fixed warnings
- One
- Trailing comma at enumerations isn't well met by some compliers, causing warnings
- Signed and Unsigned comparison
- Unused arguments
- Missing default branch at Switch things
- GCC gives a misleading indentation warning when you have multiple statements after the
if
clause without adding brackets. - Using safer way to cast floating-point number as unsigned integer
- Initial way gives the "type-punned pointer will break strict-aliasing rules" warning. New way uses a
union
which allows to do the same safer 😄.
- Initial way gives the "type-punned pointer will break strict-aliasing rules" warning. New way uses a
- One
- Replaced plain "int" with "int32_t"
- On some toolchains, the int32_t in fact is the "long int" which leads to complie errors.
- Added support for Big Endian processors
- Allows the library to work on processors that has the Big Endian byte order, for example, on old Macs that has PowerPC processor. You will need to specify the
-Dpx_BIG_ENDIAN
macro when compile project on the Big Endian hardware to make library work correctly.
- Allows the library to work on processors that has the Big Endian byte order, for example, on old Macs that has PowerPC processor. You will need to specify the
- Added tempo factor parameter
- This is a factor that can be used to change the tempo of currently playing song on the fly. This feature is used for various actions.
- Added an option to specify the number of loops to play
- Now you can specify how many times the song should loop.
- Added an option to retrieve the loop start point (the "repeat")
- It allows to indicate the loop area at the music file during playback.
- Exclude static callbacks at OGG Vorbis
- This fixes one another warning given by unused static callbacks at Vorbis headers.
- Added Tremor support
- This is the integer-only implementation of OGG Vorbis, designed for hardware without or with a limited FPU.
- Added use of stb_vorbis
- This is the header-only implementation of OGG Vorbis. It can be used without having full set of OGG Vorbis libraries.
- Added missing error code assignment
- This change fixes the "VOID" error being returned instead of the actual error reason.
Among with the -DpxINCLUDE_OGGVORBIS
, you also can specify the -DpxINCLUDE_OGGVORBIS_TREMOR
to use the Tremor (integer-only) implementation, or -DpxINCLUDE_OGGVORBIS_STB
to use the header-only stb_vorbis implementation which is included with the project here.