Compare commits

...

109 Commits

Author SHA1 Message Date
TDE Gitea 7b309ff9ba Reset submodule main/dependencies/arts/admin to latest HEAD 4 months ago
Slávek Banko b19700f158
Raise the minimum required version of CMake to 3.1. 5 months ago
Slávek Banko 63d8599496
Remove cmake submodule since it has now been replaced by cmake-trinity dependency. 12 months ago
TDE Gitea 5b8caa7acf Reset submodule main/dependencies/arts/cmake to latest HEAD 1 year ago
TDE Gitea 4090f43096 Reset submodule main/dependencies/arts/cmake to latest HEAD 1 year ago
Michele Calgaro 604602e427
Remove remaining 'register' instructions. 1 year ago
OBATA Akio d4ce37c4c1
Drop `unsigned long int` case for the first argment type of ioctl(2) 1 year ago
OBATA Akio 5fe464a02c
Port ioctl prototype check to CMake 1 year ago
Michele Calgaro dcc8590e35
Removed explicit usage of the 'register' keyword. 1 year ago
Michele Calgaro d44f5c0927
Removed .lsm files. lsm database is outdated and unmaintained. 1 year ago
TDE Gitea bd31afde5d Reset submodule main/dependencies/arts/cmake to latest HEAD 1 year ago
TDE Gitea 82d706f22b Reset submodule main/dependencies/arts/cmake to latest HEAD 1 year ago
TDE Gitea ad53c67681 Reset submodule main/dependencies/arts/admin to latest HEAD 1 year ago
TDE Gitea d79a95f27e Reset submodule main/dependencies/arts/cmake to latest HEAD 1 year ago
TDE Gitea c1012f90f4 Reset submodule main/dependencies/arts/cmake to latest HEAD 1 year ago
TDE Gitea 9b1a43311a Reset submodule main/dependencies/arts/admin to latest HEAD 1 year ago
TDE Gitea b823ecd315 Reset submodule main/dependencies/arts/cmake to latest HEAD 2 years ago
TDE Gitea ed28ccc110 Reset submodule main/dependencies/arts/admin to latest HEAD 2 years ago
TDE Gitea cacbd391b8 Reset submodule main/dependencies/arts/cmake to latest HEAD 2 years ago
TDE Gitea ae48a791dd Reset submodule main/dependencies/arts/admin to latest HEAD 2 years ago
TDE Gitea 8446cfda52 Reset submodule main/dependencies/arts/cmake to latest HEAD 2 years ago
TDE Gitea bbfbe544d5 Reset submodule main/dependencies/arts/admin to latest HEAD 2 years ago
TDE Gitea 27016d8169 Reset submodule main/dependencies/arts/cmake to latest HEAD 2 years ago
TDE Gitea 3129df528a Reset submodule main/dependencies/arts/cmake to latest HEAD 2 years ago
TDE Gitea 81c2ee5d19 Reset submodule main/dependencies/arts/cmake to latest HEAD 2 years ago
TDE Gitea a58dced1ae Reset submodule main/dependencies/arts/admin to latest HEAD 2 years ago
TDE Gitea cc8ed984e0 Reset submodule main/dependencies/arts/cmake to latest HEAD 2 years ago
TDE Gitea ac694797df Reset submodule main/dependencies/arts/cmake to latest HEAD 2 years ago
TDE Gitea 17d532f010 Reset submodule main/dependencies/arts/cmake to latest HEAD 2 years ago
TDE Gitea 407bb28baa Reset submodule main/dependencies/arts/cmake to latest HEAD 2 years ago
TDE Gitea bc36b0b8fa Reset submodule main/dependencies/arts/admin to latest HEAD 2 years ago
TDE Gitea a36b72e297 Reset submodule main/dependencies/arts/cmake to latest HEAD 2 years ago
TDE Gitea 0bbcc671e0 Reset submodule main/dependencies/arts/cmake to latest HEAD 2 years ago
TDE Gitea 495b23301e Reset submodule main/dependencies/arts/cmake to latest HEAD 2 years ago
TDE Gitea 77d7585097 Reset submodule main/dependencies/arts/cmake to latest HEAD 2 years ago
TDE Gitea a64ddfb7a8 Reset submodule main/dependencies/arts/cmake to latest HEAD 2 years ago
TDE Gitea 95ac0b49cb Reset submodule main/dependencies/arts/cmake to latest HEAD 2 years ago
TDE Gitea 437ba8ff12 Reset submodule main/dependencies/arts/cmake to latest HEAD 2 years ago
TDE Gitea f72c15f54f Reset submodule main/dependencies/arts/cmake to latest HEAD 2 years ago
TDE Gitea cdf6f220c6 Reset submodule main/dependencies/arts/cmake to latest HEAD 2 years ago
Slávek Banko d7162e7f69
Switch all submodules to https. 2 years ago
TDE Gitea 8d09ddce44 Reset submodule main/dependencies/arts/cmake to latest HEAD 3 years ago
TDE Gitea e07e11d885 Reset submodule main/dependencies/arts/cmake to latest HEAD 3 years ago
TDE Gitea 807672b74d Reset submodule main/dependencies/arts/cmake to latest HEAD 3 years ago
TDE Gitea 7094d8995d Reset submodule main/dependencies/arts/cmake to latest HEAD 3 years ago
TDE Gitea 3b11706fda Reset submodule main/dependencies/arts/admin to latest HEAD 3 years ago
TDE Gitea 72119120ce Reset submodule main/dependencies/arts/cmake to latest HEAD 3 years ago
Slávek Banko 35699680cb
Set default value of WITH_GCC_VISIBILITY to OFF, 3 years ago
Slávek Banko d2d841f600
Use common CMake tests. 3 years ago
TDE Gitea 3cdd2f592e Reset submodule main/dependencies/arts/cmake to latest HEAD 3 years ago
TDE Gitea fb534ecd3c Reset submodule main/dependencies/arts/cmake to latest HEAD 3 years ago
TDE Gitea 8a347b0455 Reset submodule main/dependencies/arts/cmake to latest HEAD 3 years ago
TDE Gitea 2a565737b0 Reset submodule main/dependencies/arts/cmake to latest HEAD 4 years ago
TDE Gitea 21673e98bb Reset submodule main/dependencies/arts/cmake to latest HEAD 4 years ago
TDE Gitea 9d55469fbb Reset submodule main/dependencies/arts/admin to latest HEAD 4 years ago
TDE Gitea 365995eff7 Reset submodule main/dependencies/arts/cmake to latest HEAD 4 years ago
TDE Gitea d3c57d50bb Reset submodule main/dependencies/arts/cmake to latest HEAD 4 years ago
TDE Gitea 7d0afd4c5d Reset submodule main/dependencies/arts/admin to latest HEAD 4 years ago
Slávek Banko 3f9d407d27
Fix FTBFS with stricter C++11 4 years ago
Michele Calgaro cea825bc2d cmake: Use set_property( SOURCE ... COMPILE_DEFINITIONS ) 4 years ago
Michele Calgaro 7c913167f1 Fixed for bug 2845. This is a bit of a quick-n-dirty patch. 4 years ago
Slávek Banko d518bc7ce8 Reset submodule main/dependencies/arts/admin to latest HEAD 4 years ago
Slávek Banko 12fb8a4b00 Reset submodule main/dependencies/arts/admin to latest HEAD 4 years ago
Slávek Banko 6ebd0a7304 Reset submodule main/dependencies/arts/admin to latest HEAD 4 years ago
Michele Calgaro bb046ee2e1 Fixed FTBFS with g++7 caused by #include directive placed inside namespace. 4 years ago
Slávek Banko 8fef617607 Fix detection whether the system is big endian 5 years ago
Slávek Banko 842c5bf1f8 Add artsc pkg-config file 5 years ago
Slávek Banko 145c993409 Fix FTBFS with GCC 6 (C++11 dialect) 5 years ago
Slávek Banko 7da982bc46 Reset submodule main/dependencies/arts/cmake to latest HEAD 5 years ago
Slávek Banko 59cb80f97a Reset submodule main/dependencies/arts/admin to latest HEAD 6 years ago
Slávek Banko 5e0e6c34fe Add include directory for internal libltdl 7 years ago
Nikolaus Klepp b93dc0be14 Fix FTBFS on freebsd 7 years ago
François Andriot e56fe3ba63 Fix artsc-config script to return valid include directory 7 years ago
Slávek Banko c914ecc927 Fix FTBFS due to late includes in CMake 7 years ago
François Andriot badb6e9d26 Add openbsd sndio support 7 years ago
François Andriot 3130108bc8 Fix hardcoded link flag to "dl" library 7 years ago
Darrell Anderson dc1efb1325 Update minimum cmake requirement to be consitent with other sources. 7 years ago
Darrell Anderson d571005b37 Fix hard-coded location for pkgconfig file. 7 years ago
Slávek Banko d5f06e6dec Add requires to pkgconfig file 7 years ago
Timothy Pearson c038edbc45 Setup architecture flags during initial configure 7 years ago
Timothy Pearson 2d7e0576b6 Fix tdemultimedia FTBFS when gcc hidden visibility is enabled 7 years ago
Timothy Pearson fc5a610945 Add gcc visibility option to arts 7 years ago
Slávek Banko 2336703cf1 Reset submodule main/dependencies/arts/cmake to latest HEAD 7 years ago
Slávek Banko b03bf5de54 Reset submodule main/dependencies/arts/admin to latest HEAD 7 years ago
Slávek Banko 2e77fc272e Reset submodule main/dependencies/arts/libltdl to latest HEAD 7 years ago
Slávek Banko efe195c064 Fix security issue CVE-2015-7543 7 years ago
Slávek Banko 85a8c7adea Reset submodule main/dependencies/arts/admin to latest HEAD 9 years ago
Francois Andriot 9ff109af6c Removed harcoded 4MB buffer size on ESD 9 years ago
Slávek Banko f9e71d2a81 Reset submodule main/dependencies/arts/libltdl to latest HEAD 9 years ago
Slávek Banko 6ef8c841eb Reset submodule main/dependencies/arts/admin to latest HEAD 9 years ago
Darrell Anderson eb52a433de Add source code module name to stdout/stderr messages to improve readability. 9 years ago
Darrell Anderson f85f51c46b Add source code module name to stdout/stderr messages to improve readability. 9 years ago
Slávek Banko f33f81c821 Reset submodule main/dependencies/arts/cmake to latest HEAD 9 years ago
Slávek Banko 558e631283 Reset submodule main/dependencies/arts/cmake to latest HEAD 9 years ago
Darrell Anderson cc25a2a58e Fix reference to user profile directory. 10 years ago
Slávek Banko c1099f3c6e Reset submodule main/dependencies/arts/cmake to latest HEAD 10 years ago
Slávek Banko 7755af602b Reset submodule main/dependencies/arts/cmake to latest HEAD 10 years ago
Slávek Banko e2610f0eea Reset submodule main/dependencies/arts/admin to latest HEAD 10 years ago
Slávek Banko 7bfbe2dd1d Reset submodule main/dependencies/arts/cmake to latest HEAD 10 years ago
Slávek Banko cbb3efa3c8 Reset submodule main/dependencies/arts/cmake to latest HEAD 10 years ago
Slávek Banko 2029cecf1a Reset submodule main/dependencies/arts/admin to latest HEAD 10 years ago
Slávek Banko 302480ca14 Update final HTML install path so all modules are consistent. 10 years ago
Darrell Anderson c4609260ea Update HTML install path references. 10 years ago
Timothy Pearson 6e160fca6b Add jack support to CMake 10 years ago
Timothy Pearson 20ad17b9b2 Add ESD support to CMake 10 years ago
Timothy Pearson 559a44af94 Rename obsolete tq methods to standard names 10 years ago
Timothy Pearson 6967f1ebf4 Remove additional unneeded tq method conversions 10 years ago
Timothy Pearson 0b8d250222 Rename old tq methods that no longer need a unique name 10 years ago
Slávek Banko b12a136f69 Add common directories 10 years ago
  1. 6
      .gitmodules
  2. 130
      CMakeLists.txt
  3. 1
      admin
  4. 11
      arts.lsm
  5. 1
      arts.pc.cmake
  6. 20
      artsc/CMakeLists.txt
  7. 16
      artsc/artsc-config.in
  8. 11
      artsc/artsc.pc.in
  9. 4
      artsc/artsc_export.h.in
  10. 2
      artsc/artsdsp.c
  11. 17
      config.h.cmake
  12. 2
      doc/README
  13. 5
      flow/CMakeLists.txt
  14. 18
      flow/audioioaix.cc
  15. 2
      flow/audioiocsl.cc
  16. 8
      flow/audioioesd.cc
  17. 310
      flow/audioiosndio.cc
  18. 5
      flow/fft.h
  19. 24
      flow/gsl/gsl-fftgen.pl
  20. 4
      flow/gsl/gsldatacache.c
  21. 2
      flow/gsl/gslengine.c
  22. 220
      flow/gsl/gslfft.c
  23. 12
      flow/gsl/gslffttest.c
  24. 4
      flow/gsl/gslfilter.c
  25. 6
      flow/gsl/gslglib.c
  26. 2
      flow/gsl/gslglib.h
  27. 16
      flow/gsl/gslieee754.h
  28. 10
      flow/gsl/gslloader-wav.c
  29. 2
      flow/gsl/gslopschedule.c
  30. 2
      flow/gsl/gsloputil.c
  31. 2
      flow/gsl/gslosctable.c
  32. 28
      flow/gsl/gslsignal.h
  33. 1
      flow/gsl/gslwaveosc.c
  34. 1
      libltdl
  35. 7
      mcop/CMakeLists.txt
  36. 3
      mcop/arts_export.h.in
  37. 3
      mcop/debug.cc
  38. 26
      mcop/dispatcher.cc
  39. 2
      mcop/iomanager.cc
  40. 53
      mcop/mcoputils.cc
  41. 2
      mcop/object.cc
  42. 1
      mcop/tcpconnection.cc
  43. 2
      mcop/tcpserver.cc
  44. 1
      mcop/unixconnection.cc
  45. 3
      mcop/unixserver.cc
  46. 7
      mcop_mt/CMakeLists.txt
  47. 5
      mcop_mt/threads_posix.cc
  48. 40
      mcopidl/scanner.cc
  49. 20
      mcopidl/yacc.cc
  50. 2
      soundserver/CMakeLists.txt
  51. 10
      soundserver/artsd.cc
  52. 4
      soundserver/artsshell.cc
  53. 2
      soundserver/gslplayobject_impl.cc
  54. 2
      soundserver/kmedia2.idl
  55. 4
      soundserver/soundserver.idl
  56. 4
      soundserver/soundserver_impl.cc
  57. 2
      soundserver/soundserver_impl.h
  58. 2
      soundserver/wavplayobject_impl.cc
  59. 2
      tests/testwrapper.cc

6
.gitmodules vendored

@ -0,0 +1,6 @@
[submodule "admin"]
path = admin
url = https://system@scm.trinitydesktop.org/scm/git/tde-common-admin
[submodule "libltdl"]
path = libltdl
url = https://system@scm.trinitydesktop.org/scm/git/libltdl

130
CMakeLists.txt

@ -9,7 +9,18 @@
#
#################################################
cmake_minimum_required( VERSION 2.6 )
cmake_minimum_required( VERSION 3.1 )
##### include essential cmake modules ###########
include( CheckCXXSourceCompiles )
include( CheckFunctionExists )
include( CheckSymbolExists )
include( CheckPrototypeDefinition )
include( CheckIncludeFile )
include( CheckLibraryExists )
include( FindPkgConfig )
##### include our cmake modules #################
@ -33,6 +44,10 @@ option( WITH_ALSA "Enable ALSA support" ON )
option( WITH_AUDIOFILE "Enable audiofile (wav) support" ON )
option( WITH_VORBIS "Enable Ogg/Vorbis support" ON )
option( WITH_MAD "Enable MAD mp3 decoder support" ON )
option( WITH_ESOUND "Enable ESOUND support" ${WITH_ALL_OPTIONS} )
option( WITH_JACK "Enable JACK support" ${WITH_ALL_OPTIONS} )
option( WITH_SNDIO "Enable SNDIO support" OFF )
option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" OFF )
##### paths setup ###############################
@ -41,12 +56,20 @@ tde_setup_install_path( EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" )
tde_setup_install_path( BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" )
tde_setup_install_path( LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" )
tde_setup_install_path( INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/${CMAKE_PROJECT_NAME}" )
tde_setup_install_path( PKGCONFIG_INSTALL_DIR "/usr/lib${LIB_SUFFIX}/pkgconfig" )
tde_setup_install_path( PKGCONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig" )
##### check for include files ###################
##### setup architecture flags ##################
include( CheckIncludeFile )
tde_setup_architecture_flags( )
include(TestBigEndian)
test_big_endian(WORDS_BIGENDIAN)
tde_setup_largefiles( )
##### check for include files ###################
check_include_file( "sys/time.h" HAVE_SYS_TIME_H )
check_include_file( "time.h" TIME_WITH_SYS_TIME )
@ -58,26 +81,29 @@ check_include_file( "ctype.h" HAVE_CTYPE_H )
check_include_file( "malloc.h" HAVE_MALLOC_H )
check_include_file( "memory.h" HAVE_MEMORY_H )
check_include_file( "dlfcn.h" HAVE_DLFCN_H )
check_include_file( "sys/soundcard.h" HAVE_SYS_SOUNDCARD_H )
check_include_file( "pthread.h" HAVE_LIBPTHREAD )
##### check for system libraries ################
include( CheckLibraryExists )
set( DL_LIBRARIES dl )
check_library_exists( ${DL_LIBRARIES} dlopen /lib HAVE_LIBDL )
if( NOT HAVE_LIBDL )
unset( DL_LIBRARIES )
check_function_exists( dlopen HAVE_DLOPEN )
if( HAVE_DLOPEN )
set( HAVE_LIBDL 1 )
endif( HAVE_DLOPEN )
endif( NOT HAVE_LIBDL )
find_package( Threads )
##### check for functions #######################
include( CheckFunctionExists )
##### check for functions #######################
set( bak_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} )
set( CMAKE_REQUIRED_LIBRARIES dl )
set( CMAKE_REQUIRED_LIBRARIES ${DL_LIBRARIES} )
check_function_exists( dlerror HAVE_DLERROR )
check_function_exists( strcmp HAVE_STRCMP )
check_function_exists( strchr HAVE_STRCHR )
@ -88,11 +114,8 @@ check_function_exists( memcpy HAVE_MEMCPY )
check_function_exists( bcopy HAVE_BCOPY )
set( CMAKE_REQUIRED_LIBRARIES ${bak_CMAKE_REQUIRED_LIBRARIES} )
unset( bak_CMAKE_REQUIRED_LIBRARIES )
##### check for modules #########################
include( FindPkgConfig )
check_prototype_definition( ioctl "int ioctl(int d, int request, ...)" "-1" "unistd.h;sys/ioctl.h" HAVE_IOCTL_INT_INT_DOTS )
check_prototype_definition( ioctl "int ioctl(int d, unsigned long request, ...)" "-1" "unistd.h;sys/ioctl.h" HAVE_IOCTL_INT_ULONG_DOTS )
##### check for audiofile #######################
@ -145,6 +168,48 @@ if( WITH_ALSA )
endif( WITH_ALSA )
##### check for esound #######################
set( HAVE_LIBESD 0 )
if( WITH_ESOUND )
pkg_search_module( ESOUND esound )
if( ESOUND_FOUND )
set( HAVE_LIBESD 1 )
else( ESOUND_FOUND )
message(FATAL_ERROR "\nESOUND support is requested, but `libesd` not found" )
endif( ESOUND_FOUND )
endif( WITH_ESOUND )
##### check for JACK ############################
set( HAVE_LIBJACK 0 )
if( WITH_JACK )
pkg_search_module( LIBJACK jack )
if( LIBJACK_FOUND )
set( HAVE_LIBJACK 1 )
else( LIBJACK_FOUND )
message(FATAL_ERROR "\nJACK support is requested, but `jack.pc` was not found" )
endif( LIBJACK_FOUND )
endif( WITH_JACK )
##### check for SNDIO ###########################
set( HAVE_LIBSNDIO 0 )
if( WITH_SNDIO )
check_include_file( "sndio.h" HAVE_SNDIO_H )
if( HAVE_SNDIO_H )
set( HAVE_LIBSNDIO 1 )
set( LIBSNDIO_LIBRARIES "sndio" )
else( HAVE_SNDIO_H )
tde_message_fatal( "SNDIO support is requested, but `sndio.h` was not found" )
endif( HAVE_SNDIO_H )
endif( WITH_SNDIO )
##### check for glib/gthread modules ############
pkg_search_module( GLIB2 glib-2.0 )
@ -161,11 +226,16 @@ endif( GLIB2_FOUND )
##### check for TQt #############################
include( CheckCXXSourceCompiles )
find_package( TQt )
##### check for gcc visibility support #########
if( WITH_GCC_VISIBILITY )
tde_setup_gcc_visibility( )
endif( )
##### write config.h file #######################
configure_file( config.h.cmake config.h @ONLY )
@ -173,6 +243,34 @@ configure_file( config.h.cmake config.h @ONLY )
##### write pkgconfig file ######################
set( PC_LIB_REQUIRE "" )
if( WITH_ALSA )
list( APPEND PC_LIB_REQUIRE "alsa" )
endif( WITH_ALSA )
if( WITH_AUDIOFILE )
list( APPEND PC_LIB_REQUIRE "audiofile" )
endif( WITH_AUDIOFILE )
if( WITH_VORBIS )
list( APPEND PC_LIB_REQUIRE "vorbis" )
list( APPEND PC_LIB_REQUIRE "vorbisfile" )
endif( WITH_VORBIS )
if( WITH_MAD )
list( APPEND PC_LIB_REQUIRE "mad" )
endif( WITH_MAD )
if( WITH_ESOUND )
list( APPEND PC_LIB_REQUIRE "esound" )
endif( WITH_ESOUND )
if( WITH_JACK )
list( APPEND PC_LIB_REQUIRE "jack" )
endif( WITH_JACK )
list( LENGTH PC_LIB_REQUIRE PC_LIB_REQUIRES_FOUND )
if( PC_LIB_REQUIRES_FOUND GREATER 0 )
string( REPLACE ";" " " PC_LIB_REQUIRES "Requires: ${PC_LIB_REQUIRE}" )
else( )
set( PC_LIB_REQUIRES "" )
endif( )
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_EXEC_PREFIX ${EXEC_INSTALL_PREFIX} )
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_INCLUDE_DIR ${INCLUDE_INSTALL_DIR} )
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_LIB_DIR ${LIB_INSTALL_DIR} )

1
admin

@ -0,0 +1 @@
Subproject commit 92a6d62b8f8f1836c43b54e3fb13b7ea7bb22e9f

11
arts.lsm

@ -1,11 +0,0 @@
Begin4
Title: arts
Version: 1.5.10
Entered-date: 2008-08-26
Description: Soundserver for the K Desktop Environment (KDE)
Keywords: KDE X11 desktop Qt
Author: http://bugs.kde.org/ (KDE Bugtracking System)
Primary-site: http://www.kde.org/download/
Platforms: Unix, Qt
Copying-policy: LGPL, Artistic
End

1
arts.pc.cmake

@ -8,3 +8,4 @@ Description: Soundserver for the Trinity Desktop Environment (TDE)
Version: @ARTS_VERSION@
Libs: -L${libdir}
Cflags: -I${includedir}
@PC_LIB_REQUIRES@

20
artsc/CMakeLists.txt

@ -17,8 +17,10 @@ add_definitions( -DCOMPILING_ARTSC )
set( prefix ${CMAKE_INSTALL_PREFIX} )
set( exec_prefix $prefix )
set( libdir ${LIB_INSTALL_DIR} )
set( includedir ${INCLUDE_INSTALL_DIR} )
set( LIBDL -l${DL_LIBRARIES} )
set( includedir ${CMAKE_INSTALL_PREFIX}/include/artsc )
if( NOT "${DL_LIBRARIES}" STREQUAL "" )
set( LIBDL -l${DL_LIBRARIES} )
endif( )
set( USE_THREADS )
set( LIBPTHREAD ${CMAKE_THREAD_LIBS_INIT} )
foreach( LIB ${GTHREAD2_LIBRARIES} )
@ -29,10 +31,14 @@ foreach( INC ${GTHREAD2_INCLUDE_DIRS} )
set( GLIB_CFLAGS "${GLIB_CFLAGS} -I${INC}" )
endforeach(INC)
configure_file( artsc.pc.in artsc.pc @ONLY )
configure_file( artsc-config.in artsc-config @ONLY )
configure_file( artsdsp.in artsdsp @ONLY )
configure_file( artsc_export.h.in artsc_export.h @ONLY )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/artsc.pc
DESTINATION ${PKGCONFIG_INSTALL_DIR} )
install( PROGRAMS
${CMAKE_CURRENT_BINARY_DIR}/artsdsp
${CMAKE_CURRENT_BINARY_DIR}/artsc-config
@ -43,6 +49,8 @@ install( PROGRAMS
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/artsc
${CMAKE_SOURCE_DIR}/libltdl
${CMAKE_BINARY_DIR}/mcop
${CMAKE_SOURCE_DIR}/mcop
${CMAKE_BINARY_DIR}/flow
@ -56,7 +64,7 @@ include_directories(
# FIXME: DESTINATION is currently a workaround
install( FILES
artsc.h ${CMAKE_CURRENT_BINARY_DIR}/artsc_export.h
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/artsc )
DESTINATION ${includedir} )
##### artsdsp (shared lib) ######################
@ -64,7 +72,7 @@ install( FILES
tde_add_library( artsdsp SHARED
SOURCES artsdsp.c
VERSION 0.0.0
LINK artsc-shared
LINK artsc-shared ${DL_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR}
)
@ -78,7 +86,7 @@ tde_add_library( artsdsp_st SHARED
DESTINATION ${LIB_INSTALL_DIR}
)
set_target_properties( artsdsp_st-shared PROPERTIES COMPILE_FLAGS -DARTSC_BACKEND=\\"${LIB_INSTALL_DIR}/libartscbackend.la\\" )
set_property( TARGET artsdsp_st-shared APPEND PROPERTY COMPILE_DEFINITIONS ARTSC_BACKEND="${LIB_INSTALL_DIR}/libartscbackend.la" )
##### artsc (shared lib) ########################
@ -90,7 +98,7 @@ tde_add_library( artsc SHARED
DESTINATION ${LIB_INSTALL_DIR}
)
set_target_properties( artsc-shared PROPERTIES COMPILE_FLAGS -DARTSC_BACKEND=\\"${LIB_INSTALL_DIR}/libartscbackend.la\\" )
set_property( TARGET artsc-shared APPEND PROPERTY COMPILE_DEFINITIONS ARTSC_BACKEND="${LIB_INSTALL_DIR}/libartscbackend.la" )
##### artscbackend (shared lib) #################

16
artsc/artsc-config.in

@ -15,31 +15,25 @@ EOH
exit 1;
}
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@c
libdl=@LIBDL@
flags=""
while test $# -gt 0
do
case $1 in
--libs)
flags="$flags -L$libdir $libdl -lartsc @USE_THREADS@ @LIBPTHREAD@ @GLIB_LDFLAGS@ @GLIB_LIBADD@"
flags="$flags `pkg-config artsc --libs`"
;;
--cflags)
flags="$flags -I$includedir @GLIB_CFLAGS@"
flags="$flags `pkg-config artsc --cflags`"
;;
--version)
echo 0.9.5
pkg-config artsc --modversion
;;
--arts-version)
echo @ARTS_VERSION@
pkg-config artsc --variable=arts_version
;;
--arts-prefix)
echo $prefix
pkg-config artsc --variable=prefix
;;
*)
echo "$0: unknown option $1"

11
artsc/artsc.pc.in

@ -0,0 +1,11 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
arts_version=@ARTS_VERSION@
Name: aRtsC
Description: aRts sound system C support library (TDE)
Version: 0.9.5
Libs: -L${libdir} -lartsc @LIBDL@ @USE_THREADS@ @LIBPTHREAD@ @GLIB_LDFLAGS@ @GLIB_LIBADD@
Cflags: -I${includedir} @GLIB_CFLAGS@

4
artsc/artsc_export.h.in

@ -20,7 +20,9 @@
#ifndef ARTSC_EXPORT_H
#define ARTSC_EXPORT_H
#undef __KDE_HAVE_GCC_VISIBILITY
/* Defined if you have fvisibility and fvisibility-inlines-hidden support. */
#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
/**
* The ARTS_NO_EXPORT macro marks the symbol of the given variable
* to be hidden. A hidden symbol is stripped during the linking step,

2
artsc/artsdsp.c

@ -79,8 +79,6 @@ static int frags;
typedef int ioctl_request_t;
#elif defined(HAVE_IOCTL_INT_ULONG_DOTS)
typedef unsigned long ioctl_request_t;
#elif defined(HAVE_IOCTL_INT_ULONGINT_DOTS)
typedef unsigned long int ioctl_request_t;
#else
#error "unknown ioctl type (check config.h, adapt configure test)..."
#endif

17
config.h.cmake

@ -1,3 +1,10 @@
/* Defined if you have fvisibility and fvisibility-inlines-hidden support. */
#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
#cmakedefine HAVE_SYS_TIME_H 1
#cmakedefine TIME_WITH_SYS_TIME 1
#cmakedefine HAVE_STDIO_H 1
@ -23,8 +30,18 @@
#cmakedefine HAVE_LIBAUDIOFILE 1
#cmakedefine HAVE_LIBESD 1
#cmakedefine HAVE_LIBASOUND2 1
#cmakedefine HAVE_ALSA_ASOUNDLIB_H 1
#cmakedefine HAVE_SND_PCM_RESUME 1
#cmakedefine ALSA_PCM_OLD_SW_PARAMS_API 1
#cmakedefine ALSA_PCM_OLD_HW_PARAMS_API 1
#cmakedefine HAVE_SYS_SOUNDCARD_H 1
#cmakedefine HAVE_LIBPTHREAD 1
#cmakedefine HAVE_IOCTL_INT_INT_DOTS 1
#cmakedefine HAVE_IOCTL_INT_ULONG_DOTS 2
#cmakedefine HAVE_LIBJACK 1
#cmakedefine HAVE_LIBSNDIO 1

2
doc/README

@ -1,5 +1,5 @@
All of the aRts documentation is now in "The aRts Handbook" which is
in KDE DocBook format, part of kdemultimedia. It should be found on a
KDE system in $KDEDIR/share/doc/HTML/default/artsbuilder/index.html.
KDE system in $KDEDIR/share/doc/tde/HTML/default/artsbuilder/index.html.
An on-line version can be found at http://www.arts-project.org/doc/handbook

5
flow/CMakeLists.txt

@ -15,6 +15,7 @@ add_subdirectory( gslpp )
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/artsc
${CMAKE_BINARY_DIR}/mcop
${CMAKE_SOURCE_DIR}/mcop
${CMAKE_CURRENT_BINARY_DIR}
@ -56,7 +57,7 @@ set( ${target}_SRCS
fft.c stereofftscope_impl.cc virtualports.cc bus.cc
audiomanager_impl.cc synth_record_impl.cc resample.cc
audioio.cc audioiooss.cc audioioalsa.cc audioioalsa9.cc
audioionull.cc audioiolibaudioio.cc audioioesd.cc
audioionull.cc audioiolibaudioio.cc audioioesd.cc audioiosndio.cc
audioiojack.cc audioiosun.cc audioioaix.cc audioionas.cc
cpuinfo.cc audioioossthreaded.cc audiotobytestream_impl.cc
audioiosgi.cc audioiocsl.cc audioiomas.cc datahandle_impl.cc
@ -65,7 +66,7 @@ set( ${target}_SRCS
tde_add_library( ${target} SHARED
SOURCES ${${target}_SRCS}
VERSION 1.0.0
LINK artsgsl-static artsgslpp-static artsflow_idl-shared ${AUDIOFILE_LIBRARIES}
LINK artsgsl-static artsgslpp-static artsflow_idl-shared ${AUDIOFILE_LIBRARIES} ${LIBJACK_LIBRARIES} ${LIBSNDIO_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR}
)

18
flow/audioioaix.cc

@ -116,9 +116,9 @@ AudioIOAIX::AudioIOAIX()
int fd = openDevice();
if( fd >= 0 )
{
audio_status audiotqStatus;
memset( &audiotqStatus, 0, sizeof(audio_status) );
ioctl(fd, AUDIO_STATUS, &audiotqStatus);
audio_status audioStatus;
memset( &audioStatus, 0, sizeof(audio_status) );
ioctl(fd, AUDIO_STATUS, &audioStatus);
audio_buffer audioBuffer;
memset( &audioBuffer, 0, sizeof(audio_buffer) );
@ -129,14 +129,14 @@ AudioIOAIX::AudioIOAIX()
/*
* default parameters
*/
param(samplingRate) = audiotqStatus.srate;
param(fragmentSize) = audiotqStatus.bsize;
param(fragmentCount) = audioBuffer.write_buf_cap / audiotqStatus.bsize;
param(channels) = audiotqStatus.channels;
param(samplingRate) = audioStatus.srate;
param(fragmentSize) = audioStatus.bsize;
param(fragmentCount) = audioBuffer.write_buf_cap / audioStatus.bsize;
param(channels) = audioStatus.channels;
param(direction) = 2;
param(format) = ( audiotqStatus.bits_per_sample==8 ) ? 8
: ( ( audiotqStatus.flags & AUDIO_BIG_ENDIAN ) ? 17 : 16 );
param(format) = ( audioStatus.bits_per_sample==8 ) ? 8
: ( ( audioStatus.flags & AUDIO_BIG_ENDIAN ) ? 17 : 16 );
}
}

2
flow/audioiocsl.cc

@ -470,7 +470,7 @@ void AudioIOCSL::setParam(AudioParam p, int& value)
int AudioIOCSL::getParam(AudioParam p)
{
CslErrorType error;
CslPcmtqStatus status;
CslPcmStatus status;
switch(p)
{

8
flow/audioioesd.cc

@ -204,14 +204,10 @@ int AudioIOESD::getParam(AudioParam p)
return write_fd;
case canRead:
return ESD_BUF_SIZE;
return param(fragmentSize);
case canWrite:
return ESD_BUF_SIZE;
// ESD handles are actually socket descriptors, and I know not
// of any portable way to peek at the socket's send or receive
// buffers.
return param(fragmentSize);
default:
return param(p);

310
flow/audioiosndio.cc

@ -0,0 +1,310 @@
/*
* Copyright (c) 2008 Jacob Meuser <jakemsr@sdf.lonestar.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef HAVE_LIBSNDIO
#include <sys/types.h>
#include <errno.h>
#include <math.h>
#include <sndio.h>
#include <poll.h>
#include "debug.h"
#include "audioio.h"
#include "audiosubsys.h"
#include "iomanager.h"
#include "dispatcher.h"
#include <cstdlib>
#include <cstring>
int bps, chans;
long long realpos, playpos, recpos;
void movecb(void *addr, int delta)
{
realpos += delta * (int)(bps * chans);
}
namespace Arts {
class AudioIOSNDIO : public AudioIO, public TimeNotify {
protected:
struct sio_hdl *hdl;
struct sio_par par;
int bufsz;
int bufused;
int duplex;
public:
AudioIOSNDIO();
void notifyTime();
void setParam(AudioParam param, int& value);
int getParam(AudioParam param);
bool open();
void close();
int read(void *buffer, int size);
int write(void *buffer, int size);
};
REGISTER_AUDIO_IO(AudioIOSNDIO,"sndio","libsndio");
}
using namespace std;
using namespace Arts;
AudioIOSNDIO::AudioIOSNDIO()
{
/* default parameters */
param(samplingRate) = 48000;
paramStr(deviceName) = "";
param(fragmentSize) = 4096;
param(fragmentCount) = 4;
param(format) = 16;
param(channels) = 2;
param(direction) = directionWrite;
}
bool AudioIOSNDIO::open()
{
string& _error = paramStr(lastError);
string& _deviceName = paramStr(deviceName);
int& _channels = param(channels);
int& _fragmentSize = param(fragmentSize);
int& _fragmentCount = param(fragmentCount);
int& _samplingRate = param(samplingRate);
int& _format = param(format);
struct sio_par testpar;
char dev[PATH_MAX];
int mode, bpf;
duplex = 0;
if (param(direction) == (directionRead | directionWrite)) {
mode = SIO_PLAY | SIO_REC;
duplex = 1;
} else if (param(direction) == directionWrite) {
mode = SIO_PLAY;
} else {
_error = "invalid direction";
return false;
}
strlcpy(dev, _deviceName.c_str(), PATH_MAX);
if (strcmp(dev, "") == 0)
hdl = sio_open(NULL, mode, 0);
else
hdl = sio_open(dev, mode, 0);
if (hdl == NULL) {
_error = "device ";
if (strcmp(_deviceName.c_str(), "") == 0)
_error += "(default sndio device)";
else
_error += _deviceName.c_str();
_error += " can't be opened";
return false;
}
sio_initpar(&par);
if (_format == 8) {
par.bits = 8;
par.sig = 0;
} else {
par.bits = 16;
par.sig = 1;
par.le = 1;
}
if (duplex)
par.pchan = par.rchan = _channels;
else
par.pchan = _channels;
par.rate = _samplingRate;
/* limit the buffer size for hardware constraints */
if (_fragmentSize > 1024*16)
_fragmentSize = 1024*16;
while (_fragmentSize * _fragmentCount > 1024*32)
_fragmentCount--;
bpf = ((par.bits / NBBY) * par.pchan);
par.round = _fragmentSize / bpf;
par.appbufsz = _fragmentSize * _fragmentCount / bpf;
testpar = par;
char details[128];
snprintf(details, 128, " rate=%d pchan=%d bits=%d le=%d sig=%d sz=%d",
par.rate, par.pchan, par.bits, par.le, par.sig, par.appbufsz);
if (!sio_setpar(hdl, &par)) {
_error = "sio_setpar failed:";
_error += details;
close();
return false;
}
if (!sio_getpar(hdl, &par)) {
_error = "sio_getpar failed";
close();
return false;
}
if (testpar.bits != par.bits ||
testpar.sig != par.sig ||
testpar.le != par.le ||
testpar.pchan != par.pchan ||
fabs((testpar.rate - par.rate)/testpar.rate) > 0.05) {
_error = "returned params do not match requested params";
close();
return false;
}
bpf = par.pchan * par.bps;
bufsz = par.bufsz * bpf;
::bps = par.bps;
::chans = par.pchan;
::realpos = ::playpos = ::recpos = 0;
sio_onmove(hdl, ::movecb, NULL);
if (!sio_start(hdl)) {
_error = "sio_start failed";
close();
return false;
}
/* use a timer instead of select() */
Dispatcher::the()->ioManager()->addTimer(10, this);
return true;
}
void AudioIOSNDIO::close()
{
if (hdl != NULL) {
sio_close(hdl);
hdl = NULL;
}
}
void AudioIOSNDIO::setParam(AudioParam p, int& value)
{
param(p) = value;
}
int AudioIOSNDIO::getParam(AudioParam p)
{
struct pollfd gpfd;
int n, events;
/* update ::realpos */
if ((p == canRead || p == canWrite) && hdl != NULL) {
events = POLLOUT;
if (duplex)
events |= POLLIN;
n = sio_pollfd(hdl, &gpfd, events);
while (poll(&gpfd, n, 0) < 0 && errno == EINTR)
;
sio_revents(hdl, &gpfd);
}
switch(p) {
case canRead:
bufused = (::realpos - ::recpos < 0) ? 0 : ::realpos - ::recpos;
return bufused;
break;
case canWrite:
bufused = (::realpos < 0) ? ::playpos : ::playpos - ::realpos;
return bufsz - bufused;
break;
case autoDetect:
return 15;
break;
default:
return param(p);
break;
}
}
int AudioIOSNDIO::read(void *buffer, int size)
{
arts_assert(hdl != NULL);
size_t result;
result = sio_read(hdl, buffer, size);
::recpos += result;
return (int)result;
}
int AudioIOSNDIO::write(void *buffer, int size)
{
arts_assert(hdl != NULL);
size_t result;
result = sio_write(hdl, buffer, size);
::playpos += result;
return (int)result;
}
void AudioIOSNDIO::notifyTime()
{
int& _direction = param(direction);
for (;;) {
int todo = 0;
if ((_direction & directionRead) && (getParam(canRead) > 0))
todo |= AudioSubSystem::ioRead;
if ((_direction & directionWrite) && (getParam(canWrite) > 0))
todo |= AudioSubSystem::ioWrite;
if (todo == 0)
return;
AudioSubSystem::the()->handleIO(todo);
}
}
#endif

5
flow/fft.h

@ -9,6 +9,7 @@
* compatible to avoid everybody to reimplement/duplicate their own fft.
*/
#include "arts_export.h"
#ifdef __cplusplus
extern "C" {
@ -23,8 +24,8 @@ void arts_fft_float (
float *RealIn, /* array of input's real samples */
float *ImaginaryIn, /* array of input's imag samples */
float *RealOut, /* array of output's reals */
float *ImaginaryOut ); /* array of output's imaginaries */
float *ImaginaryOut ) /* array of output's imaginaries */
ARTS_EXPORT;
#ifdef __cplusplus
}

24
flow/gsl/gsl-fftgen.pl

@ -551,7 +551,7 @@ sub fft_loop_macros {
# mul_result = gsl_complex (c1.re * c2.re - c1.im * c2.im, c1.re * c2.im + c1.im * c2.re);
print "
#define WMULTIPLY(Wre,Wim,Dre,Dim) { \\
register $tmp_ieee_type T1re, T1im, T2re, T2im; \\
$tmp_ieee_type T1re, T1im, T2re, T2im; \\
T1re = Wre * Dre; \\
T1im = Wim * Dre; \\
T2re = Wim * Dim; \\
@ -567,7 +567,7 @@ sub butterfly_macros {
# add_result = gsl_complex (c1.re + c2.re, c1.im + c2.im);
print "
#define BUTTERFLY_XY(X1re,X1im,X2re,X2im,Y1re,Y1im,Y2re,Y2im,Wre,Wim) { \\
register $tmp_ieee_type T1re, T1im, T2re, T2im; \\
$tmp_ieee_type T1re, T1im, T2re, T2im; \\
T1re = X2re * Wre; \\
T1im = X2im * Wre; \\
T2re = X2im * Wim; \\
@ -582,7 +582,7 @@ sub butterfly_macros {
Y2im = T2im; \\
}
#define BUTTERFLY_Yx(X1re,X1im,X2re,X2im,Y1re,Y1im,Y2re,Y2im,Wre,Wim) { \\
register $tmp_ieee_type T1re, T1im, T2re, T2im; \\
$tmp_ieee_type T1re, T1im, T2re, T2im; \\
T1re = X2re * Wim; \\
T1im = X2im * Wim; \\
T2re = X2im * Wre; \\
@ -597,7 +597,7 @@ sub butterfly_macros {
Y2im = T2im; \\
}
#define BUTTERFLY_yX(X1re,X1im,X2re,X2im,Y1re,Y1im,Y2re,Y2im,Wre,Wim) { \\
register $tmp_ieee_type T1re, T1im, T2re, T2im; \\
$tmp_ieee_type T1re, T1im, T2re, T2im; \\
T1re = X2re * Wim; \\
T1im = X2im * Wim; \\
T2re = X2im * Wre; \\