diff options
author | Willem Jan Palenstijn | 2015-07-22 22:37:40 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-07-22 22:43:42 +0200 |
commit | 6ec9c81b575f13b2c4b30aeac592ebf2557b5890 (patch) | |
tree | 503d50902bad2d800165593039d08d5ccf0c98ab /engines/agi/sound_pcjr.cpp | |
parent | 5ec05f6b647c5ea41418be7ed19ad381f97cabd8 (diff) | |
parent | 4e5c8d35f7e133e2e72a846fdbd54900c91eeb73 (diff) | |
download | scummvm-rg350-6ec9c81b575f13b2c4b30aeac592ebf2557b5890.tar.gz scummvm-rg350-6ec9c81b575f13b2c4b30aeac592ebf2557b5890.tar.bz2 scummvm-rg350-6ec9c81b575f13b2c4b30aeac592ebf2557b5890.zip |
Merge branch 'master' into mm
Conflicts:
engines/access/access.cpp
engines/access/asurface.h
engines/access/bubble_box.cpp
engines/access/bubble_box.h
engines/access/martian/martian_game.cpp
engines/access/player.cpp
engines/access/player.h
engines/access/resources.cpp
engines/access/screen.cpp
engines/access/screen.h
engines/access/sound.cpp
engines/access/sound.h
Diffstat (limited to 'engines/agi/sound_pcjr.cpp')
-rw-r--r-- | engines/agi/sound_pcjr.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/engines/agi/sound_pcjr.cpp b/engines/agi/sound_pcjr.cpp index 51b2d067a4..ea7a2789e0 100644 --- a/engines/agi/sound_pcjr.cpp +++ b/engines/agi/sound_pcjr.cpp @@ -120,8 +120,6 @@ SoundGenPCJr::SoundGenPCJr(AgiBase *vm, Audio::Mixer *pMixer) : SoundGen(vm, pMi else _dissolveMethod = 0; - _dissolveMethod = 3; - memset(_channel, 0, sizeof(_channel)); memset(_tchannel, 0, sizeof(_tchannel)); @@ -207,9 +205,6 @@ int SoundGenPCJr::volumeCalc(SndGenChan *chan) { chan->attenuationCopy = attenuation; attenuation &= 0x0F; - attenuation += _mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 17; - if (attenuation > 0x0F) - attenuation = 0x0F; } } //if (computer_type == 2) && (attenuation < 8) @@ -411,7 +406,7 @@ int SoundGenPCJr::chanGen(int chan, int16 *stream, int len) { if (tpcm->noteCount <= 0) { // get new tone data if ((tpcm->avail) && (getNextNote(chan) == 0)) { - tpcm->atten = _channel[chan].attenuation; + tpcm->atten = volumeCalc(&_channel[chan]); tpcm->freqCount = _channel[chan].freqCount; tpcm->genType = _channel[chan].genType; @@ -477,8 +472,9 @@ int SoundGenPCJr::fillSquare(ToneChan *t, int16 *buf, int len) { count = len; + int16 amp = (int16)(volTable[t->atten] * _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / Audio::Mixer::kMaxMixerVolume); while (count > 0) { - *(buf++) = t->sign ? volTable[t->atten] : -volTable[t->atten]; + *(buf++) = t->sign ? amp : -amp; count--; // get next sample @@ -515,8 +511,9 @@ int SoundGenPCJr::fillNoise(ToneChan *t, int16 *buf, int len) { count = len; + int16 amp = (int16)(volTable[t->atten] * _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / Audio::Mixer::kMaxMixerVolume); while (count > 0) { - *(buf++) = t->sign ? volTable[t->atten] : -volTable[t->atten]; + *(buf++) = t->sign ? amp : -amp; count--; // get next sample |