mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-03 23:31:57 +00:00
AUDIO: Replace memsets on structures with ctors with ARRAYCLEAR()
This commit is contained in:
parent
035ddef16c
commit
201d2675ad
audio
@ -25,6 +25,7 @@
|
||||
#include "common/file.h"
|
||||
#include "common/system.h"
|
||||
#include "common/textconsole.h"
|
||||
#include "common/util.h"
|
||||
|
||||
#include "audio/fmopl.h"
|
||||
|
||||
@ -343,9 +344,9 @@ void MidiDriver_Miles_AdLib::onTimer() {
|
||||
}
|
||||
|
||||
void MidiDriver_Miles_AdLib::resetData() {
|
||||
memset(_midiChannels, 0, sizeof(_midiChannels));
|
||||
memset(_virtualFmVoices, 0, sizeof(_virtualFmVoices));
|
||||
memset(_physicalFmVoices, 0, sizeof(_physicalFmVoices));
|
||||
ARRAYCLEAR(_midiChannels);
|
||||
ARRAYCLEAR(_virtualFmVoices);
|
||||
ARRAYCLEAR(_physicalFmVoices);
|
||||
|
||||
for (byte midiChannel = 0; midiChannel < MILES_MIDI_CHANNEL_COUNT; midiChannel++) {
|
||||
// defaults, were sent to driver during driver initialization
|
||||
@ -575,7 +576,7 @@ void MidiDriver_Miles_AdLib::prioritySort() {
|
||||
uint16 virtualFmVoicesCount = 0;
|
||||
byte midiChannel = 0;
|
||||
|
||||
memset(&virtualPriorities, 0, sizeof(virtualPriorities));
|
||||
ARRAYCLEAR(virtualPriorities);
|
||||
|
||||
//warning("prioritysort");
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "audio/mods/module.h"
|
||||
|
||||
#include "common/textconsole.h"
|
||||
#include "common/util.h"
|
||||
|
||||
namespace Modules {
|
||||
|
||||
@ -169,7 +170,7 @@ ProtrackerStream::ProtrackerStream(Common::SeekableReadStream *stream, int offs,
|
||||
|
||||
_patternDelay = 0;
|
||||
|
||||
memset(_track, 0, sizeof(_track));
|
||||
ARRAYCLEAR(_track);
|
||||
|
||||
startPaula();
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ bool OPL::init() {
|
||||
free();
|
||||
|
||||
memset(&_reg, 0, sizeof(_reg));
|
||||
memset(_chip, 0, sizeof(_chip));
|
||||
ARRAYCLEAR(_chip);
|
||||
|
||||
_emulator = new DBOPL::Chip();
|
||||
if (!_emulator)
|
||||
|
Loading…
x
Reference in New Issue
Block a user