Mercurial > almixer_isolated
annotate cmake_uninstall.cmake.in @ 48:00b770b0d2aa
Workaround: There is a terrible OpenAL regression bug in iOS 5 dealing with streaming sources. alSourcei(source_id, AL_BUFFER, AL_NONE); fails to clear queued buffer queues on a streaming source. The workaround involves manually dequeuing the individual buffers before calling alSourcei(source_id, AL_BUFFER, AL_NONE);. But there is an additional race condition bug where the unqueue fails to take, so the included workaround keeps looping until the buffers finally report as cleared.
The current check is compiled only for iOS and does a runtime version check against CoreFoundation version 674.0. When Apple finally ships a fix, this fix should be amended to not run on fixed versions.
Also ironically, it was originally the Apple Mac OpenAL implementation that had a problem with buffer unqueuing which ultimately led to the use of alSourcei(source_id, AL_BUFFER, AL_NONE); This is another reason the workaround is only constrained to iOS.
In some cases I've seen, the buffer unqueue also triggers OpenAL errors, however, the current workaround seems to usually avoid those OpenAL errors (even though the buffers fail to unqueue some times). The 20ms sleep seems to avoid the race condition entirely, but when it doesn't, the sleep seems to do something that magically avoids tripping OpenAL errors.
author | Eric Wing <ewing@anscamobile.com> |
---|---|
date | Fri, 30 Sep 2011 16:44:08 -0700 |
parents | a929285e1db0 |
children |
rev | line source |
---|---|
3
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
1 IF(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
2 MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_BINARY_DIR@/install_manifest.txt\"") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
3 ENDIF(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
4 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
5 FILE(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
6 STRING(REGEX REPLACE "\n" ";" files "${files}") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
7 FOREACH(file ${files}) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
8 MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
9 # IF(EXISTS "$ENV{DESTDIR}${file}") # Problem: EXISTS doesn't detect symbolic links |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
10 EXEC_PROGRAM( |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
11 "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
12 OUTPUT_VARIABLE rm_out |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
13 RETURN_VALUE rm_retval |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
14 ) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
15 IF(NOT "${rm_retval}" STREQUAL 0) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
16 MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
17 ENDIF(NOT "${rm_retval}" STREQUAL 0) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
18 # ELSE(EXISTS "$ENV{DESTDIR}${file}") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
19 # MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
20 #ENDIF(EXISTS "$ENV{DESTDIR}${file}") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
21 ENDFOREACH(file) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
22 |