mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-21 09:21:08 +00:00
calling memset to zero a buffer you are about to fill with audio data is not necessary (removing this from Gob::Snd::readBuffer); removed dead code
svn-id: r25883
This commit is contained in:
parent
b1a12658b0
commit
1c80f2ffa0
@ -61,10 +61,6 @@ void Init::cleanup(void) {
|
||||
_vm->_video->freeSurfDesc(_vm->_global->_pPrimarySurfDesc);
|
||||
_vm->_global->_pPrimarySurfDesc = 0;
|
||||
|
||||
if (_vm->_snd->_cleanupFunc != 0 && _vm->_snd->_playingSound != 0) {
|
||||
(*_vm->_snd->_cleanupFunc) (0);
|
||||
_vm->_snd->_cleanupFunc = 0;
|
||||
}
|
||||
_vm->_snd->speakerOff();
|
||||
|
||||
_vm->_dataio->closeDataFile();
|
||||
|
@ -96,7 +96,6 @@ int Snd::SquareWaveStream::readBuffer(int16 *buffer, const int numSamples) {
|
||||
}
|
||||
|
||||
Snd::Snd(GobEngine *vm) : _vm(vm) {
|
||||
_cleanupFunc = 0;
|
||||
_playingSound = 0;
|
||||
_curSoundDesc = 0;
|
||||
|
||||
@ -307,8 +306,6 @@ void Snd::checkEndSample(void) {
|
||||
}
|
||||
|
||||
int Snd::readBuffer(int16 *buffer, const int numSamples) {
|
||||
memset(buffer, 0, numSamples);
|
||||
|
||||
for (int i = 0; i < numSamples; i++) {
|
||||
Common::StackLock slock(_mutex);
|
||||
|
||||
|
@ -46,7 +46,6 @@ public:
|
||||
typedef void (*CleanupFuncPtr) (int16);
|
||||
|
||||
char _playingSound;
|
||||
CleanupFuncPtr _cleanupFunc;
|
||||
|
||||
Snd(GobEngine *vm);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user