[Scummvm-cvs-logs] SF.net SVN: scummvm: [25829] scummvm/trunk/sound/flac.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat Feb 24 20:54:54 CET 2007
Revision: 25829
http://scummvm.svn.sourceforge.net/scummvm/?rev=25829&view=rev
Author: fingolfin
Date: 2007-02-24 11:54:54 -0800 (Sat, 24 Feb 2007)
Log Message:
-----------
Removed FlacInputStream::deleteBuffer
Modified Paths:
--------------
scummvm/trunk/sound/flac.cpp
Modified: scummvm/trunk/sound/flac.cpp
===================================================================
--- scummvm/trunk/sound/flac.cpp 2007-02-24 19:29:40 UTC (rev 25828)
+++ scummvm/trunk/sound/flac.cpp 2007-02-24 19:54:54 UTC (rev 25829)
@@ -135,7 +135,6 @@
uint getChannels() const { return MIN(_streaminfo.channels, MAX_OUTPUT_CHANNELS); }
bool allocateBuffer(uint minSamples);
- inline void deleteBuffer();
inline FLAC__StreamDecoderState getStreamDecoderState() const;
@@ -192,7 +191,6 @@
_preBuffer.bufFill = 0;
_preBuffer.bufSize = 0;
- deleteBuffer();
_lastSampleWritten = false;
_methodConvertBuffers = &FlacInputStream::convertBuffersGeneric;
@@ -385,16 +383,6 @@
#endif
}
-inline void FlacInputStream::deleteBuffer() {
- _lastSampleWritten = _lastSampleWritten && _preBuffer.bufFill == 0;
- _preBuffer.bufFill = 0;
- _preBuffer.bufSize = 0;
- if (_preBuffer.bufData != NULL) {
- delete[] _preBuffer.bufData;
- _preBuffer.bufData = NULL;
- }
-}
-
bool FlacInputStream::allocateBuffer(uint minSamples) {
uint allocateSize = minSamples / getChannels();
/** insert funky algorythm for optimum buffersize here */
@@ -402,7 +390,10 @@
allocateSize += 8 - (allocateSize % 8); // make sure its an nice even amount
allocateSize *= getChannels();
- deleteBuffer();
+ _lastSampleWritten = _lastSampleWritten && _preBuffer.bufFill == 0;
+ _preBuffer.bufFill = 0;
+ _preBuffer.bufSize = 0;
+ delete[] _preBuffer.bufData;
_preBuffer.bufData = new SampleType[allocateSize];
if (_preBuffer.bufData != NULL) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list