aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan.akhgari@gmail.com>2013-04-06 12:36:08 -0700
committerEhsan Akhgari <ehsan.akhgari@gmail.com>2013-04-06 12:36:08 -0700
commit350a2b08b6b19e57abc57e6ae607edae97a66fa8 (patch)
tree5de65f8e9c83101a2444449d755a71785bb76436 /tests
parent75c7e03bc5e282ee3969924c225a0e4545d5258b (diff)
parent6512c70b5487a9328e19a64f8118529eb4f77b55 (diff)
Merge pull request #1010 from azmeuk/openal
Minor OpenAL improvements.
Diffstat (limited to 'tests')
-rw-r--r--tests/freealut/AUTHORS14
-rw-r--r--tests/freealut/CMakeLists.txt208
-rw-r--r--tests/freealut/COPYING483
-rw-r--r--tests/freealut/ChangeLog786
-rw-r--r--tests/freealut/INSTALL236
-rw-r--r--tests/freealut/Makefile.am57
-rw-r--r--tests/freealut/Makefile.in690
-rw-r--r--tests/freealut/NEWS34
-rw-r--r--tests/freealut/README188
-rw-r--r--tests/freealut/aclocal.m46886
-rw-r--r--tests/freealut/admin/CMakeModules/FindCompilerAttribute.cmake11
-rw-r--r--tests/freealut/admin/CMakeModules/FindCompilerFlagsSet.cmake34
-rw-r--r--tests/freealut/admin/CMakeModules/FindCompilerVisibility.cmake37
-rw-r--r--tests/freealut/admin/CMakeModules/FindConfigHelper.cmake22
-rw-r--r--tests/freealut/admin/CMakeModules/FindSleepFunction.cmake40
-rw-r--r--tests/freealut/admin/Makefile.am2
-rw-r--r--tests/freealut/admin/Makefile.in484
-rw-r--r--tests/freealut/admin/RPM/freealut.spec103
-rw-r--r--tests/freealut/admin/RPM/freealut.spec.in103
-rw-r--r--tests/freealut/admin/VisualStudio6/alut.dsw59
-rw-r--r--tests/freealut/admin/VisualStudio6/alut/alut.dsp150
-rw-r--r--tests/freealut/admin/VisualStudio6/hello_world/hello_world.dsp93
-rw-r--r--tests/freealut/admin/VisualStudio6/playfile/playfile.dsp93
-rw-r--r--tests/freealut/admin/VisualStudioDotNET/alut.sln35
-rw-r--r--tests/freealut/admin/VisualStudioDotNET/alut/alut.vcproj161
-rw-r--r--tests/freealut/admin/VisualStudioDotNET/hello_world/hello_world.vcproj118
-rw-r--r--tests/freealut/admin/VisualStudioDotNET/playfile/playfile.vcproj118
-rw-r--r--tests/freealut/admin/autotools/.indent.pro46
-rwxr-xr-xtests/freealut/admin/autotools/compile142
-rwxr-xr-xtests/freealut/admin/autotools/config.guess1469
-rwxr-xr-xtests/freealut/admin/autotools/config.sub1563
-rwxr-xr-xtests/freealut/admin/autotools/depcomp529
-rwxr-xr-xtests/freealut/admin/autotools/install-sh323
-rw-r--r--tests/freealut/admin/autotools/ltmain.sh6460
-rw-r--r--tests/freealut/admin/autotools/m4/alut_c__attribute.m416
-rw-r--r--tests/freealut/admin/autotools/m4/alut_check_cflags_wall.m4120
-rw-r--r--tests/freealut/admin/autotools/m4/alut_check_flag.m428
-rw-r--r--tests/freealut/admin/autotools/m4/alut_check_func.m415
-rw-r--r--tests/freealut/admin/autotools/m4/alut_eval_stderr.m411
-rwxr-xr-xtests/freealut/admin/autotools/missing357
-rw-r--r--tests/freealut/admin/pkgconfig/Makefile.am3
-rw-r--r--tests/freealut/admin/pkgconfig/Makefile.in388
-rw-r--r--tests/freealut/admin/pkgconfig/freealut-config.in174
-rw-r--r--tests/freealut/admin/pkgconfig/freealut.pc.in11
-rwxr-xr-xtests/freealut/autogen.sh2
-rw-r--r--tests/freealut/config.h.in116
-rwxr-xr-xtests/freealut/configure22839
-rw-r--r--tests/freealut/configure.ac219
-rw-r--r--tests/freealut/doc/alut.css45
-rw-r--r--tests/freealut/doc/alut.html1399
-rw-r--r--tests/freealut/examples/Makefile.am8
-rw-r--r--tests/freealut/examples/Makefile.in451
-rw-r--r--tests/freealut/examples/hello_world.c23
-rw-r--r--tests/freealut/examples/playfile.c81
-rw-r--r--tests/freealut/include/AL/alut.h133
-rw-r--r--tests/freealut/include/Makefile.am1
-rw-r--r--tests/freealut/include/Makefile.in408
-rw-r--r--tests/freealut/src/Makefile.am32
-rw-r--r--tests/freealut/src/Makefile.in584
-rw-r--r--tests/freealut/src/README13
-rw-r--r--tests/freealut/src/alutBufferData.c136
-rw-r--r--tests/freealut/src/alutCodec.c119
-rw-r--r--tests/freealut/src/alutError.c92
-rw-r--r--tests/freealut/src/alutInit.c154
-rw-r--r--tests/freealut/src/alutInputStream.c236
-rw-r--r--tests/freealut/src/alutInternal.h121
-rw-r--r--tests/freealut/src/alutLoader.c493
-rw-r--r--tests/freealut/src/alutOutputStream.c89
-rw-r--r--tests/freealut/src/alutUtil.c141
-rw-r--r--tests/freealut/src/alutVersion.c11
-rw-r--r--tests/freealut/src/alutWaveform.c912
-rw-r--r--tests/freealut/src/helloworld.wavbin0 -> 65462 bytes
-rw-r--r--tests/freealut/test_suite/Makefile.am27
-rw-r--r--tests/freealut/test_suite/Makefile.in513
-rw-r--r--tests/freealut/test_suite/README33
-rw-r--r--tests/freealut/test_suite/file1.wavbin0 -> 6246 bytes
-rw-r--r--tests/freealut/test_suite/file2.aubin0 -> 6400 bytes
-rw-r--r--tests/freealut/test_suite/file3.raw1
-rw-r--r--tests/freealut/test_suite/test_errorstuff.c23
-rw-r--r--tests/freealut/test_suite/test_fileloader.c74
-rw-r--r--tests/freealut/test_suite/test_memoryloader.c98
-rw-r--r--tests/freealut/test_suite/test_retrostuff.c79
-rw-r--r--tests/freealut/test_suite/test_version.c36
-rw-r--r--tests/freealut/test_suite/test_waveforms.c31
-rwxr-xr-xtests/runner.py6
85 files changed, 52679 insertions, 0 deletions
diff --git a/tests/freealut/AUTHORS b/tests/freealut/AUTHORS
new file mode 100644
index 00000000..92890c93
--- /dev/null
+++ b/tests/freealut/AUTHORS
@@ -0,0 +1,14 @@
+Steve Baker <sjbaker1@airmail.net>
+ Initial version of the sources and the specification
+
+Sven Panne <sven.panne@aedion.de>
+ Build system
+ General hacking
+ Specification maintenance
+
+Erik Hofman <erik@ehofman.com>
+ Fixes and additions to the sound file loaders
+ playfile demo
+
+Prakash Punnoor <prakash@punnoor.de>
+ CMake build system
diff --git a/tests/freealut/CMakeLists.txt b/tests/freealut/CMakeLists.txt
new file mode 100644
index 00000000..640f35bf
--- /dev/null
+++ b/tests/freealut/CMakeLists.txt
@@ -0,0 +1,208 @@
+# cmake project file by Prakash Punnoor
+CMAKE_MINIMUM_REQUIRED(VERSION 2.0)
+
+SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/admin/CMakeModules")
+PROJECT(Alut C)
+SET(PACKAGE "freealut")
+SET(PACKAGE_TARNAME "freealut")
+SET(PACKAGE_NAME "freealut library")
+SET(PACKAGE_MAJOR_VERSION "1")
+SET(PACKAGE_MINOR_VERSION "0")
+SET(PACKAGE_BUILD_VERSION "1")
+SET(PACKAGE_VERSION "${PACKAGE_MAJOR_VERSION}.${PACKAGE_MINOR_VERSION}.${PACKAGE_BUILD_VERSION}")
+SET(MAJOR_VERSION "0")
+SET(MINOR_VERSION "0")
+SET(BUILD_VERSION "0")
+SET(VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${BUILD_VERSION}")
+SET(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+SET(PACKAGE_BUGREPORT "openal-devel@opensource.creative.com")
+SET(OPERATING_SYSTEM "${CMAKE_SYSTEM_NAME}")
+
+INCLUDE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
+INCLUDE(${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake)
+INCLUDE(${CMAKE_ROOT}/Modules/CheckCSourceCompiles.cmake)
+
+FIND_PACKAGE(ConfigHelper)
+
+SET(ALUT_SOURCES src/alutBufferData.c
+ src/alutCodec.c
+ src/alutError.c
+ src/alutInit.c
+ src/alutInputStream.c
+ src/alutInternal.h
+ src/alutLoader.c
+ src/alutOutputStream.c
+ src/alutUtil.c
+ src/alutVersion.c
+ src/alutWaveform.c)
+
+INCLUDE_DIRECTORIES(${Alut_SOURCE_DIR}/include)
+
+SET(ADD_WFLAGS "")
+SET(ADD_CFLAGS "")
+SET(ADD_LDFLAGS "")
+SET(ADD_LIBS "")
+
+OPTION(BUILD_STATIC "build static library too" ON)
+OPTION(PROFILE "enable profile" OFF)
+OPTION(OPTIMIZATION "enable optimization" ON)
+OPTION(WARNINGS "enable warnings" ON)
+IF(WARNINGS)
+ OPTION(MORE_WARNINGS "enable more warnings" OFF)
+ OPTION(USE_WERROR "enable fail on all warning" OFF)
+ENDIF(WARNINGS)
+
+#want test-suit?
+OPTION(BUILD_TESTS "build the test-suite" OFF)
+
+
+ADD_DEFINE(ALUT_BUILD_LIBRARY)
+# We could possibly need struct timespec and random(), which are not ANSI.
+# Define to 500 if Single Unix conformance is wanted, 600 for sixth revision.
+ADD_DEFINE("_XOPEN_SOURCE 500")
+# We might need nanosleep, which is a POSIX IEEE Std 1003.1b-1993 feature.
+# Define to the POSIX version that should be used.
+ADD_DEFINE("_POSIX_C_SOURCE 199309")
+# Without __NO_CTYPE tolower and friends are macros which introduce a GLIBC 2.3
+# dependency. By defining this identifier we are currently backwards compatible
+# to GLIBC 2.1.3, which is a good thing. In addition, the macros lead to code
+# which triggers warnings with -Wunreachable-code.
+ADD_DEFINE("__NO_CTYPE 1")
+
+ADD_DEFINITIONS(-DHAVE_CONFIG_H)
+ADD_DEFINITIONS(-DNDEBUG)
+
+FIND_LIBRARY(OPENAL_LIB NAMES openal openal32 PATHS /usr/lib /usr/local/lib ${OPENAL_LIB_DIR})
+IF(OPENAL_LIB MATCHES "NOTFOUND")
+ MESSAGE(FATAL_ERROR "OpenAL not installed, cannot build alut - aborting.")
+ENDIF(OPENAL_LIB MATCHES "NOTFOUND")
+
+IF(UNIX)
+ SET(ADD_LIBS ${ADD_LIBS} m)
+ENDIF(UNIX)
+
+SET(CMAKE_REQUIRED_INCLUDES ${OPENAL_INCLUDE_DIR})
+CHECK_INCLUDE_FILES("AL/alc.h;AL/al.h" AL_HEADERS)
+IF(NOT AL_HEADERS)
+ MESSAGE(FATAL_ERROR "OpenAL header files not found - aborting.")
+ENDIF(NOT AL_HEADERS)
+
+IF(DEFINED OPENAL_INCLUDE_DIR)
+ INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIR})
+ENDIF(DEFINED OPENAL_INCLUDE_DIR)
+
+FIND_PACKAGE(SleepFunction)
+
+CHECK_INCLUDE_FILE_DEFINE(stdint.h HAVE_STDINT_H)
+
+IF(WIN32)
+ CHECK_INCLUDE_FILE_DEFINE(basetsd.h HAVE_BASETSD_H)
+ENDIF(WIN32)
+
+# FindSleepFunction will check for unistd.h if time.h wasn't found
+IF(HAVE_TIME_H)
+ CHECK_INCLUDE_FILE_DEFINE(unistd.h HAVE_UNISTD_H)
+ENDIF(HAVE_TIME_H)
+
+IF(HAVE_UNISTD_H)
+ CHECK_FUNCTION_DEFINE("
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+ " stat "(\"\", (struct stat*)0)" HAVE_STAT)
+ENDIF(HAVE_UNISTD_H)
+
+IF(NOT HAVE_STAT)
+ CHECK_FUNCTION_DEFINE("
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ " _stat "(\"\", (struct _stat*)0)" HAVE__STAT)
+ENDIF(NOT HAVE_STAT)
+
+# compiler specific settings
+FIND_PACKAGE(CompilerAttribute)
+FIND_PACKAGE(CompilerVisibility)
+FIND_PACKAGE(CompilerFlagsSet)
+
+GENERATE_CONFIG_H()
+
+SET(CMAKE_C_FLAGS "${ADD_WFLAGS} ${ADD_CFLAGS} ${CMAKE_C_FLAGS}")
+SET(CMAKE_CXX_FLAGS "${ADD_CFLAGS} ${CMAKE_CXX_FLAGS}")
+SET(CMAKE_SHARED_LINKER_FLAGS "${ADD_LDFLAGS} ${CMAKE_SHARED_LINKER_FLAGS}")
+SET(CMAKE_MODULE_LINKER_FLAGS "${ADD_LDFLAGS} ${CMAKE_MODULE_LINKER_FLAGS}")
+
+IF(BUILD_STATIC)
+ # we can't create a static library with the same name
+ # as the shared one, so we copy it over after creation
+ ADD_LIBRARY(alut_static STATIC ${ALUT_SOURCES})
+ TARGET_LINK_LIBRARIES(alut_static ${OPENAL_LIB} ${ADD_LIBS})
+ IF(NOT WIN32)
+ ADD_CUSTOM_COMMAND(
+ TARGET alut_static
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy
+ ${CMAKE_BINARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}alut_static${CMAKE_STATIC_LIBRARY_SUFFIX}
+ ${CMAKE_BINARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}alut${CMAKE_STATIC_LIBRARY_SUFFIX})
+ INSTALL_FILES(/lib FILES ${CMAKE_STATIC_LIBRARY_PREFIX}alut${CMAKE_STATIC_LIBRARY_SUFFIX})
+ ENDIF(NOT WIN32)
+ENDIF(BUILD_STATIC)
+
+
+ADD_LIBRARY(alut SHARED ${ALUT_SOURCES})
+SET_TARGET_PROPERTIES(alut PROPERTIES VERSION ${VERSION} SOVERSION ${MAJOR_VERSION})
+TARGET_LINK_LIBRARIES(alut ${OPENAL_LIB} ${ADD_LIBS})
+
+INSTALL_TARGETS(/lib alut)
+INSTALL_FILES(/include/AL FILES include/AL/alut.h)
+
+# needed for openal.pc.in and openal-config.in
+SET(prefix ${CMAKE_INSTALL_PREFIX})
+SET(exec_prefix "\${prefix}")
+SET(libdir "\${exec_prefix}/lib")
+SET(bindir "\${exec_prefix}/bin")
+SET(includedir "\${prefix}/include")
+SET(requirements "")
+# static linking dependecies are broken, so pthread isn't needed currently
+SET(PTHREAD_LIBS ${CMAKE_THREAD_LIBS_INIT})
+
+CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/admin/pkgconfig/freealut.pc.in
+ ${CMAKE_BINARY_DIR}/admin/pkgconfig/freealut.pc @ONLY)
+CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/admin/pkgconfig/freealut-config.in
+ ${CMAKE_BINARY_DIR}/admin/pkgconfig/freealut-config @ONLY)
+INSTALL_PROGRAMS(/bin FILES admin/pkgconfig/freealut-config)
+INSTALL_FILES(/lib/pkgconfig FILES admin/pkgconfig/freealut.pc)
+
+
+# test-suite
+IF(BUILD_TESTS)
+ # examples
+ ADD_EXECUTABLE(hello_world examples/hello_world.c)
+ TARGET_LINK_LIBRARIES(hello_world ${OPENAL_LIB} ${ADD_LIBS} alut)
+
+ ADD_EXECUTABLE(playfile examples/playfile.c)
+ TARGET_LINK_LIBRARIES(playfile ${OPENAL_LIB} ${ADD_LIBS} alut)
+
+
+ SET(TESTS errorstuff
+ fileloader
+ memoryloader
+ version
+ waveforms)
+
+ FOREACH(TEST ${TESTS})
+ SET(TEST_SRC test_suite/test_${TEST}.c)
+ SET_SOURCE_FILES_PROPERTIES(${TEST_SRC} PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations")
+ ADD_EXECUTABLE(test_${TEST} ${TEST_SRC})
+ TARGET_LINK_LIBRARIES(test_${TEST} ${OPENAL_LIB} ${ADD_LIBS} alut)
+ ENDFOREACH(TEST)
+
+ #copy over testdata, so test-suite can be used in binary dir
+ SET(TESTDATA file1.wav
+ file2.au
+ file3.raw)
+
+ FOREACH(TESTDATUM ${TESTDATA})
+ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/test_suite/${TESTDATUM} ${CMAKE_BINARY_DIR}/${TESTDATUM} COPYONLY)
+ ENDFOREACH(TESTDATUM)
+ENDIF(BUILD_TESTS)
diff --git a/tests/freealut/COPYING b/tests/freealut/COPYING
new file mode 100644
index 00000000..e463f462
--- /dev/null
+++ b/tests/freealut/COPYING
@@ -0,0 +1,483 @@
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries t