[PD-cvs] pd/src s_audio_portaudio.c, 1.1.2.19, 1.1.2.20 SConscript, 1.1.4.52, 1.1.4.53

Tim Blechmann timblech at users.sourceforge.net
Sat Aug 19 17:23:42 CEST 2006


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16603/src

Modified Files:
      Tag: devel_0_39
	s_audio_portaudio.c SConscript 
Log Message:
opening portaudio backend with higher blocksize to force some latency
fixing scons build system for linux


Index: SConscript
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/SConscript,v
retrieving revision 1.1.4.52
retrieving revision 1.1.4.53
diff -C2 -d -r1.1.4.52 -r1.1.4.53
*** SConscript	12 Aug 2006 09:56:33 -0000	1.1.4.52
--- SConscript	19 Aug 2006 15:23:40 -0000	1.1.4.53
***************
*** 44,48 ****
      )
  
!     
  opt.Update(pdenv)
  
--- 44,48 ----
      )
  
! 
  opt.Update(pdenv)
  
***************
*** 65,69 ****
  
    s_audio.c s_file.c s_inter.c s_loader.c
!   s_main.c s_midi.c s_path.c 
  
    x_acoustics.c x_arithmetic.c x_connective.c x_gui.c x_interface.c
--- 65,69 ----
  
    s_audio.c s_file.c s_inter.c s_loader.c
!   s_main.c s_midi.c s_path.c
  
    x_acoustics.c x_arithmetic.c x_connective.c x_gui.c x_interface.c
***************
*** 102,106 ****
          print "libdl not found. dynamic loading of externals disabled"
  
!         
      jack = conf.CheckLib('jack','jack_activate')
      alsa = conf.CheckLib('asound','snd_pcm_info')
--- 102,106 ----
          print "libdl not found. dynamic loading of externals disabled"
  
! 
      jack = conf.CheckLib('jack','jack_activate')
      alsa = conf.CheckLib('asound','snd_pcm_info')
***************
*** 135,142 ****
          print "Please enter path to ASIO SDK"
          Exit(1)
!     
      pdenv.Append(CPPPATH=[path_pthread+'/include',path_tcl+'/include'])
      pdenv.Append(LIBPATH=[path_pthread+'/lib',path_tcl+'/lib'])
!     
      pdenv.Append(CPPPATH=[path_asio+'/common',path_asio+'/host',path_asio+'/host/pc'])
      pdenv.Append(LIBPATH=[path_asio])
--- 135,142 ----
          print "Please enter path to ASIO SDK"
          Exit(1)
! 
      pdenv.Append(CPPPATH=[path_pthread+'/include',path_tcl+'/include'])
      pdenv.Append(LIBPATH=[path_pthread+'/lib',path_tcl+'/lib'])
! 
      pdenv.Append(CPPPATH=[path_asio+'/common',path_asio+'/host',path_asio+'/host/pc'])
      pdenv.Append(LIBPATH=[path_asio])
***************
*** 154,163 ****
  if pdenv['PLATFORM'] == 'darwin':
      portaudio = True
!     
      if conf.CheckLib('dl', 'dlopen'):
          defs.append('DL_OPEN')
      else:
          print "libdl not found. dynamic loading of externals disabled"
!     
      if conf.CheckLib('jack','jack_activate'):
          jack = True
--- 154,163 ----
  if pdenv['PLATFORM'] == 'darwin':
      portaudio = True
! 
      if conf.CheckLib('dl', 'dlopen'):
          defs.append('DL_OPEN')
      else:
          print "libdl not found. dynamic loading of externals disabled"
! 
      if conf.CheckLib('jack','jack_activate'):
          jack = True
***************
*** 186,190 ****
          print "can't find Math library"
  #        Exit(1)
!     
  if pdenv['PLATFORM'] != 'darwin':
      if not conf.CheckLib('tcl','Tcl_Init'):
--- 186,190 ----
          print "can't find Math library"
  #        Exit(1)
! 
  if pdenv['PLATFORM'] != 'darwin':
      if not conf.CheckLib('tcl','Tcl_Init'):
***************
*** 205,209 ****
      if not (conf.CheckHeader('tcl.h') or
           conf.CheckHeader('tcl/tcl.h')
!          ):  
          for i in range (0,10):
              if conf.CheckHeader('tcl8.%d/tcl.h' % i):
--- 205,209 ----
      if not (conf.CheckHeader('tcl.h') or
           conf.CheckHeader('tcl/tcl.h')
!          ):
          for i in range (0,10):
              if conf.CheckHeader('tcl8.%d/tcl.h' % i):
***************
*** 376,381 ****
  
      # split pd to pd.exe and pd.dll
!     pdenv['pdlib'] = True 
!     
  ######################################################################
  #
--- 376,381 ----
  
      # split pd to pd.exe and pd.dll
!     pdenv['pdlib'] = True
! 
  ######################################################################
  #
***************
*** 406,412 ****
          linux_defs.append("PA_USE_ALSA")
  
      if pdenv['simd']:
          linux_sources.append(simd_sse_gcc_sources)
!         
      if alsa:
          linux_sources.append(alsa_sources)
--- 406,418 ----
          linux_defs.append("PA_USE_ALSA")
  
+         if jack:
+             linux_defs.append("PA_USE_JACK")
+             linux_sources.append(File('src/hostapi/jack/pa_jack.c', papath))
+ 
+         pdenv.Append(CPPPATH=Dir('src/os/unix', papath))
+ 
      if pdenv['simd']:
          linux_sources.append(simd_sse_gcc_sources)
! 
      if alsa:
          linux_sources.append(alsa_sources)
***************
*** 414,418 ****
          linux_libs.append('asound')
          linux_sources.append(['s_midi_alsa.c'])
!     
      if jack:
          linux_sources.append(jack_sources)
--- 420,424 ----
          linux_libs.append('asound')
          linux_sources.append(['s_midi_alsa.c'])
! 
      if jack:
          linux_sources.append(jack_sources)
***************
*** 454,458 ****
  
      osx_defs = Split("UNISTD PA_USE_COREAUDIO MACOSX")
!     
  #    if pdenv['portaudio']:
  #        osx_sources += pa_sources
--- 460,464 ----
  
      osx_defs = Split("UNISTD PA_USE_COREAUDIO MACOSX")
! 
  #    if pdenv['portaudio']:
  #        osx_sources += pa_sources
***************
*** 463,467 ****
          osx_defs.append("USEAPI_JACK")
          pdenv.Append(LINKFLAGS=" -weak_framework Jack")
!         
          osx_sources.append(papath+'/src/hostapi/jack/pa_jack.c')
  
--- 469,473 ----
          osx_defs.append("USEAPI_JACK")
          pdenv.Append(LINKFLAGS=" -weak_framework Jack")
! 
          osx_sources.append(papath+'/src/hostapi/jack/pa_jack.c')
  
***************
*** 532,536 ****
          cflags += " /Ox"
      else:
!         if True or pdenv['PLATFORM'] != 'darwin':
              cflags += " -O3"
          else:
--- 538,542 ----
          cflags += " /Ox"
      else:
!         if pdenv['PLATFORM'] != 'darwin':
              cflags += " -O3"
          else:
***************
*** 550,554 ****
          else:
              cflags += " -mtune=" + optarch
!             
  if pdenv['simd']:
      if pdenv['PLATFORM'] != 'darwin':
--- 556,560 ----
          else:
              cflags += " -mtune=" + optarch
! 
  if pdenv['simd']:
      if pdenv['PLATFORM'] != 'darwin':
***************
*** 569,573 ****
      if pdenv['lockfree']:
          cflags += " -fnested-functions -fasm-blocks"
!         
  ######################################################################
  #
--- 575,579 ----
      if pdenv['lockfree']:
          cflags += " -fnested-functions -fasm-blocks"
! 
  ######################################################################
  #
***************
*** 583,587 ****
          else:
              cflags += " -msse2"
!     
  if conf.TryCompile("""#include \"stdlib.h\"
                        int main()
--- 589,593 ----
          else:
              cflags += " -msse2"
! 
  if conf.TryCompile("""#include \"stdlib.h\"
                        int main()
***************
*** 651,655 ****
  
      pdlib = envint.SharedLibrary('../bin/pd', sources)
!     pd = pdenv.Program('../bin/pd', 's_entry.c', LIBS=['./bin/pd'])
      Default(pdsend, pdreceive, pdgui, pdlib, pd, pdtk)
  else:
--- 657,661 ----
  
      pdlib = envint.SharedLibrary('../bin/pd', sources)
!     pd = pdenv.Program('../bin/pd', 's_entry.c', LIBS=pdlib)
      Default(pdsend, pdreceive, pdgui, pdlib, pd, pdtk)
  else:

Index: s_audio_portaudio.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/s_audio_portaudio.c,v
retrieving revision 1.1.2.19
retrieving revision 1.1.2.20
diff -C2 -d -r1.1.2.19 -r1.1.2.20
*** s_audio_portaudio.c	12 Aug 2006 11:54:47 -0000	1.1.2.19
--- s_audio_portaudio.c	19 Aug 2006 15:23:40 -0000	1.1.2.20
***************
*** 162,165 ****
--- 162,172 ----
          blocksize=64;
  
+         while ((float)blocksize / (float)rate * 1000 * 2 <advance)
+         {
+             if (blocksize == 1024)
+                 break;
+             else
+                 blocksize *= 2;
+         }
          pa_blocksize = blocksize;
  
***************
*** 312,316 ****
      }
  
!     for (i = 0; i != frameCount / sys_dacblocksize; ++i)
      {
          int j;
--- 319,323 ----
      }
  
!     for (i = 0; i < frameCount / sys_dacblocksize; ++i)
      {
          int j;





More information about the Pd-cvs mailing list