1#!/bin/bash 2# 3# Run samples from this directory 4# 5 6if [ -z "$ANDROID_BUILD_TOP" ]; then 7 echo "Android build environment not set" 8 exit -1 9fi 10 11# ensure we have mm 12. $ANDROID_BUILD_TOP/build/envsetup.sh 13 14mm 15 16echo "waiting for device" 17 18adb root && adb wait-for-device remount 19 20echo "========================================" 21echo "testing soundpool_stress" 22uidir="/product/media/audio/notifications" 23adb 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. 26adb 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. 29adb 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. 33adb shell /system/bin/soundpool_stress -i 1 -l -1 -p 1 -t 4 $uidir/*.ogg $uidir/*.ogg 34