properly init member vars instead of using memset

svn-id: r8608
This commit is contained in:
Max Horn 2003-06-22 13:48:47 +00:00
parent 2a31d107c9
commit d2b61e9bef

View File

@ -155,12 +155,24 @@ public:
SoundMixer::SoundMixer() {
memset(this,0,sizeof(SoundMixer)); // palmos
_syst = 0;
_mutex = 0;
_premixParam = 0;
_premixProc = 0;
for (int i = 0; i != NUM_CHANNELS; i++)
_handles[i] = NULL;
_outputRate = 0;
_volumeTable = (int16 *)calloc(256 * sizeof(int16), 1);
for (int i = 0; i != NUM_CHANNELS; i++) {
_musicVolume = 0;
_paused = false;
for (int i = 0; i != NUM_CHANNELS; i++)
_channels[i] = NULL;
}
}
SoundMixer::~SoundMixer() {