dapphp/securimage — pull request #9 by Uranium235 (2012-04-13 20:54:26+00:00)
Title: Fix bugs and improve robustness

I had some more time:
Fixed two bugs.
Improved support for 32-bit floats to be more compliant with the standard (see http://www-mmsp.ece.mcgill.ca/documents/audioformats/wave/wave.html).
24-bits still need revision as they do not play in MediaPlayer - will tackle that soon.
Minor speed improvement.
Overall improvement in robustness.

There are two more commits after this pull request. Please have a look at the 2nd. I think it is a good idea to give the user a choice in what normalization method is used. A default value of sth. like 0.5 to 0.6 gives best results imho - remember that with logarithmic compression, lower values are not as bad, as the compression factor only gradually increases.

And I think there could be an issue with your default value checking in the constructor of securimage. For comparison is_null() should be used instead of == null. For example, a boolean value would == null for false as well (audio_use_noise, degrade_audio).