|
From: <man...@us...> - 2013-04-12 15:47:37
|
Revision: 1861
http://sourceforge.net/p/modplug/code/1861
Author: manxorist
Date: 2013-04-12 15:47:28 +0000 (Fri, 12 Apr 2013)
Log Message:
-----------
[Ref] Calculate MIXING_CLIPMAX and MIXING_CLIPMIN based on MIXING_ATTENUATION and move definitions right next to each other.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Snd_defs.h
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/SoundFilePlayConfig.h
Modified: trunk/OpenMPT/soundlib/Snd_defs.h
===================================================================
--- trunk/OpenMPT/soundlib/Snd_defs.h 2013-04-12 15:30:19 UTC (rev 1860)
+++ trunk/OpenMPT/soundlib/Snd_defs.h 2013-04-12 15:47:28 UTC (rev 1861)
@@ -303,6 +303,15 @@
#define SNDMIX_MUTECHNMODE 0x100000 // Notes are not played on muted channels
+enum { MIXING_ATTENUATION = 4, };
+
+enum
+{
+ MIXING_CLIPMAX = ((1<<(32-MIXING_ATTENUATION-1))-1),
+ MIXING_CLIPMIN = -(MIXING_CLIPMAX),
+};
+
+
#define MAX_GLOBAL_VOLUME 256u
// Resampling modes
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2013-04-12 15:30:19 UTC (rev 1860)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2013-04-12 15:47:28 UTC (rev 1861)
@@ -760,7 +760,6 @@
// Low-level Mixing functions
#define SCRATCH_BUFFER_SIZE 64 //Used for plug's final processing (cleanup)
-#define MIXING_ATTENUATION 4
#define VOLUMERAMPPRECISION 12
#define FADESONGDELAY 100
Modified: trunk/OpenMPT/soundlib/SoundFilePlayConfig.h
===================================================================
--- trunk/OpenMPT/soundlib/SoundFilePlayConfig.h 2013-04-12 15:30:19 UTC (rev 1860)
+++ trunk/OpenMPT/soundlib/SoundFilePlayConfig.h 2013-04-12 15:47:28 UTC (rev 1861)
@@ -14,8 +14,6 @@
enum
{
NO_ATTENUATION = 1,
- MIXING_CLIPMIN = -0x07FFFFFF,
- MIXING_CLIPMAX = 0x07FFFFFF,
};
enum tempoMode
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|