ChangeLog 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. changes:
  2. date = 21-apr-2009 [Konstanty Bialkowski/OpenMPT/Novell (Stanislav Brabec)]
  3. ->file: src/load_amf.cpp
  4. where: whole file
  5. what: added const declarations to read only variables
  6. what: fixed delete function
  7. ->file: src/fastmix.cpp
  8. where: X86_Convert32To24
  9. what: conversion to 24bit was incorrect
  10. ->file: src/load_mdl.cpp
  11. where: init of m_lpszSongComments
  12. what: fixed delete function to be array version (Reported by
  13. David Binderman / Stanislav Brabec)
  14. ->file: src/load_pat.cpp
  15. where: memcpy to .reserved
  16. what: changed fixed valid of 36 to sizeof(reserved)
  17. (Reported by Manfred Tremmel / Stanislav Brabec)
  18. date = 20-apr-2009 [Konstanty Bialkowski]
  19. ->file: src/load_meb.cpp
  20. where: LoadMED
  21. what: fixed integer boundary condition checking code (fixing
  22. exploit)
  23. Details of exploit (and creator of test.s3m for exploit)
  24. http://www.securityfocus.com/bid/30801/info
  25. http://www.15897.com/blog/post/QianQianJingTing-mod-buffer-overflow-POC.html
  26. ->file: src/load_abc.cpp
  27. where: TestABC
  28. what: Made ABC detection code more robust
  29. ->file: src/load_abc.cpp, sndfile.cpp, snd_fx.cpp
  30. where: various
  31. what: change constant variables to explicitly use const
  32. definition
  33. (Thanks to Leandro Nini/Diego "Flameeyes" Pettenò)
  34. ->file: src/table.cpp -> src/table.h
  35. where: rename of file
  36. what: moved tables to seperate file
  37. (Thanks to Leandro Nini/Diego "Flameeyes" Pettenò)
  38. date = 15-apr-2009 [Konstanty Bialkowski]
  39. ->file: src/load_abc.cpp
  40. where: TestABC
  41. what: made sure obviously binary files do not try to get
  42. loaded as ABC
  43. where: abc_addchordname
  44. what: made sure first argument was const char * (not just char
  45. *)
  46. ->file: src/sndfile.cpp
  47. where: format conversion routines
  48. what: made sure (*a++) = func(*a), is executed properly, by
  49. splitting into two lines
  50. -file: src/libmodplug/sndfile.h
  51. where: IMixPlugin
  52. what: made sure there is a virtual destructor (to avoid
  53. warnings)
  54. ->file: src/load_ptm.cpp
  55. where: mixing routine
  56. what: bswap32 was used on a uint16_t [2] array, and when gcc
  57. uses -O2 (or greater) optimization, this may not do what is
  58. intended.
  59. date = 7-apr-2009 [Konstanty Bialkowski/Anthony Ramine]
  60. -> file: src/load_abc.cpp,load_mid.cpp,load_pat.cpp
  61. where: whole file(s)
  62. what: removed use of ULONG, and changed to uint32_t
  63. where: few functions
  64. what: removed uint, and replaced with uint32_t
  65. date = 7-apr-2009 [Zed Pobre/Debian]
  66. -> file: src/libmodplug.pc
  67. where: file.
  68. what: split Libs into Libs.private
  69. date = 2-nov-2006 [Alec Berryman/CVE-2006-4192]
  70. -> file: src/sndfile.cpp
  71. where: ReadSample
  72. what: prevent buffer overflow [as reported in CVE-2006-4192]
  73. date = 2-nov-2006 [Konstanty Bialkowski/Macro Trillo]
  74. -> file: configure.in,config.h,load_abc.cpp,fastmix.cpp
  75. where: Automake 2.60 used
  76. what: In order to properly use stdint.h we should make use of the new macros for its detection, on systems with automake 2.59 but where stdint.h is available, this can be removed. (Patch by Macro Trillo)
  77. -> file: src/load_amf.cpp, src/fastmix.cpp
  78. where: Licensing
  79. what: all old code was relicensed for public domain, and somehow an old version was included with GPL notices
  80. date = 20-jul-2006 [Peter Grootswagers]
  81. -> file: src/load_abc.cpp
  82. where: instrument loader functions
  83. what: replaced with correspondig functions in load_pat.cpp
  84. -> file: src/load_mid.cpp
  85. where: whole source
  86. what: new loader for midi files
  87. -> file: src/load_pat.cpp
  88. where: whole source
  89. what: new loader for GUS instrument patch files (pat)
  90. -> file: src/load_pat.h
  91. where: whole source
  92. what: new header declaring reuseable GUS instrument patch functions (pat)
  93. -> file: README
  94. where: 2. Features
  95. what: added description of load_mid.cpp and load_pat.cpp
  96. -> file: src/Makefile.am
  97. where: libmodplug_la_SOURCES
  98. what: added load_mid.cpp and load_pat.cpp
  99. where: libmodpluginclude_HEADERS
  100. what: added load_pat.h
  101. -> file: src/sndfile.cpp
  102. where: function CSoundFile::Create()
  103. what: added call to ReadMID and ReadPAT
  104. -> file: src/libmodplug/sndfile.h
  105. where: #define
  106. what: added MOD_TYPE_PAT (MOD_TYPE_MID already there...)
  107. where: class CSoundFile
  108. what: added public function members ReadMID, TestMID, ReadPat, TestPAT and PATsample
  109. date = 24-jun-2006 [Peter Grootswagers]
  110. -> file: src/load_abc.cpp
  111. where: whole source
  112. what: new loader for abc files
  113. -> file: README
  114. where: 2. Features
  115. what: added description of load_abc.cpp
  116. -> file: src/Makefile.am
  117. where: libmodplug_la_SOURCES
  118. what: added load_abc.cpp
  119. -> file: src/sndfile.cpp
  120. where: function CSoundFile::Create()
  121. what: added call to ReadABC
  122. -> file: src/libmodplug/sndfile.h
  123. where: #define
  124. what: added MOD_TYPE_ABC
  125. where: class CSoundFile
  126. what: added public function members ReadABC and TestABC
  127. date = 20-mar-2006 [Macro Trillo / "Custom libmodplug project"]
  128. -> file : src/load_s3m.cpp
  129. -> file : src/load_far.cpp
  130. what: fixed endianness
  131. date = 20-mar-2006 [Alistair John Strachan]
  132. ....
  133. Many other changes need to be documented here...
  134. GCC3 fixes, GCC4 fixes, More Archive Types.
  135. date = 09-feb-2001 [Markus Fick]
  136. -> file: fastmix.cpp
  137. where: spline creation, spline macros
  138. what: added unity gain clamp code, added Quantizer_Bits(shift) preprocessor constants
  139. where: fir creation, fir macros
  140. what: - removed x<pi/2 condition in coef creation
  141. - added quantizer_bits(shift) preprocessor constants
  142. - set default quantizer bits to 15 instead 14 (scale now 32768 instead 16384)
  143. there should not occure any overflows during fir response calculation because
  144. of the symmetric form of filter and the position of the negative fir coefs
  145. - changed final volume calculation for 16bit samples (quality enhancement)
  146. date = 08-feb-2001 [Markus Fick]
  147. -> file: sndmix.cpp
  148. where: function ReadNote()
  149. what: modified behaviour of modplug so that interpolation is only deactivated if
  150. a) the user selects "no interpolation"
  151. b) linear interpolation is set and speed incr. > 0xff00
  152. => if spline or fir is active then we use always interpolation
  153. -> file: fastmix.cpp
  154. where: spline macros
  155. what: changed spline macros to use precalculated tables (way faster)
  156. where: file
  157. what: - implemented spline table precalculator
  158. - changed fir precalculator + macros (for higher quality and clearer source)
  159. - added some comments and documentation
  160. comment:
  161. - preprocessor constant: SPLINE_FRACBITS
  162. ) controls quality/memory usage
  163. range is [4..14] inclusive
  164. 4 = low quality, low memory usage
  165. 14 = highest quality, highest memory usage (1L<<14)*4*2 bytes
  166. - preprocessor constant: WFIR_FRACBITS
  167. ) controls quality/memory usage
  168. range is [4..12] inclusive
  169. 4 = low quality, low mu
  170. 12 = highest quality, highest memory usage ((1L<<(12+1))+1)*8*2 bytes
  171. date = 07-feb-2001 [Markus Fick]
  172. -> file: fastmix.cpp
  173. where: spline macros
  174. what: fixed error in coef calculation
  175. date = 07-feb-2001 [Markus Fick]
  176. -> file: sndfile.h
  177. where: class definition of soundfile
  178. what: removed InitFIR + DoneFIR function prototypes
  179. -> file: sndfile.cpp
  180. function:CSoundFile::CSoundFile()
  181. what: [modify] removed call to CSoundFile::InitFIRMixer( )
  182. function:CSoundFile::~CSoundFile()
  183. what: [modify] removed call to CSoundFile::DoneFIRMixer( )
  184. -> file: fastmix.cpp
  185. where: spline macros
  186. what: changed formula + added some guard bits to calculation
  187. where: fir macros + implementation
  188. what: - moved CSoundfile::FIR funtions to CzFIR (single instance sfir)
  189. - changed fir macros to support CzFIR class
  190. date = 06-feb-2001 [Markus Fick]
  191. -> file: fastmix.cpp
  192. where: macros
  193. what: - removed fir filter with coef interpolation
  194. - add spline interpolation
  195. RM: now modplug->select( SPLINE ) selects spline and
  196. modplug->select( POLYPHASE ) selects 8tap fir filter
  197. date = 05-feb-2001 [Markus Fick]
  198. -> file: fastmix.cpp
  199. where: macros + filter order
  200. what: [modify] changed filter order to 8 instead of 10
  201. -> file: fastmix.cpp
  202. what: new macros+switch for fir-interpolator with coef interpolation
  203. date = 04-feb-2001 [Markus Fick]
  204. -> file: sndfile.h
  205. where: class CSoundFile (bottom)
  206. what: [add] methods for FIR mixer support
  207. 1. int InitFIRInterpolator( );
  208. 2. int DoneFIRInterpolator( );
  209. -> file: sndfile.cpp
  210. function:CSoundFile::CSoundFile()
  211. what: [modify] add call to CSoundFile::InitFIRMixer( )
  212. function:CSoundFile::~CSoundFile()
  213. what: [modify] add call to CSoundFile::DoneFIRMixer( )
  214. -> file: fastmix.cpp
  215. new include: <math.h>
  216. why: need it for fir-coef calculation
  217. new function: CSoundFile::InitFIRMixer( ) // initializes fir filter lookup (if necessary)
  218. new function: CSoundFile::DoneFIRMixer( ) // decrements ReferenceCounter (for static vars) and deinitializes fir struct (if possible).
  219. new defs:
  220. #define FIRCPWBN 10 // log2 of number of precalculated wings (-(1L<<FIRCPWBN)..(1L<<FIRCPWBN))
  221. #define FIRLOPOSSHIFT (16-(FIRCPWBN+1)) // shift for lopos of sampleposition -> (16 - FIRCPWBN - 1)
  222. #define FIRLEN 9 // number(-1) of multiplications per sample
  223. #define FIRCUT 0.90f // cutoff of filter
  224. #define MIXNDX_FIRMIXERSRC 0x20 // src-type for firfilter
  225. new vars:
  226. static signed short *cFirLut; // lulines
  227. static int bFirInitialized = 0; // initialized?
  228. static int nFirOrder = FIRLEN; // order (modplug has 4smps pre/post extension, so limit this to 9)
  229. static float nFirFC = FIRCUT; // cutoff (normalized to pi/2)
  230. static int nFirCpw = (1L<<FIRCPWBN); // number of precalculted filter lines
  231. static int nFirUsers = 0; // reference counter
  232. new macros:
  233. #define SNDMIX_GETMONOVOL8FIRFILTER
  234. #define SNDMIX_GETMONOVOL16FIRFILTER
  235. #define SNDMIX_GETSTEREOVOL8FIRFILTER
  236. #define SNDMIX_GETSTEREOVOL16FIRFILTER
  237. new mixer interface macros:
  238. BEGIN_MIX_INTERFACE(Mono8BitFirFilterMix)
  239. BEGIN_MIX_INTERFACE(Mono16BitFirFilterMix)
  240. BEGIN_RAMPMIX_INTERFACE(Mono8BitFirFilterRampMix)
  241. BEGIN_RAMPMIX_INTERFACE(Mono16BitFirFilterRampMix)
  242. BEGIN_MIX_INTERFACE(FastMono8BitFirFilterMix)
  243. BEGIN_MIX_INTERFACE(FastMono16BitFirFilterMix)
  244. BEGIN_FASTRAMPMIX_INTERFACE(FastMono8BitFirFilterRampMix)
  245. BEGIN_FASTRAMPMIX_INTERFACE(FastMono16BitFirFilterRampMix)
  246. BEGIN_MIX_INTERFACE(Stereo8BitFirFilterMix)
  247. BEGIN_MIX_INTERFACE(Stereo16BitFirFilterMix)
  248. BEGIN_RAMPMIX_INTERFACE(Stereo8BitFirFilterRampMix)
  249. BEGIN_RAMPMIX_INTERFACE(Stereo16BitFirFilterRampMix)
  250. BEGIN_MIX_FLT_INTERFACE(FilterMono8BitFirFilterMix)
  251. BEGIN_MIX_FLT_INTERFACE(FilterMono16BitFirFilterMix)
  252. BEGIN_RAMPMIX_FLT_INTERFACE(FilterMono8BitFirFilterRampMix)
  253. BEGIN_RAMPMIX_FLT_INTERFACE(FilterMono16BitFirFilterRampMix)
  254. BEGIN_MIX_STFLT_INTERFACE(FilterStereo8BitFirFilterMix)
  255. BEGIN_MIX_STFLT_INTERFACE(FilterStereo16BitFirFilterMix)
  256. BEGIN_RAMPMIX_STFLT_INTERFACE(FilterStereo8BitFirFilterRampMix)
  257. BEGIN_RAMPMIX_STFLT_INTERFACE(FilterStereo16BitFirFilterRampMix)
  258. modified:
  259. const LPMIXINTERFACE gpMixFunctionTable[2*2*16] // to hold new fir mixer interface
  260. const LPMIXINTERFACE gpFastMixFunctionTable[2*2*16] // to hold new fir mixer interface
  261. functioN: UINT CSoundFile::CreateStereoMix(int count)
  262. new:
  263. if (!(pChannel->dwFlags & CHN_NOIDO))
  264. {
  265. // use hq-fir mixer?
  266. if( ((gdwSoundSetup & (SNDMIX_HQRESAMPLER|SNDMIX_ULTRAHQSRCMODE)) == (SNDMIX_HQRESAMPLER|SNDMIX_ULTRAHQSRCMODE)) ||
  267. ((gdwSoundSetup & (SNDMIX_HQRESAMPLER)) == (SNDMIX_HQRESAMPLER)) )
  268. nFlags += MIXNDX_FIRMIXERSRC;
  269. else
  270. nFlags += MIXNDX_LINEARSRC; // use
  271. }
  272. was:
  273. if (!(pChannel->dwFlags & CHN_NOIDO))
  274. {
  275. nFlags += MIXNDX_LINEARSRC; // use
  276. }