~ubuntu-branches/ubuntu/wily/zynaddsubfx/wily-proposed

« back to all changes in this revision

Viewing changes to debian/patches/08_jackaudiooutput.patch

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2007-12-16 17:59:25 UTC
  • Revision ID: james.westby@ubuntu.com-20071216175925-q2uk20qzttvcybru
Tags: 2.2.1-4.1
* Non-maintainer upload.
* Change fftw3-dev build-dep to libfftw3-dev (Closes: #445792)
* Add quilt patching system
* Make clean not ignore errors in rules
* Remove unused debhelper commands in rules
* debian/menu - Change section Apps/Sound to Sound
* Add watch file
* Add Homepage field in control
* Remove deprecated encoding field from desktop file
* 01_kfreebsd_fix.patch (Closes: #415675)
  + src/Makefile.inc - fall back to OSS on kfreebsd
* Move previous source changes to patches
  + 015_oss_and_jack.patch - Use OSS_AND_JACK, not just OSS
  + 02_makefile.patch - Add install target
  + 03_main.patch - Add noui as a parameter to initprogram()
  + 04_virkeyboard.patch - Warning and crash caused in virtual keyboard
    + patch by Guus Sliepen
  + 05_partui.patch - Add PartUI_() function
  + 06_bankui.patch - Add BankProcess_() function
  + 07_ossaudiooutput.patch - Big Endian Fix
  + 08_jackaudiooutput.patch - Add jack ports
  + 09_envelopeparams.patch - Set realtime priority accordingly
  + 10_LFO.patch - Improve frequency randomizer
* Bump debhelper build-dep and compat to 5
* Bump standards version to 3.7.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff -urN zynaddsubfx-2.2.1.orig/src/Output/JACKaudiooutput.C zynaddsubfx-2.2.1/src/Output/JACKaudiooutput.C
 
2
--- zynaddsubfx-2.2.1.orig/src/Output/JACKaudiooutput.C 2005-03-12 13:16:26.000000000 -0500
 
3
+++ zynaddsubfx-2.2.1/src/Output/JACKaudiooutput.C      2007-12-17 06:39:20.000000000 -0500
 
4
@@ -35,6 +35,7 @@
 
5
     jackmaster=master_;
 
6
     jackclient=0;
 
7
     char tmpstr[100];
 
8
+    const char **ports;
 
9
 
 
10
     for (int i=0;i<15;i++){
 
11
        if (i!=0) snprintf(tmpstr,100,"ZynAddSubFX_%d",i);
 
12
@@ -50,7 +51,7 @@
 
13
 
 
14
     fprintf(stderr,"Internal SampleRate   = %d\nJack Output SampleRate= %d\n",SAMPLE_RATE,jack_get_sample_rate(jackclient));
 
15
     if ((unsigned int)jack_get_sample_rate(jackclient)!=(unsigned int) SAMPLE_RATE) 
 
16
-       fprintf(stderr,"It is recomanded that the both samplerates to be equal.\n");
 
17
+       fprintf(stderr,"It is recommended that both of the samplerates be equal.\n");
 
18
     
 
19
     jack_set_process_callback(jackclient,jackprocess,0);    
 
20
     jack_set_sample_rate_callback(jackclient,jacksrate,0);    
 
21
@@ -66,10 +67,19 @@
 
22
        return(false);
 
23
     };
 
24
     
 
25
-    /*
 
26
+   /*
 
27
     jack_connect(jackclient,jack_port_name(outport_left),"alsa_pcm:out_1");
 
28
     jack_connect(jackclient,jack_port_name(outport_right),"alsa_pcm:out_2");
 
29
-     */
 
30
+   */
 
31
+
 
32
+    if ((ports = jack_get_ports (jackclient, NULL, NULL, JackPortIsPhysical|JackPortIsInput)) == NULL)
 
33
+       fprintf(stderr,"Cannot connect to jack output, you may hear no sound\n");       else {
 
34
+      if (jack_connect(jackclient,jack_port_name(outport_left),ports[0]))
 
35
+       fprintf(stderr,"Cannot connect to left output port\n");
 
36
+      if (jack_connect(jackclient,jack_port_name(outport_right),ports[1]))
 
37
+       fprintf(stderr,"Cannot connect to right output port\n");
 
38
+    }
 
39
+
 
40
      return(true);
 
41
 };
 
42