aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeeraj Kumar2010-08-03 20:26:28 +0000
committerNeeraj Kumar2010-08-03 20:26:28 +0000
commitfee1bb28bd54f77edbe1e85135384ba9d1af9fa2 (patch)
tree7e760175217ce3cabf858ad11061a43da74851e2
parent9dbe6fdb078809fc156974ea242bd8ccfa513593 (diff)
downloadscummvm-rg350-fee1bb28bd54f77edbe1e85135384ba9d1af9fa2.tar.gz
scummvm-rg350-fee1bb28bd54f77edbe1e85135384ba9d1af9fa2.tar.bz2
scummvm-rg350-fee1bb28bd54f77edbe1e85135384ba9d1af9fa2.zip
TESTBED: added audiocd test sound tracks as the testbed engine data
svn-id: r51713
-rwxr-xr-xdists/engine-data/create-testbed-data.sh6
-rwxr-xr-xdists/engine-data/testbed-audiocd-files/track01.mp3bin0 -> 15300 bytes
-rwxr-xr-xdists/engine-data/testbed-audiocd-files/track02.mp3bin0 -> 15927 bytes
-rwxr-xr-xdists/engine-data/testbed-audiocd-files/track03.mp3bin0 -> 11389 bytes
-rwxr-xr-xdists/engine-data/testbed-audiocd-files/track04.mp3bin0 -> 16136 bytes
-rw-r--r--engines/testbed/sound.cpp8
6 files changed, 11 insertions, 3 deletions
diff --git a/dists/engine-data/create-testbed-data.sh b/dists/engine-data/create-testbed-data.sh
index 1ed6c733b5..0200803caa 100755
--- a/dists/engine-data/create-testbed-data.sh
+++ b/dists/engine-data/create-testbed-data.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Create the directory structure
-# Avoided bash shortcuts/ file-seperators in interest of portability
+# Avoided bash shortcuts / file-seperators in interest of portability
if [ -e testbed ]; then
echo "Game-data already present as testbed/"
@@ -45,4 +45,8 @@ cd ..
# back to the top
cd ..
+
+# move the audiocd data to newly created directory
+cp -r testbed-audiocd-files testbed/audiocd-files
+
echo "Game data created"
diff --git a/dists/engine-data/testbed-audiocd-files/track01.mp3 b/dists/engine-data/testbed-audiocd-files/track01.mp3
new file mode 100755
index 0000000000..53d057ee96
--- /dev/null
+++ b/dists/engine-data/testbed-audiocd-files/track01.mp3
Binary files differ
diff --git a/dists/engine-data/testbed-audiocd-files/track02.mp3 b/dists/engine-data/testbed-audiocd-files/track02.mp3
new file mode 100755
index 0000000000..daf8e4860d
--- /dev/null
+++ b/dists/engine-data/testbed-audiocd-files/track02.mp3
Binary files differ
diff --git a/dists/engine-data/testbed-audiocd-files/track03.mp3 b/dists/engine-data/testbed-audiocd-files/track03.mp3
new file mode 100755
index 0000000000..1ef385d640
--- /dev/null
+++ b/dists/engine-data/testbed-audiocd-files/track03.mp3
Binary files differ
diff --git a/dists/engine-data/testbed-audiocd-files/track04.mp3 b/dists/engine-data/testbed-audiocd-files/track04.mp3
new file mode 100755
index 0000000000..7607087f08
--- /dev/null
+++ b/dists/engine-data/testbed-audiocd-files/track04.mp3
Binary files differ
diff --git a/engines/testbed/sound.cpp b/engines/testbed/sound.cpp
index 73f92f5d8f..c2e0d434c0 100644
--- a/engines/testbed/sound.cpp
+++ b/engines/testbed/sound.cpp
@@ -187,6 +187,10 @@ bool SoundSubsystem::audiocdOutput() {
Common::Point pt(0, 100);
Testsuite::writeOnScreen("Playing the tracks of testCD in order i.e 1-2-3-last", pt);
+ // Make audio-files discoverable
+ Common::FSNode gameRoot(ConfMan.get("path"));
+ SearchMan.addSubDirectoryMatching(gameRoot, "audiocd-files");
+
// Play all tracks
for (int i = 1; i < 5; i++) {
AudioCD.play(i, 1, 0, 0);
@@ -199,7 +203,7 @@ bool SoundSubsystem::audiocdOutput() {
Testsuite::clearScreen();
if (Testsuite::handleInteractiveInput("Were all the tracks played in order i.e 1-2-3-last ?", "Yes", "No", kOptionRight)) {
- Testsuite::logDetailedPrintf("Error! Error in AudioCD.play()\n");
+ Testsuite::logPrintf("Error! Error in AudioCD.play() or probably sound files were not detected, try -d1 (debuglevel 1)\n");
passed = false;
}
@@ -209,7 +213,7 @@ bool SoundSubsystem::audiocdOutput() {
SoundSubsystemTestSuite::SoundSubsystemTestSuite() {
addTest("SimpleBeeps", &SoundSubsystem::playBeeps, true);
addTest("MixSounds", &SoundSubsystem::mixSounds, true);
- addTest("AudioCD outputs", &SoundSubsystem::audiocdOutput, true);
+ addTest("AudiocdOutput", &SoundSubsystem::audiocdOutput, true);
}
} // End of namespace Testbed