aboutsummaryrefslogtreecommitdiff
path: root/audio/decoders/voc.cpp
AgeCommit message (Collapse)Author
2014-02-18AUDIO: Make GPL headers consistent in themselves.Johannes Schickel
2014-01-15ALL: Remove optimization unstable code on checking for null after new.D G Turner
These issues were identified by the STACK tool. By default, the C++ new operator will throw an exception on allocation failure, rather than returning a null pointer. The result is that testing the returned pointer for null is redundant and _may_ be removed by the compiler. This is thus optimization unstable and may result in incorrect behaviour at runtime. However, we do not use exceptions as they are not supported by all compilers and may be disabled. To make this stable without removing the null check, you could qualify the new operator call with std::nothrow to indicate that this should return a null, rather than throwing an exception. However, using (std::nothrow) was not desirable due to the Symbian toolchain lacking a <new> header. A global solution to this was also not easy by redefining "new" as "new (std::nothrow)" due to custom constructors in NDS toolchain and various common classes. Also, this would then need explicit checks for OOM adding to all new usages as per C malloc which is untidy. For now to remove this optimisation unstable code is best as it is likely to not be present anyway, and OOM will cause a system library exception instead, even without exceptions enabled in the application code.
2012-06-11AUDIO: Make VOC decoder a bit more failsafe by still playing parts of ↵Johannes Schickel
invalid VOC files. Formerly when an unsupported block was found the opening would fail. Instead now all the valid blocks till that occasion will be played. This fixes an missing sound in Full Throttle (thanks to clone2727 for reporting), which is using a VOC file which fails to specify the proper block length for its sound block.
2012-01-26AUDIO: Add more warnings in case invalid VOC data is encountered.Johannes Schickel
2012-01-26AUDIO: Fix missing sounds in Simon 1 Amiga CD32.Johannes Schickel
It seems the VOC files used by Simon 1 Amiga CD32 use 128 as terminator block. Added this as a special case with a debug output when it's caught.
2011-12-24AUDIO: Remove obsolete loadVOCFromStream.Johannes Schickel
2011-11-24AUDIO: Fix type 9 sound blocks in VOC code.Johannes Schickel
This should fix missing sound in Touche.
2011-11-06AUDIO: Implement a basic VocStream class.Johannes Schickel
Now all VOCs are streamed rather than preloaded. This deprecates the STREAM_AUDIO_FROM_DISK define, which was previously used to stream VOCs from disk. This might very well break some engines which relied on the stream not being changed after makeVOCStream! I adapted all engines which had a check for STREAM_AUDIO_FROM_DISK in their code. It would be wise to check all other engines using VOC to see if this might cause any problems for them.
2011-10-09AUDIO: Strip out some unused VOC code.Johannes Schickel
2011-10-09AUDIO: Remove unused makeVOCStream interface.Johannes Schickel
2011-06-23ANALYSIS: Fix potential memory leak when using reallocJulien
When reallocation is unsuccessful, the passed buffer is not freed. In this case, assigning the result (NULL) will result in a leak of the original memory buffer. See http://msdn.microsoft.com/en-us/library/kkedhy7c.aspx
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2011-04-28JANITORIAL: Reduce header dependencies in shared codeOri Avtalion
Some backends may break as I only compiled SDL
2011-02-09AUDIO: Rename sound/ dir to audio/Max Horn
svn-id: r55850