--- chuck-1.2.0.8.dfsg.orig/debian/changelog +++ chuck-1.2.0.8.dfsg/debian/changelog @@ -0,0 +1,121 @@ +chuck (1.2.0.8.dfsg-1.4build1) wily; urgency=medium + + * No-change rebuild against libjack-jackd2-0v5 + + -- Steve Langasek Tue, 11 Aug 2015 06:36:37 +0000 + +chuck (1.2.0.8.dfsg-1.4) unstable; urgency=low + + * Non-maintainer upload. + * Link with -lpthread to fix FTBFS with binutils-gold (Closes: #554073). + + -- Alessio Treglia Wed, 04 May 2011 23:59:57 +0200 + +chuck (1.2.0.8.dfsg-1.3) unstable; urgency=low + + * Non-maintainer upload. + * Fix "fails to build with gcc-4.4/newer eglibc": apply patch from Ubuntu + (thanks to Stefan Potyra); closes: #549223. + + -- gregor herrmann Fri, 25 Dec 2009 18:29:53 +0100 + +chuck (1.2.0.8.dfsg-1.2) unstable; urgency=medium + + * Non-maintainer upload. + * Fix broken runtime on 64-bit architectures, thanks to patches by + Samuel Thibault (Closes: #398148). + * Set urgency to “medium” as this bug affects testing. + * Fix FTBFS with GCC 4.4, thanks to Martin Michlmayr, by adding a + include in src/util_string.h (Closes: #504962). + * Add jackd to Suggests as suggested (ah!) by James Westby + (Closes: #487982). + + -- Cyril Brulebois Sun, 19 Jul 2009 16:44:04 +0200 + +chuck (1.2.0.8.dfsg-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Fix FTBFS with GCC 4.3 (Closes: #421211). + + -- Luk Claes Sun, 16 Mar 2008 15:09:48 +0000 + +chuck (1.2.0.8.dfsg-1) unstable; urgency=low + + * New upstream release + * Removed src/u{til,lib},opsc.{cpp,h} to comply with dfsg + * Added chuck.alsa (closes: #413321) + + -- Paul Brossier Sat, 21 Apr 2007 13:27:39 +0200 + +chuck (1.2.0.7.dfsg-1) unstable; urgency=low + + * New upstream release, update debian/rules accordingly. + * Removal src/util_opsc.{cpp,h} due to non DFSG compliant license. + * Upload to debian (closes: #267626) + + -- Paul Brossier Thu, 5 Oct 2006 18:44:33 +0200 + +chuck (1.2.0.6-1) unstable; urgency=low + + * New upstream release + * Bump to new standards-version. + * Pass FLAGS to make to compile using defaults gcc options + * Fix installation using DESTDIR and PREFIX + + -- Paul Brossier Mon, 18 Sep 2006 14:00:42 +0200 + +chuck (1.2.0.4-1) unstable; urgency=low + + * New upstream release. Upload to unstable (closes: #267626) + + -- Paul Brossier Thu, 29 Dec 2005 20:43:32 +0100 + +chuck (1.2.0.3-1) unstable; urgency=low + + * New upstream release + + -- Paul Brossier Wed, 2 Nov 2005 09:13:00 +0000 + +chuck (1.2.0.1-1) unstable; urgency=low + + * New upstream release + + -- Paul Brossier Fri, 30 Sep 2005 06:25:20 +0100 + +chuck (1.2.0.0-1) unstable; urgency=low + + * New upstream release + + -- Paul Brossier Fri, 30 Sep 2005 05:13:04 +0100 + +chuck (1.1.5.6d-1) unstable; urgency=low + + * New upstream release + + -- Paul Brossier Tue, 2 Aug 2005 07:36:22 +0100 + +chuck (1.1.5.6-1) unstable; urgency=low + + * New upstream release + + -- Paul Brossier Mon, 25 Apr 2005 14:24:18 +0100 + +chuck (1.1.5.4-1) unstable; urgency=low + + * New upstream release + + -- Paul Brossier Fri, 26 Nov 2004 05:13:01 +0000 + +chuck (1.1.4.5-1) unstable; urgency=low + + * New upstream release + + -- Paul Brossier Mon, 23 Aug 2004 18:32:15 +0200 + +chuck (1.1.4.3-1) unstable; urgency=low + + * Initial Release. + * Added missing manpage and watch file. + + -- Paul Brossier Tue, 27 Jul 2004 00:48:01 +0200 + --- chuck-1.2.0.8.dfsg.orig/debian/chuck.links +++ chuck-1.2.0.8.dfsg/debian/chuck.links @@ -0,0 +1,2 @@ +usr/share/man/man1/chuck.1.gz usr/share/man/man1/chuck.oss.1.gz +usr/share/man/man1/chuck.1.gz usr/share/man/man1/chuck.alsa.1.gz --- chuck-1.2.0.8.dfsg.orig/debian/chuck.sgml +++ chuck-1.2.0.8.dfsg/debian/chuck.sgml @@ -0,0 +1,280 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + Paul"> + Brossier"> + + 20051214"> + + 1"> + <piem@altern.org>"> + + CHUCK"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2003 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + audio programming language for real-time synthesis, composition, and performance + + + + + + + &dhpackage; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + file1 + file2 + file2 + + + + + DESCRIPTION + + This manual page documents briefly the &dhpackage; +commands. + + &dhpackage; is a new audio programming language +for real-time synthesis, composition, and performance, which runs on commodity +operating systems. + + &dhpackage; presents a new time-based concurrent +programming model, which supports multiple, simultaneous, dynamic control +rates, and the ability to add, remove, and modify code, on-the-fly, while the +program is running, without stopping or restarting. + + Use &dhpackage; for jack audio interfaces, + &dhpackage;.alsa to access alsa devices, + and &dhpackage;.oss to access oss devices. + + + + OPTIONS + + A summary of options is included below. + + + + + Add a file to a running chuck server. + + + Remove a shred to a running chuck server. + + + Replace an existing shred with another file. + + + Print chuck server status information. + + + + Shortcuts for add, remove, replace and status. + + + + Get the current time. + + + Kill the chuck server. + + + + Start in halt mode (default). + + + Start chuck in loop mode (daemon mode). + + + Start server with audio (default). + + + Start server in silent mode. + + + Dump compilation result (verbose mode). + + + Do not dump compilation result. + + + + Set sampling rate (default to 48000 for jack, auto +detected otherwise). + + + Set buffer size. + + + Set number of buffer. + + + Set output audio device. + + + Set input audio device. + + + Connect to remote hostname. + + + Connect/Listen on port number N. + + + Set verbosity level to N. + + + List available audio devices. + + + Use blocking mode audio access. + + + Use callback mode audio access. + + + + Show summary of options. + + + Show version of program. + + + + + SEE ALSO + + /usr/share/doc/chuck/ChucK_manual.pdf + + + + EXAMPLES + + $ cd /usr/share/doc/chuck/examples + $ chuck otf_01.ck & + $ chuck --add otf_02.ck & + $ chuck + otf_0[4567].ck + $ chuck - 0 + $ chuck --kill + + + AUTHOR + + This manual page was written by &dhusername; +&dhemail;. Permission is granted to copy, distribute and/or +modify this document under the terms of the &gnu; General Public License, +Version 2 any later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
+ + + + --- chuck-1.2.0.8.dfsg.orig/debian/compat +++ chuck-1.2.0.8.dfsg/debian/compat @@ -0,0 +1 @@ +4 --- chuck-1.2.0.8.dfsg.orig/debian/control +++ chuck-1.2.0.8.dfsg/debian/control @@ -0,0 +1,20 @@ +Source: chuck +Section: sound +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Paul Brossier +Build-Depends: debhelper (>= 4.0.0), bison, flex, libjack-dev, libasound2-dev, libsndfile1-dev, docbook-to-man +Standards-Version: 3.7.2 + +Package: chuck +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Suggests: jackd +Description: Concurrent, On-the-fly Audio Programming Language + ChucK is a new audio programming language for real-time synthesis, + composition, and performance, which runs on commodity operating systems. + . + ChucK presents a new time-based concurrent programming model, which supports + multiple, simultaneous, dynamic control rates, and the ability to add, remove, + and modify code, on-the-fly, while the program is running, without stopping or + restarting. --- chuck-1.2.0.8.dfsg.orig/debian/copyright +++ chuck-1.2.0.8.dfsg/debian/copyright @@ -0,0 +1,102 @@ +This package was debianized by Paul Brossier on +Tue, 27 Jul 2004 00:29:57 +0200. + +It was downloaded from http://chuck.cs.princeton.edu/ + +Upstream Authors: + + Ge Wang (gewang@cs.princeton.edu) + Perry R. Cook (prc@cs.princeton.edu) + + (See also the file THANKS and README) + +Lead Design: + Ge Wang + Perry Cook + +Lead Developers: + Ge Wang + Perry Cook + Ari Lazier (alazier@cs.princeton.edu) + Philip Davidson (philipd@alumni.princeton.edu) + Ananya Misra (amisra@cs.princeton.edu) + +Copyright: + + Copyright (c) 2004 Ge Wang and Perry R. Cook. All rights reserved. + +License: + + You are free to distribute this software under the terms of the GNU General + Public License. On Debian systems, the complete text of the GNU General + Public License can be found in the file `/usr/share/common-licenses/GPL'. + +--- + +Copyright and download locations for the files src/rt{audio,midi,error}.{c,h} + + RtAudio provides a common API (Application Programming Interface) + for realtime audio input/output across Linux (native ALSA, Jack, + and OSS), SGI, Macintosh OS X (CoreAudio), and Windows + (DirectSound and ASIO) operating systems. + + RtAudio WWW site: http://music.mcgill.ca/~gary/rtaudio/ + + RtAudio: realtime audio i/o C++ classes + Copyright (c) 2001-2005 Gary P. Scavone + + This class implements some common functionality for the realtime + MIDI input/output subclasses RtMidiIn and RtMidiOut. + + RtMidi WWW site: http://music.mcgill.ca/~gary/rtmidi/ + + RtMidi: realtime MIDI i/o C++ classes + Copyright (c) 2003-2005 Gary P. Scavone + +License: + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + Any person wishing to distribute modifications to the Software is + requested to send the modifications to the original developer so that + they can be incorporated into the canonical version. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR + ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +Copyright and download location for the files src/util_sndfile.{c,h} + + libsndfile Copyright (C) 1999-2004 Erik de Castro Lopo + + Although libsndfile sources are included in chuck upstream sources, the + debian package for chuck uses the upstream version of sndfile, contained in + the libsndfile-dev package. The upstream version can be found at + http://www.mega-nerd.com/libsndfile/ . + +License: + + You are free to distribute this software under the terms of the GNU General + Public License. On Debian systems, the complete text of the GNU General + Public License can be found in the file `/usr/share/common-licenses/LGPL'. + +--- + +The files src/util_opsc.{cpp,h} were removed from the debian source package as +they contain code licensed under terms uncompatible with the Debian Free +Software Guidelines. --- chuck-1.2.0.8.dfsg.orig/debian/dirs +++ chuck-1.2.0.8.dfsg/debian/dirs @@ -0,0 +1 @@ +usr/bin --- chuck-1.2.0.8.dfsg.orig/debian/docs +++ chuck-1.2.0.8.dfsg/debian/docs @@ -0,0 +1,4 @@ +README +TODO +THANKS +doc/ChucK_manual.pdf --- chuck-1.2.0.8.dfsg.orig/debian/rules +++ chuck-1.2.0.8.dfsg/debian/rules @@ -0,0 +1,79 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +CFLAGS = -Wall -g -fno-strict-aliasing + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + find examples src -type f -exec chmod -x {} \; + rm -f "examples/event/.#opensound_demo_recv.ck.1.2" + touch configure-stamp + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + cd src && $(MAKE) linux-alsa CFLAGS="$(CFLAGS)" + cp -a src/chuck chuck.alsa + cd src && $(MAKE) clean + cd src && $(MAKE) linux-oss CFLAGS="$(CFLAGS)" CHUCK_DEBUG=y + cp -a src/chuck chuck.oss + cd src && $(MAKE) clean + cd src && $(MAKE) linux-jack CFLAGS="$(CFLAGS)" CHUCK_DEBUG=y + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + cd src && $(MAKE) clean + rm -f chuck.oss chuck.alsa debian/chuck.1 + dh_clean + +install: build + dh_testdir + dh_testroot + docbook-to-man debian/chuck.sgml > debian/chuck.1 + dh_clean -k -Xchuck + dh_installdirs + cd src && $(MAKE) install DESTDIR=$(CURDIR)/debian/chuck + dh_install chuck.alsa usr/bin + dh_install chuck.oss usr/bin + +binary-indep: build install +# We have nothing to do by default. + +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs VERSIONS + dh_installdocs + dh_installexamples examples/* + dh_installman debian/chuck.1 + dh_link + dh_strip + dh_compress -X.wav -X.ck + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- chuck-1.2.0.8.dfsg.orig/debian/watch +++ chuck-1.2.0.8.dfsg/debian/watch @@ -0,0 +1,6 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# Site Directory Pattern Version Script +version=2 +http://chuck.cs.princeton.edu/release/files/ chuck-(.*)\.tgz debian uupdate --- chuck-1.2.0.8.dfsg.orig/src/chuck_compile.cpp +++ chuck-1.2.0.8.dfsg/src/chuck_compile.cpp @@ -42,7 +42,6 @@ #include "ulib_machine.h" #include "ulib_math.h" #include "ulib_std.h" -#include "ulib_opsc.h" using namespace std; @@ -542,8 +541,8 @@ if( !load_module( env, libstd_query, "Std", "global" ) ) goto error; EM_log( CK_LOG_SEVERE, "class 'math'..." ); if( !load_module( env, libmath_query, "Math", "global" ) ) goto error; - EM_log( CK_LOG_SEVERE, "class 'opsc'..." ); - if( !load_module( env, opensoundcontrol_query, "opsc", "global" ) ) goto error; + //EM_log( CK_LOG_SEVERE, "class 'opsc'..." ); + //if( !load_module( env, opensoundcontrol_query, "opsc", "global" ) ) goto error; // if( !load_module( env, net_query, "net", "global" ) ) goto error; if( !init_class_Midi( env ) ) goto error; --- chuck-1.2.0.8.dfsg.orig/src/chuck_emit.cpp +++ chuck-1.2.0.8.dfsg/src/chuck_emit.cpp @@ -371,9 +371,9 @@ // if decl, then expect only one word per var if( exp->s_type == ae_exp_decl ) emit->append( new Chuck_Instr_Reg_Pop_Word3( exp->decl.num_var_decls ) ); - else if( exp->type->size == 4 ) // ISSUE: 64-bit + else if( exp->type->size == sz_INT ) // ISSUE: 64-bit emit->append( new Chuck_Instr_Reg_Pop_Word ); - else if( exp->type->size == 8 ) // ISSUE: 64-bit + else if( exp->type->size == sz_FLOAT ) // ISSUE: 64-bit emit->append( new Chuck_Instr_Reg_Pop_Word2 ); else { @@ -606,9 +606,9 @@ return FALSE; // HACK! - if( stmt->c3->type->size == 8 ) // ISSUE: 64-bit + if( stmt->c3->type->size == sz_FLOAT ) // ISSUE: 64-bit emit->append( new Chuck_Instr_Reg_Pop_Word2 ); - else if( stmt->c3->type->size == 4 ) // ISSUE: 64-bit + else if( stmt->c3->type->size == sz_INT ) // ISSUE: 64-bit emit->append( new Chuck_Instr_Reg_Pop_Word ); else if( stmt->c3->type->size != 0 ) { @@ -1027,8 +1027,7 @@ emit->code->stack_break.push_back( NULL ); // push the value of the loop counter - // TODO: get rid of hard code 4 - emit->append( new Chuck_Instr_Reg_Push_Deref( (t_CKUINT)counter, 4 ) ); // ISSUE: 64-bit + emit->append( new Chuck_Instr_Reg_Push_Deref( (t_CKUINT)counter, sz_INT ) ); // get the type, taking cast into account Chuck_Type * type = stmt->cond->cast_to ? stmt->cond->cast_to : stmt->cond->type; @@ -2122,9 +2121,9 @@ else { // assign primitive - if( right->size == 4 ) // ISSUE: 64-bit + if( right->size == sz_INT ) // ISSUE: 64-bit emit->append( new Chuck_Instr_Assign_Primitive ); - else if( right->size == 8 ) // ISSUE: 64-bit + else if( right->size == sz_FLOAT ) // ISSUE: 64-bit emit->append( new Chuck_Instr_Assign_Primitive2 ); else { @@ -2644,7 +2643,7 @@ is_str = TRUE; // make sure - if( type->size != 4 && type->size != 8 ) // ISSUE: 64-bit + if( type->size != sz_INT && type->size != sz_FLOAT ) { EM_error2( array->linepos, "(emit): internal error: array with datasize of %i...", type->size ); @@ -2705,7 +2704,7 @@ t_CKUINT size = type->size; if( func->def->s_type == ae_func_builtin ) { - if( size == 0 || size == 4 || size == 8 ) // ISSUE: 64-bit + if( size == 0 || size == sz_INT || size == sz_FLOAT ) { // is member if( is_member ) @@ -3165,9 +3164,9 @@ /* if( !is_init && first_exp ) { // push 0 - if( type->size == 4 ) // ISSUE: 64-bit + if( type->size == sz_INT ) emit->append( new Chuck_Instr_Reg_Push_Imm( 0 ) ); - else if( type->size == 8 ) // ISSUE: 64-bit + else if( type->size == sz_FLOAT ) emit->append( new Chuck_Instr_Reg_Push_Imm2( 0.0 ) ); else { @@ -3184,9 +3183,9 @@ if( value->is_member ) { // zero out location in object, and leave addr on operand stack - if( type->size == 4 ) // ISSUE: 64-bit + if( type->size == sz_INT ) // ISSUE: 64-bit emit->append( new Chuck_Instr_Alloc_Member_Word( value->offset ) ); - else if( type->size == 8 ) // ISSUE: 64-bit + else if( type->size == sz_FLOAT ) // ISSUE: 64-bit emit->append( new Chuck_Instr_Alloc_Member_Word2( value->offset ) ); else { @@ -3218,9 +3217,9 @@ // TODO: this is wrong for static // BAD: // FIX: - if( type->size == 4 ) // ISSUE: 64-bit + if( type->size == sz_INT ) // ISSUE: 64-bit emit->append( new Chuck_Instr_Alloc_Word( local->offset ) ); - else if( type->size == 8 ) // ISSUE: 64-bit + else if( type->size == sz_FLOAT ) // ISSUE: 64-bit emit->append( new Chuck_Instr_Alloc_Word2( local->offset ) ); else { @@ -3273,11 +3272,11 @@ // if obj if( is_obj ) emit->append( new Chuck_Instr_Assign_Object ); - // size 4 primitive - else if( type->size == 4 ) // ISSUE: 64-bit + // size int primitive + else if( type->size == sz_INT ) // ISSUE: 64-bit emit->append( new Chuck_Instr_Assign_Primitive ); - // size 8 primitive - else if( type->size == 8 ) // ISSUE: 64-bit + // size float primitive + else if( type->size == sz_FLOAT ) // ISSUE: 64-bit emit->append( new Chuck_Instr_Assign_Primitive2 ); else assert( FALSE ); @@ -3672,7 +3671,7 @@ // handle member function // TODO: this is a hack - what if exp is not func_call? // if( emit->code->need_this ) - // size += 4; + // size += sz_UINT; // emit instruction that will put the code on the stack emit->append( new Chuck_Instr_Reg_Push_Imm( (t_CKUINT)code ) ); @@ -3746,9 +3745,9 @@ if( v->func_ref ) emit->append( new Chuck_Instr_Reg_Push_Imm( (t_CKUINT)v->func_ref ) ); // check size - else if( v->type->size == 4 ) // ISSUE: 64-bit + else if( v->type->size == sz_INT ) // ISSUE: 64-bit emit->append( new Chuck_Instr_Reg_Push_Mem( v->offset, v->is_context_global ) ); - else if( v->type->size == 8 ) // ISSUE: 64-bit + else if( v->type->size == sz_FLOAT ) // ISSUE: 64-bit emit->append( new Chuck_Instr_Reg_Push_Mem2( v->offset, v->is_context_global ) ); else { --- chuck-1.2.0.8.dfsg.orig/src/chuck_instr.cpp +++ chuck-1.2.0.8.dfsg/src/chuck_instr.cpp @@ -1105,7 +1105,7 @@ //----------------------------------------------------------------------------- void Chuck_Instr_Reg_Push_Deref::execute( Chuck_VM * vm, Chuck_VM_Shred * shred ) { - if( m_size == 4 ) // ISSUE: 64-bit + if( m_size == sz_UINT ) { t_CKUINT *& reg_sp = (t_CKUINT *&)shred->reg->sp; push_( reg_sp, *((t_CKUINT *)m_val) ); @@ -2526,12 +2526,12 @@ Chuck_VM_Code * func = (Chuck_VM_Code *)*reg_sp; // get the local stack depth - caller local variables t_CKUINT local_depth = *(reg_sp+1); - // convert to number of 4-byte words, extra partial word counts as additional word - local_depth = ( local_depth >> 2 ) + ( local_depth & 0x3 ? 1 : 0 ); + // convert to number of int words, extra partial word counts as additional word + local_depth = ( local_depth / sz_UINT ) + ( local_depth & 0x3 ? 1 : 0 ); // get the stack depth of the callee function args - t_CKUINT stack_depth = ( func->stack_depth >> 2 ) + ( func->stack_depth & 0x3 ? 1 : 0 ); + t_CKUINT stack_depth = ( func->stack_depth / sz_UINT ) + ( func->stack_depth & 0x3 ? 1 : 0 ); // get the previous stack depth - caller function args - t_CKUINT prev_stack = ( *(mem_sp-1) >> 2 ) + ( *(mem_sp-1) & 0x3 ? 1 : 0 ); + t_CKUINT prev_stack = ( *(mem_sp-1) / sz_UINT ) + ( *(mem_sp-1) & 0x3 ? 1 : 0 ); // jump the sp mem_sp += prev_stack + local_depth; @@ -2605,13 +2605,13 @@ // MOVED TO BELOW: f_mfun f = (f_mfun)func->native_func; // get the local stack depth - caller local variables t_CKUINT local_depth = *(reg_sp+1); - // convert to number of 4-byte words, extra partial word counts as additional word - local_depth = ( local_depth >> 2 ) + ( local_depth & 0x3 ? 1 : 0 ); + // convert to number of int words, extra partial word counts as additional word + local_depth = ( local_depth / sz_UINT ) + ( local_depth & 0x3 ? 1 : 0 ); // get the stack depth of the callee function args - t_CKUINT stack_depth = ( func->stack_depth >> 2 ) + ( func->stack_depth & 0x3 ? 1 : 0 ); + t_CKUINT stack_depth = ( func->stack_depth / sz_UINT ) + ( func->stack_depth & 0x3 ? 1 : 0 ); // UNUSED: get the previous stack depth - caller function args - // UNUSED: t_CKUINT prev_stack = ( *(mem_sp-1) >> 2 ) + ( *(mem_sp-1) & 0x3 ? 1 : 0 ); - // the amount to push in 4-byte words + // UNUSED: t_CKUINT prev_stack = ( *(mem_sp-1) / sz_UINT ) + ( *(mem_sp-1) & 0x3 ? 1 : 0 ); + // the amount to push in int words t_CKUINT push = local_depth; // push the mem stack passed the current function variables and arguments mem_sp += push; @@ -2661,12 +2661,12 @@ mem_sp -= push; // push the return - if( m_val == 4 ) // ISSUE: 64-bit + if( m_val == sz_UINT ) { // push the return args push_( reg_sp, retval.v_uint ); } - else if( m_val == 8 ) // ISSUE: 64-bit + else if( m_val == sz_FLOAT ) { // push the return args t_CKFLOAT *& sp_double = (t_CKFLOAT *&)reg_sp; @@ -2703,13 +2703,13 @@ f_sfun f = (f_sfun)func->native_func; // get the local stack depth - caller local variables t_CKUINT local_depth = *(reg_sp+1); - // convert to number of 4-byte words, extra partial word counts as additional word - local_depth = ( local_depth >> 2 ) + ( local_depth & 0x3 ? 1 : 0 ); + // convert to number of int words, extra partial word counts as additional word + local_depth = ( local_depth / sz_UINT ) + ( local_depth & 0x3 ? 1 : 0 ); // get the stack depth of the callee function args - t_CKUINT stack_depth = ( func->stack_depth >> 2 ) + ( func->stack_depth & 0x3 ? 1 : 0 ); + t_CKUINT stack_depth = ( func->stack_depth / sz_UINT ) + ( func->stack_depth & 0x3 ? 1 : 0 ); // UNUSED: get the previous stack depth - caller function args - // UNUSED: t_CKUINT prev_stack = ( *(mem_sp-1) >> 2 ) + ( *(mem_sp-1) & 0x3 ? 1 : 0 ); - // the amount to push in 4-byte words + // UNUSED: t_CKUINT prev_stack = ( *(mem_sp-1) / sz_UINT ) + ( *(mem_sp-1) & 0x3 ? 1 : 0 ); + // the amount to push in int words t_CKUINT push = local_depth; // push the mem stack passed the current function variables and arguments mem_sp += push; @@ -2747,12 +2747,12 @@ mem_sp -= push; // push the return - if( m_val == 4 ) // ISSUE: 64-bit + if( m_val == sz_UINT ) // ISSUE: 64-bit { // push the return args push_( reg_sp, retval.v_uint ); } - else if( m_val == 8 ) // ISSUE: 64-bit + else if( m_val == sz_FLOAT ) // ISSUE: 64-bit { // push the return args t_CKFLOAT *& sp_double = (t_CKFLOAT *&)reg_sp; @@ -2985,7 +2985,7 @@ t_CKUINT *& reg_sp = (t_CKUINT *&)shred->reg->sp; // allocate the array - if( m_type_ref->size == 4 ) // ISSUE: 64-bit + if( m_type_ref->size == sz_INT ) // ISSUE: 64-bit { // pop the values pop_( reg_sp, m_length ); @@ -3003,10 +3003,10 @@ // push the pointer push_( reg_sp, (t_CKUINT)array ); } - else if( m_type_ref->size == 8 ) // ISSUE: 64-bit + else if( m_type_ref->size == sz_FLOAT ) // ISSUE: 64-bit { // pop the values - pop_( reg_sp, 2 * m_length ); + pop_( reg_sp, (sz_FLOAT / sz_INT) * m_length ); // instantiate array Chuck_Array8 * array = new Chuck_Array8( m_length ); // problem @@ -3114,7 +3114,7 @@ if( capacity >= top ) { // check size - if( size == 4 ) // ISSUE: 64-bit + if( size == sz_INT ) // ISSUE: 64-bit { Chuck_Array4 * base = new Chuck_Array4( is_obj, *capacity ); if( !base ) goto out_of_memory; @@ -3312,8 +3312,7 @@ // check pointer if( !(*sp) ) goto null_pointer; - // 4 or 8 - if( m_size == 4 ) // ISSUE: 64-bit + if( m_size == sz_INT ) // ISSUE: 64-bit { // get array Chuck_Array4 * arr = (Chuck_Array4 *)(*sp); @@ -3335,7 +3334,7 @@ push_( sp, val ); } } - else if( m_size == 8 ) // ISSUE: 64-bit + else if( m_size == sz_FLOAT ) // ISSUE: 64-bit { // get array Chuck_Array8 * arr = (Chuck_Array8 *)(*sp); @@ -3404,8 +3403,7 @@ // check pointer if( !(*sp) ) goto null_pointer; - // 4 or 8 - if( m_size == 4 ) // ISSUE: 64-bit + if( m_size == sz_INT ) // ISSUE: 64-bit { // get array Chuck_Array4 * arr = (Chuck_Array4 *)(*sp); @@ -3427,7 +3425,7 @@ push_( sp, val ); } } - else if( m_size == 8 ) // ISSUE: 64-bit + else if( m_size == sz_FLOAT ) // ISSUE: 64-bit { // get array Chuck_Array8 * arr = (Chuck_Array8 *)(*sp); @@ -3522,8 +3520,7 @@ } } - // 4 or 8 - if( m_size == 4 ) // ISSUE: 64-bit + if( m_size == sz_INT ) // ISSUE: 64-bit { // get arry Chuck_Array4 * arr = base; @@ -3545,7 +3542,7 @@ push_( sp, val ); } } - else if( m_size == 8 ) // ISSUE: 64-bit + else if( m_size == sz_FLOAT ) // ISSUE: 64-bit { // get array Chuck_Array8 * arr = (Chuck_Array8 *)(base); @@ -3626,9 +3623,8 @@ } else { - // 4 or 8 - if( m_size == 4 ) { push_( sp, *((t_CKUINT *)data) ); } // ISSUE: 64-bit - else if( m_size == 8 ) { push_float( sp, *((t_CKFLOAT *)data) ); } // ISSUE: 64-bit + if( m_size == sz_UINT ) { push_( sp, *((t_CKUINT *)data) ); } // ISSUE: 64-bit + else if( m_size == sz_FLOAT ) { push_float( sp, *((t_CKFLOAT *)data) ); } // ISSUE: 64-bit else assert( FALSE ); } @@ -3717,9 +3713,8 @@ } else { - // 4 or 8 - if( m_size == 4 ) { push_( sp, *((t_CKUINT *)data) ); } // ISSUE: 64-bit - else if( m_size == 8 ) { push_float( sp, *((t_CKFLOAT *)data) ); } // ISSUE: 64-bit + if( m_size == sz_UINT ) { push_( sp, *((t_CKUINT *)data) ); } // ISSUE: 64-bit + else if( m_size == sz_FLOAT ) { push_float( sp, *((t_CKFLOAT *)data) ); } // ISSUE: 64-bit else assert( FALSE ); } } @@ -3744,9 +3739,8 @@ } else { - // 4 or 8 - if( m_size == 4 ) { push_( sp, *((t_CKUINT *)m_addr) ); } // ISSUE: 64-bit - else if( m_size == 8 ) { push_float( sp, *((t_CKFLOAT *)m_addr) ); } // ISSUE: 64-bit + if( m_size == sz_UINT ) { push_( sp, *((t_CKUINT *)m_addr) ); } // ISSUE: 64-bit + else if( m_size == sz_FLOAT ) { push_float( sp, *((t_CKFLOAT *)m_addr) ); } // ISSUE: 64-bit else assert( FALSE ); } } @@ -4110,27 +4104,37 @@ void Chuck_Instr_Hack::execute( Chuck_VM * vm, Chuck_VM_Shred * shred ) { // look at the type - if( m_type_ref->size == 4 ) // ISSUE: 64-bit + switch (m_type_ref->xid) { + case te_int: + case te_uint: { t_CKINT * sp = (t_CKINT *)shred->reg->sp; - if( !isa( m_type_ref, &t_string ) ) - // print it - fprintf( stderr, "%d :(%s)\n", *(sp-1), m_type_ref->c_name() ); - else - fprintf( stderr, "\"%s\" : (%s)\n", ((Chuck_String *)*(sp-1))->str.c_str(), m_type_ref->c_name() ); + // print it + fprintf( stderr, "%d :(%s)\n", *(sp-1), m_type_ref->c_name() ); + break; } - else if( m_type_ref->size == 8 ) // ISSUE: 64-bit + case te_string: + { + t_CKINT * sp = (t_CKINT *)shred->reg->sp; + // print it + fprintf( stderr, "\"%s\" : (%s)\n", ((Chuck_String *)*(sp-1))->str.c_str(), m_type_ref->c_name() ); + break; + } + case te_single: + case te_float: + case te_double: + case te_time: + case te_dur: { t_CKFLOAT * sp = (t_CKFLOAT *)shred->reg->sp; // print it fprintf( stderr, "%f :(%s)\n", *(sp-1), m_type_ref->c_name() ); + break; } - else if( m_type_ref->size == 0 ) - { + default: fprintf( stderr, "... :(%s)\n", m_type_ref->c_name() ); + break; } - else - assert( FALSE ); // flush fflush( stderr ); @@ -4186,37 +4190,48 @@ Chuck_Type * type = m_type_refs[i]; // look at the type - if( type->size == 4 ) // ISSUE: 64-bit - { + switch (type->xid) { + case te_int: + case te_uint: + { t_CKINT * sp = (t_CKINT *)the_sp; - if( !isa( type, &t_string ) ) - { - if( isa( type, &t_object ) ) - // print it - fprintf( stderr, "0x%x ", *(sp) ); - else - // print it - fprintf( stderr, "%d ", *(sp) ); - } - else - fprintf( stderr, "%s ", ((Chuck_String *)*(sp))->str.c_str() ); - - the_sp += 4; - } - else if( type->size == 8 ) // ISSUE: 64-bit - { + // print it + fprintf( stderr, "%d ", *(sp) ); + the_sp += sz_INT; + break; + } + case te_object: + { + t_CKINT * sp = (t_CKINT *)the_sp; + // print it + fprintf( stderr, "0x%x ", *(sp) ); + the_sp += sz_INT; + break; + } + case te_string: + { + t_CKINT * sp = (t_CKINT *)the_sp; + // print it + fprintf( stderr, "%s ", ((Chuck_String *)*(sp))->str.c_str() ); + the_sp += sz_INT; + break; + } + case te_single: + case te_float: + case te_double: + case te_time: + case te_dur: + { t_CKFLOAT * sp = (t_CKFLOAT *)the_sp; // print it fprintf( stderr, "%f ", *(sp) ); - - the_sp += 8; - } - else if( type->size == 0 ) - { + the_sp += sz_FLOAT; + break; + } + default: fprintf( stderr, "... " ); - } - else - assert( FALSE ); + break; + } } fprintf( stderr, "\n" ); --- chuck-1.2.0.8.dfsg.orig/src/chuck_oo.h +++ chuck-1.2.0.8.dfsg/src/chuck_oo.h @@ -152,8 +152,8 @@ -#define CHUCK_ARRAY4_DATASIZE 4 -#define CHUCK_ARRAY8_DATASIZE 8 +#define CHUCK_ARRAY4_DATASIZE sz_INT +#define CHUCK_ARRAY8_DATASIZE sz_FLOAT //----------------------------------------------------------------------------- // name: struct Chuck_Array // desc: native ChucK arrays ( virtual base class ) --- chuck-1.2.0.8.dfsg.orig/src/chuck_vm.h +++ chuck-1.2.0.8.dfsg/src/chuck_vm.h @@ -41,6 +41,7 @@ #include "chuck_stats.h" #endif +#include #include #include #include --- chuck-1.2.0.8.dfsg.orig/src/makefile +++ chuck-1.2.0.8.dfsg/src/makefile @@ -1,11 +1,12 @@ -DESTDIR=/usr/bin +DESTDIR= +PREFIX=/usr/bin current: @echo "[chuck build]: please use one of the following configurations:"; echo " make linux-alsa, make linux-jack, make linux-oss,"; echo " make osx, make osx-ub, or make win32" install: - cp $(wildcard chuck chuck.exe) $(DESTDIR)/ - chmod 755 $(DESTDIR)/$(wildcard chuck chuck.exe) + cp $(wildcard chuck chuck.oss chuck.exe) $(DESTDIR)/$(PREFIX) + chmod 755 $(DESTDIR)/$(PREFIX)/$(wildcard chuck chuck.alsa chuck.oss chuck.exe) osx: -make -f makefile.osx @@ -36,4 +37,4 @@ -make -f makefile.rl clean: - rm -f *.o chuck.tab.c chuck.tab.h chuck.yy.c chuck.output $(wildcard chuck chuck.exe) + rm -f *.o chuck.tab.c chuck.tab.h chuck.yy.c chuck.output $(wildcard chuck chuck.alsa chuck.oss chuck.exe) --- chuck-1.2.0.8.dfsg.orig/src/makefile.alsa +++ chuck-1.2.0.8.dfsg/src/makefile.alsa @@ -5,7 +5,7 @@ INCLUDES= CFLAGS?= -O3 FLAGS= -D__LINUX_ALSA__ -c $(CFLAGS) -LIBS=-lasound -lstdc++ -ldl -lm +LIBS=-lasound -lstdc++ -ldl -lm -lpthread SF_OBJ=util_sndfile.o ifneq ($(CHUCK_DEBUG),) --- chuck-1.2.0.8.dfsg.orig/src/makefile.jack +++ chuck-1.2.0.8.dfsg/src/makefile.jack @@ -6,7 +6,7 @@ INCLUDES= CFLAGS?= -O3 FLAGS= -D__LINUX_JACK__ -c $(CFLAGS) -LIBS=-lasound -ljack -lstdc++ -ldl -lm +LIBS=-lasound -ljack -lstdc++ -ldl -lm -lpthread SF_OBJ=util_sndfile.o ifneq ($(CHUCK_DEBUG),) --- chuck-1.2.0.8.dfsg.orig/src/rtaudio.cpp +++ chuck-1.2.0.8.dfsg/src/rtaudio.cpp @@ -50,6 +50,7 @@ #include "chuck_errmsg.h" #include "digiio_rtaudio.h" #include +#include // old // #include "RtAudio.h" // #include @@ -4023,7 +4024,7 @@ snd_pcm_sw_params_alloca( &sw_params ); snd_pcm_sw_params_current( handle, sw_params ); snd_pcm_sw_params_set_start_threshold( handle, sw_params, *bufferSize ); - snd_pcm_sw_params_set_stop_threshold( handle, sw_params, 0x7fffffff ); + snd_pcm_sw_params_set_stop_threshold( handle, sw_params, LONG_MAX ); snd_pcm_sw_params_set_silence_threshold( handle, sw_params, 0 ); snd_pcm_sw_params_set_silence_size( handle, sw_params, INT_MAX ); err = snd_pcm_sw_params( handle, sw_params ); --- chuck-1.2.0.8.dfsg.orig/src/ugen_stk.cpp +++ chuck-1.2.0.8.dfsg/src/ugen_stk.cpp @@ -41,7 +41,7 @@ #include #include #include - +#include --- chuck-1.2.0.8.dfsg.orig/src/ugen_xxx.cpp +++ chuck-1.2.0.8.dfsg/src/ugen_xxx.cpp @@ -2577,7 +2577,7 @@ // open it SF_INFO info; info.format = 0; - char * format = strrchr( filename, '.'); + const char * format = strrchr( filename, '.'); if( format && strcmp( format, ".raw" ) == 0 ) { fprintf( stderr, "[chuck](via SndBuf) %s :: type is '.raw'...\n assuming 16 bit signed mono (PCM)\n", filename ); --- chuck-1.2.0.8.dfsg.orig/src/ulib_std.cpp +++ chuck-1.2.0.8.dfsg/src/ulib_std.cpp @@ -549,8 +549,8 @@ // randi CK_DLL_SFUN( rand2_impl ) // inclusive. { - int min = *(int *)ARGS, max = *((int *)ARGS + 1); - int range = max - min; + t_CKINT min = *(t_CKINT *)ARGS, max = *((t_CKINT *)ARGS + 1); + t_CKINT range = max - min; if ( range == 0 ) { RETURN->v_int = min; @@ -562,11 +562,11 @@ { if( range > 0 ) { - RETURN->v_int = min + (int) ( (1.0 + range) * ( ::rand()/(RAND_MAX+1.0) ) ); + RETURN->v_int = min + (t_CKINT) ( (1.0 + range) * ( ::rand()/(RAND_MAX+1.0) ) ); } else { - RETURN->v_int = min - (int) ( (-range + 1.0) * ( ::rand()/(RAND_MAX+1.0) ) ); + RETURN->v_int = min - (t_CKINT) ( (-range + 1.0) * ( ::rand()/(RAND_MAX+1.0) ) ); } } } --- chuck-1.2.0.8.dfsg.orig/src/util_hid.cpp +++ chuck-1.2.0.8.dfsg/src/util_hid.cpp @@ -37,6 +37,7 @@ #include #include +#include using namespace std; --- chuck-1.2.0.8.dfsg.orig/src/util_string.h +++ chuck-1.2.0.8.dfsg/src/util_string.h @@ -34,6 +34,7 @@ #define __UTIL_STRING_H__ #include "chuck_def.h" +#include #include #include