aboutsummaryrefslogtreecommitdiffstats
path: root/distrib
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2009-08-21 03:05:29 +0200
committerDavid 'Digit' Turner <digit@google.com>2009-08-21 03:05:29 +0200
commit5ad9febb1c7e08fe24413f9bd04f30d92b4cfa3a (patch)
tree97cb688ef7727ee37a721596eee3af9b8c98d0cc /distrib
parente4c5bfae9beeb0bbb0e525e4700ae4be9971676f (diff)
downloadexternal_qemu-5ad9febb1c7e08fe24413f9bd04f30d92b4cfa3a.zip
external_qemu-5ad9febb1c7e08fe24413f9bd04f30d92b4cfa3a.tar.gz
external_qemu-5ad9febb1c7e08fe24413f9bd04f30d92b4cfa3a.tar.bz2
Fix EsounD audio backend and bump version number.
The original esdaudio.c file from upstream contains a nasty race condition that can be triggered when the emulator exists while the audio record thread is in a blocking read() call. In this case, exit() will end up calling esd_fini_in which will try to pthread_join() the blocked thread, resulting in a dead-lock. This change just gets rid of the helper threads and just performs audio output and input in the main event loop, avoiding blocking i/o completely. I haven't experienced any difference compared to the original one, be it in audio lag or CPU usage when playing a simple MP3 file in the emulated system. The change also updates the update-audio.sh script since we don't store our sources in p4 anymore. A small fix in common.sh deals removes an obsolete special case that is not needed anymore when determining the location of the host prebuilt binaries. The version number is also bumped to 1.12 and CHANGES.TXT updated accordingly.
Diffstat (limited to 'distrib')
-rwxr-xr-xdistrib/update-audio.sh23
1 files changed, 11 insertions, 12 deletions
diff --git a/distrib/update-audio.sh b/distrib/update-audio.sh
index 56bada2..79d1650 100755
--- a/distrib/update-audio.sh
+++ b/distrib/update-audio.sh
@@ -8,16 +8,16 @@
# assumes this script is located in the 'distrib' sub-directory
cd `dirname $0`
cd ..
+. android/build/common.sh
-locate_depot_files ()
-{
- root=$(p4 where $1) || (
- echo "you need to map $1 into your workspace to build an emulator source release package"
- exit 3
- )
- root=$(echo $root | cut -d" " -f3 | sed -e "s%/\.\.\.%%")
- echo $root
-}
+check_android_build
+if [ $IN_ANDROID_BUILD != yes ] ; then
+ echo "Sorry, this script can only be run from a full Android build tree"
+ exit 1
+fi
+
+force_32bit_binaries
+locate_android_prebuilt
# find the prebuilt directory
OS=`uname -s`
@@ -87,9 +87,8 @@ $GNUMAKE $source BUILD_QEMU_AUDIO_LIB=true || (echo "could not build the audio l
# now do a p4 edit, a copy and ask for submission
#
-TARGET=$PREBUILT/emulator/libqemu-audio.a
+TARGET=$ANDROID_PREBUILT/emulator/libqemu-audio.a
-p4 edit $TARGET || (echo "could not p4 edit $TARGET" && exit 3)
cp -f $source $TARGET
-echo "please do: p4 submit $TARGET"
+echo "ok, file copied to $TARGET"