Skip to content

adjust missing NO_PACKING and MODPLUG_NO_FILESAVE ifdefs:#14

Closed
sezero wants to merge 2 commits intoKonstanty:masterfrom
sezero:szo7
Closed

adjust missing NO_PACKING and MODPLUG_NO_FILESAVE ifdefs:#14
sezero wants to merge 2 commits intoKonstanty:masterfrom
sezero:szo7

Conversation

@sezero
Copy link
Contributor

@sezero sezero commented Jul 14, 2014

CSoundFile::PackSample() and CSoundFile::CanPackSample() are only
used when writing samples and only when NO_PACKING is not defined.
sample write, in turn, is only available when MODPLUG_NO_FILESAVE
is not defined. therefore, wrap them with MODPLUG_NO_PACKING and
NO_FILESAVE ifdefs in sndfile.h, and move the MODPLUG_NO_PACKING
ifdef in sndfile.cpp to cover PackSample() and CanPackSample() too.
This doesn't affect the C-only interface, however CSoundFile class
in the C++ interface is changed, therefore MODPLUG_LIBRARY_VERSION
in configure.ac would probably need changing before a release.

CSoundFile::PackSample() and CSoundFile::CanPackSample() are only
used when writing samples and only when NO_PACKING is not defined.
sample write, in turn, is only available when MODPLUG_NO_FILESAVE
is not defined. therefore, wrap them with MODPLUG_NO_PACKING and
NO_FILESAVE ifdefs in sndfile.h, and move the MODPLUG_NO_PACKING
ifdef in sndfile.cpp to cover PackSample() and CanPackSample() too.
This doesn't affect the C-only interface, however CSoundFile class
in the C++ interface is changed, therefore MODPLUG_LIBRARY_VERSION
in configure.ac would _probably_ need changing before a release.
@Konstanty
Copy link
Owner

Currently I don't like the idea of changing the interface for no "good" reason. The features before/after are the same.

…AVE isn't defined. GetBestSaveFormat and GetSaveFormats are only meaningful when MODPLUG_NO_FILESAVE isn't defined.
@sagamusix
Copy link
Contributor

Any code that has to do with NO_PACKING should be removed anyway - There's no reason to still support writing ModPlug-style ADPCM sample hacks into files these days.

@sezero
Copy link
Contributor Author

sezero commented Aug 2, 2014

Any code that has to do with NO_PACKING should be removed anyway -
There's no reason to still support writing ModPlug-style ADPCM sample
hacks into files these days.

I agree, but he doesn't want to change the api unless there are new features.

Apart form this, I disabled the midi and wav formats loading in my fork
(configurable using new defines), but that would be unacceptable too I
think, so I'm keeping that to myself.

@sagamusix
Copy link
Contributor

Yes, the API shouldn't be changed (libmodplug did this before when increasing the minor version and that is a very bad thing to do), but at least the code for this could be removed, so that it's impossible to create ADPCM-compressed samples.

@sezero
Copy link
Contributor Author

sezero commented Jul 25, 2017

This PR is stale. Closing.

@sezero sezero closed this Jul 25, 2017
SDL-mirror-bot pushed a commit to SDL-mirror/SDL_mixer that referenced this pull request Oct 24, 2018
- disable wav formats handling: SDL_mixer has its own code for it.
- disable midi formats handling: SDL_mixer has timidity or native midi for it.
- disable experimental (possibly broken) file save support: not used, ever.
- don't export cplusplus interface from shared libs. SDL_mixer doesn't use it.
- disable mmcmp unpacking. disable broken pp20 unpacking.
- merge Konstanty/libmodplug#36 (fix PSM loader overwrites const data)
- merge Konstanty/libmodplug#39 (case-sensitive STM signature checks)
- merge Konstanty/libmodplug#40 (big-endian-friendly MDL track length read)
- merge Konstanty/libmodplug#24 (make some stuff static)
- merge Konstanty/libmodplug#14 (NO_PACKING and MODPLUG_NO_FILESAVE ifdefs)
- merge Konstanty/libmodplug#32 (replace setenv)
- merge Konstanty/libmodplug#41 (timidity paths update)
Akaricchi pushed a commit to taisei-project/SDL2_mixer that referenced this pull request Jun 2, 2020
- disable wav formats handling: SDL_mixer has its own code for it.
- disable midi formats handling: SDL_mixer has timidity or native midi for it.
- disable experimental (possibly broken) file save support: not used, ever.
- don't export cplusplus interface from shared libs. SDL_mixer doesn't use it.
- disable mmcmp unpacking. disable broken pp20 unpacking.
- merge Konstanty/libmodplug#36 (fix PSM loader overwrites const data)
- merge Konstanty/libmodplug#39 (case-sensitive STM signature checks)
- merge Konstanty/libmodplug#40 (big-endian-friendly MDL track length read)
- merge Konstanty/libmodplug#24 (make some stuff static)
- merge Konstanty/libmodplug#14 (NO_PACKING and MODPLUG_NO_FILESAVE ifdefs)
- merge Konstanty/libmodplug#32 (replace setenv)
- merge Konstanty/libmodplug#41 (timidity paths update)
Wolf3s pushed a commit to Wolf3s/PS2SDL_mixer-1.2.12 that referenced this pull request Mar 30, 2024
- disable wav formats handling: SDL_mixer has its own code for it.
- disable midi formats handling: SDL_mixer has timidity or native midi for it.
- disable experimental (possibly broken) file save support: not used, ever.
- don't export cplusplus interface from shared libs. SDL_mixer doesn't use it.
- disable mmcmp unpacking. disable broken pp20 unpacking.
- merge Konstanty/libmodplug#36 (fix PSM loader overwrites const data)
- merge Konstanty/libmodplug#39 (case-sensitive STM signature checks)
- merge Konstanty/libmodplug#40 (big-endian-friendly MDL track length read)
- merge Konstanty/libmodplug#24 (make some stuff static)
- merge Konstanty/libmodplug#14 (NO_PACKING and MODPLUG_NO_FILESAVE ifdefs)
- merge Konstanty/libmodplug#32 (replace setenv)
- merge Konstanty/libmodplug#41 (timidity paths update)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants