[Scummvm-cvs-logs] scummvm master -> 5e7e67beb97aebe05c254327fd31ba1e8fc3187a

Strangerke Strangerke at scummvm.org
Mon Aug 12 08:18:32 CEST 2013


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:
5e7e67beb9 MORTEVIELLE: Improve sound support


Commit: 5e7e67beb97aebe05c254327fd31ba1e8fc3187a
    https://github.com/scummvm/scummvm/commit/5e7e67beb97aebe05c254327fd31ba1e8fc3187a
Author: Strangerke (strangerke at scummvm.org)
Date: 2013-08-11T23:17:10-07:00

Commit Message:
MORTEVIELLE: Improve sound support

Changed paths:
    engines/mortevielle/sound.cpp



diff --git a/engines/mortevielle/sound.cpp b/engines/mortevielle/sound.cpp
index 45f91ab..30dc4ce 100644
--- a/engines/mortevielle/sound.cpp
+++ b/engines/mortevielle/sound.cpp
@@ -218,6 +218,7 @@ void SoundManager::litph(tablint &t, int typ, int tempo) {
 					_audioStream->queueBuffer(&_ambiantNoiseBuf[ambiantNoiseAdr[val * 2]], ambiantNoiseAdr[(val * 2) + 1] - ambiantNoiseAdr[(val * 2)], DisposeAfterUse::NO, Audio::FLAG_UNSIGNED);
 				}
 			}
+			i++;
 			break;
 			}
 		case 2: {
@@ -240,16 +241,28 @@ void SoundManager::litph(tablint &t, int typ, int tempo) {
 			break;
 		case 6:
 			warning("TODO: pari2");
+			i += 2;
 			break;
 		default:
+			static byte emptyBuf[19] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 			if (idx == 62)
 				warning("TODO: blab");
-			else if (idx == 35) {
+			else if (idx == 32) {
+				if (!_audioStream)
+					_audioStream = Audio::makeQueuingAudioStream(freq, false);
+				_audioStream->queueBuffer(emptyBuf, 19, DisposeAfterUse::NO, Audio::FLAG_UNSIGNED);
+			} else if (idx == 35) {
 				if (i < _ptr_oct)
-					warning("unexpected 35");
+					warning("unexpected 35 - stop the buffering");
 				i = _ptr_oct;
-			} else
-				warning("Other code: %d", idx);
+			} else if (idx == 46) {
+				if (!_audioStream)
+					_audioStream = Audio::makeQueuingAudioStream(freq, false);
+				for (int i = 0; i < 10; i++)
+					_audioStream->queueBuffer(emptyBuf, 19, DisposeAfterUse::NO, Audio::FLAG_UNSIGNED);
+			} else {
+				warning("Other code: %d - %d %d", idx, _troctBuf[i], _troctBuf[i + 1]);
+			}
 			break;
 		}
 	}
@@ -364,9 +377,10 @@ void SoundManager::trait_car() {
 
 	switch (_queue[1]._code) {
 	case 9:
-		if (_queue[1]._val != (int)'#')
+		if (_queue[1]._val != (int)'#') {
 			for (i = 0; i <= _queue[1]._rep; ++i)
 				entroct(_queue[1]._val);
+		}
 		break;
 	case 5:
 	case 6:
@@ -703,6 +717,20 @@ void SoundManager::handlePhoneme() {
 	moveQueue();
 	trait_car();
 	entroct((int)'#');
+
+#ifdef DEBUG
+	warning("---");
+	for (int i = 0; i < _ptr_oct; ) {
+		if ((_troctBuf[i] == 32) || (_troctBuf[i] == 35) || (_troctBuf[i] == 46)) {
+			warning("%d", _troctBuf[i]);
+			i++;
+		} else {
+			warning("%d %d %d", _troctBuf[i], _troctBuf[i + 1], _troctBuf[i + 1]);
+			i += 3;
+		}
+	}
+	warning("---");
+#endif
 }
 
 /**






More information about the Scummvm-git-logs mailing list