| 1 | #!/bin/bash |
| 2 | # |
| 3 | # Run samples from this directory |
| 4 | # |
| 5 | |
| 6 | if [ -z "$ANDROID_BUILD_TOP" ]; then |
| 7 | echo "Android build environment not set" |
| 8 | exit -1 |
| 9 | fi |
| 10 | |
| 11 | # ensure we have mm |
| 12 | . $ANDROID_BUILD_TOP/build/envsetup.sh |
| 13 | |
| 14 | mm |
| 15 | |
| 16 | echo "waiting for device" |
| 17 | |
| 18 | adb root && adb wait-for-device remount |
| 19 | |
| 20 | echo "========================================" |
| 21 | echo "testing soundpool_stress" |
| 22 | uidir="/product/media/audio/notifications" |
| 23 | adb push $OUT/system/bin/soundpool_stress /system/bin |
| 24 | |
| 25 | # test SoundPool playback of all the UI sound samples (loaded twice) looping 10s 1 thread. |
| 26 | adb shell /system/bin/soundpool_stress -l -1 $uidir/*.ogg $uidir/*.ogg |
| 27 | |
| 28 | # test SoundPool playback of all the UI sound samples (repeating 3 times) looping 10s 1 thread. |
| 29 | adb shell /system/bin/soundpool_stress -l 1 -r 3 $uidir/*.ogg |
| 30 | |
| 31 | # performance test SoundPool playback of all the UI sound samples (x2) |
| 32 | # 1 iterations, looping, 1 second playback, 4 threads. |
| 33 | adb shell /system/bin/soundpool_stress -i 1 -l -1 -p 1 -t 4 $uidir/*.ogg $uidir/*.ogg |