[Scummvm-git-logs] scummvm master -> 763cf46fc1d15616c4117387ad77d8d155c58d3b

aquadran noreply at scummvm.org
Sun Jun 19 05:39:52 UTC 2022


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

Summary:
763cf46fc1 GRIM: Put imuse warnings into debug channels


Commit: 763cf46fc1d15616c4117387ad77d8d155c58d3b
    https://github.com/scummvm/scummvm/commit/763cf46fc1d15616c4117387ad77d8d155c58d3b
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2022-06-19T07:39:47+02:00

Commit Message:
GRIM: Put imuse warnings into debug channels

Changed paths:
    engines/grim/imuse/imuse.cpp
    engines/grim/imuse/imuse_track.cpp


diff --git a/engines/grim/imuse/imuse.cpp b/engines/grim/imuse/imuse.cpp
index df3201bfe22..6de967771b1 100644
--- a/engines/grim/imuse/imuse.cpp
+++ b/engines/grim/imuse/imuse.cpp
@@ -220,7 +220,6 @@ void Imuse::callback() {
 				if (track->volFadeStep < 0) {
 					if (track->vol > track->volFadeDest) {
 						track->vol += track->volFadeStep;
-						//warning("fade: %d", track->vol);
 						if (track->vol < track->volFadeDest) {
 							track->vol = track->volFadeDest;
 							track->volFadeUsed = false;
@@ -234,7 +233,6 @@ void Imuse::callback() {
 				} else if (track->volFadeStep > 0) {
 					if (track->vol < track->volFadeDest) {
 						track->vol += track->volFadeStep;
-						//warning("fade: %d", track->vol);
 						if (track->vol > track->volFadeDest) {
 							track->vol = track->volFadeDest;
 							track->volFadeUsed = false;
diff --git a/engines/grim/imuse/imuse_track.cpp b/engines/grim/imuse/imuse_track.cpp
index fd466e5a51a..f9d6de1949f 100644
--- a/engines/grim/imuse/imuse_track.cpp
+++ b/engines/grim/imuse/imuse_track.cpp
@@ -40,7 +40,7 @@ int Imuse::allocSlot(int priority) {
 	}
 
 	if (trackId == -1) {
-		warning("Imuse::startSound(): All slots are full");
+		Debug::warning(Debug::Sound, "Imuse::startSound(): All slots are full");
 		for (l = 0; l < MAX_IMUSE_TRACKS; l++) {
 			Track *track = _track[l];
 			if (track->used && !track->toBeRemoved &&
@@ -117,7 +117,7 @@ bool Imuse::startSound(const char *soundName, int volGroupId, int hookId, int vo
 
 	int l = allocSlot(priority);
 	if (l == -1) {
-		warning("Imuse::startSound() Can't start sound - no free slots");
+		Debug::warning(Debug::Sound, "Imuse::startSound() Can't start sound - no free slots");
 		return false;
 	}
 
@@ -192,7 +192,7 @@ void Imuse::setPriority(const char *soundName, int priority) {
 	changeTrack = findTrack(soundName);
 	// Check to make sure we found the track
 	if (changeTrack == nullptr) {
-		warning("Unable to find track '%s' to change priority", soundName);
+		Debug::warning(Debug::Sound, "Unable to find track '%s' to change priority", soundName);
 		return;
 	}
 	changeTrack->priority = priority;
@@ -204,7 +204,7 @@ void Imuse::setVolume(const char *soundName, int volume) {
 
 	changeTrack = findTrack(soundName);
 	if (changeTrack == nullptr) {
-		warning("Unable to find track '%s' to change volume", soundName);
+		Debug::warning(Debug::Sound, "Unable to find track '%s' to change volume", soundName);
 		return;
 	}
 	changeTrack->vol = volume * 1000;
@@ -216,7 +216,7 @@ void Imuse::setPan(const char *soundName, int pan) {
 
 	changeTrack = findTrack(soundName);
 	if (changeTrack == nullptr) {
-		warning("Unable to find track '%s' to change pan", soundName);
+		Debug::warning(Debug::Sound, "Unable to find track '%s' to change pan", soundName);
 		return;
 	}
 	changeTrack->pan = pan * 1000;
@@ -228,7 +228,7 @@ int Imuse::getVolume(const char *soundName) {
 
 	getTrack = findTrack(soundName);
 	if (getTrack == nullptr) {
-		warning("Unable to find track '%s' to get volume", soundName);
+		Debug::warning(Debug::Sound, "Unable to find track '%s' to get volume", soundName);
 		return 0;
 	}
 	return getTrack->vol / 1000;
@@ -240,7 +240,7 @@ void Imuse::setHookId(const char *soundName, int hookId) {
 
 	changeTrack = findTrack(soundName);
 	if (changeTrack == nullptr) {
-		warning("Unable to find track '%s' to change hook id", soundName);
+		Debug::warning(Debug::Sound, "Unable to find track '%s' to change hook id", soundName);
 		return;
 	}
 	changeTrack->curHookId = hookId;
@@ -270,7 +270,7 @@ void Imuse::selectVolumeGroup(const char *soundName, int volGroupId) {
 
 	changeTrack = findTrack(soundName);
 	if (changeTrack == nullptr) {
-		warning("Unable to find track '%s' to change volume group id", soundName);
+		Debug::warning(Debug::Sound, "Unable to find track '%s' to change volume group id", soundName);
 		return;
 	}
 	changeTrack->volGroupId = volGroupId;
@@ -282,7 +282,7 @@ void Imuse::setFadeVolume(const char *soundName, int destVolume, int duration) {
 
 	changeTrack = findTrack(soundName);
 	if (changeTrack == nullptr) {
-		warning("Unable to find track '%s' to change fade volume", soundName);
+		Debug::warning(Debug::Sound, "Unable to find track '%s' to change fade volume", soundName);
 		return;
 	}
 	changeTrack->volFadeDelay = duration;
@@ -297,7 +297,7 @@ void Imuse::setFadePan(const char *soundName, int destPan, int duration) {
 
 	changeTrack = findTrack(soundName);
 	if (changeTrack == nullptr) {
-		warning("Unable to find track '%s' to change fade pan", soundName);
+		Debug::warning(Debug::Sound, "Unable to find track '%s' to change fade pan", soundName);
 		return;
 	}
 	changeTrack->panFadeDelay = duration;




More information about the Scummvm-git-logs mailing list