[Scummvm-cvs-logs] scummvm master -> 0cb0a09c02f20626bbcf2bb89341b02b7b3ff12c

criezy criezy at scummvm.org
Sun May 10 17:20:37 CEST 2015


This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8e4c672d38 AGI: Use correct volume for PCjr output
65ed7e775e AGI: Fix bug with music/SFX volume in PCjr
830f8c42f5 AGI: Fix PCjr dissolve method used for early versions
0cb0a09c02 AGI: Change the way the mixer volume is handled in the PCjr player


Commit: 8e4c672d3816a4b41af7e2fe0c3c593ee252b330
    https://github.com/scummvm/scummvm/commit/8e4c672d3816a4b41af7e2fe0c3c593ee252b330
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2015-05-10T15:38:54+01:00

Commit Message:
AGI: Use correct volume for PCjr output

This looks like a regression from commit 24bb5da: AGI: Add a layer of
abstraction between the sound chip and the two players

Changed paths:
    engines/agi/sound_pcjr.cpp



diff --git a/engines/agi/sound_pcjr.cpp b/engines/agi/sound_pcjr.cpp
index 51b2d06..3654b97 100644
--- a/engines/agi/sound_pcjr.cpp
+++ b/engines/agi/sound_pcjr.cpp
@@ -411,7 +411,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;
 


Commit: 65ed7e775e51f864897ccdd578b54423ab79aa6e
    https://github.com/scummvm/scummvm/commit/65ed7e775e51f864897ccdd578b54423ab79aa6e
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2015-05-10T15:39:00+01:00

Commit Message:
AGI: Fix bug with music/SFX volume in PCjr

A higher volume in the GUI resulted in a lower music volume (and
lower volume in the GUI resulted in higher music volume).

Changed paths:
    engines/agi/sound_pcjr.cpp



diff --git a/engines/agi/sound_pcjr.cpp b/engines/agi/sound_pcjr.cpp
index 3654b97..0dce276 100644
--- a/engines/agi/sound_pcjr.cpp
+++ b/engines/agi/sound_pcjr.cpp
@@ -207,7 +207,7 @@ int SoundGenPCJr::volumeCalc(SndGenChan *chan) {
 				chan->attenuationCopy = attenuation;
 
 				attenuation &= 0x0F;
-				attenuation += _mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 17;
+				attenuation += (16 - _mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 17);
 				if (attenuation > 0x0F)
 					attenuation = 0x0F;
 			}


Commit: 830f8c42f51016ca7056b391478359453473042c
    https://github.com/scummvm/scummvm/commit/830f8c42f51016ca7056b391478359453473042c
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2015-05-10T16:02:33+01:00

Commit Message:
AGI: Fix PCjr dissolve method used for early versions

This was a regression from ceb2909.

Changed paths:
    engines/agi/sound_pcjr.cpp



diff --git a/engines/agi/sound_pcjr.cpp b/engines/agi/sound_pcjr.cpp
index 0dce276..83adcac 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));
 


Commit: 0cb0a09c02f20626bbcf2bb89341b02b7b3ff12c
    https://github.com/scummvm/scummvm/commit/0cb0a09c02f20626bbcf2bb89341b02b7b3ff12c
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2015-05-10T16:14:55+01:00

Commit Message:
AGI: Change the way the mixer volume is handled in the PCjr player

Instead of factoring the volume into the tone attenuation it now scales
the volume table. This way it still uses the full table when playing
at a low volume and therefore keeps the 16 attenuation levels.

Also use kMusicSoundType instead of kSFXSoundType to be coherent with what
the MIDI output is doing (volume for both music and SFX is controlled by
the Music volume slider).

Changed paths:
    engines/agi/sound_pcjr.cpp



diff --git a/engines/agi/sound_pcjr.cpp b/engines/agi/sound_pcjr.cpp
index 83adcac..17370cb 100644
--- a/engines/agi/sound_pcjr.cpp
+++ b/engines/agi/sound_pcjr.cpp
@@ -205,7 +205,6 @@ int SoundGenPCJr::volumeCalc(SndGenChan *chan) {
 				chan->attenuationCopy = attenuation;
 
 				attenuation &= 0x0F;
-				attenuation += (16 - _mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 17);
 				if (attenuation > 0x0F)
 					attenuation = 0x0F;
 			}
@@ -475,8 +474,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
@@ -513,8 +513,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






More information about the Scummvm-git-logs mailing list