/[svn]/linuxsampler/trunk/src/jackio.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/jackio.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 32 by schoenebeck, Sun Jan 18 20:31:31 2004 UTC revision 33 by schoenebeck, Mon Feb 16 19:30:42 2004 UTC
# Line 28  JackIO::JackIO() : AudioIO() { Line 28  JackIO::JackIO() : AudioIO() {
28      PendingSamples = 0;      PendingSamples = 0;
29  }  }
30    
31  int JackIO::Initialize(uint Channels) {  int JackIO::Initialize(uint Channels, String OutputPorts[2]) {
32      this->uiChannels   = Channels;      this->uiChannels   = Channels;
33      this->bInterleaved = false;      this->bInterleaved = false;
34    
# Line 44  int JackIO::Initialize(uint Channels) { Line 44  int JackIO::Initialize(uint Channels) {
44      this->uiSamplerate         = jack_get_sample_rate(Client);      this->uiSamplerate         = jack_get_sample_rate(Client);
45      this->bInitialized         = true;      this->bInitialized         = true;
46    
47        // Acquire given output ports
48        if(OutputPorts[0] != "")
49            if ((this->playback_port[0] = jack_port_by_name(Client, OutputPorts[0].c_str())) == 0)
50                fprintf (stderr, "JackIO: Invalid playback port %s.\n", OutputPorts[0].c_str());
51        if(OutputPorts[1] != "")
52            if ((this->playback_port[1] = jack_port_by_name(Client, OutputPorts[1].c_str())) == 0)
53                fprintf (stderr, "JackIO: Invalid playback port %s.\n", OutputPorts[1].c_str());
54    
55      return 0;      return 0;
56  }  }
57    
# Line 64  void JackIO::Activate() { Line 72  void JackIO::Activate() {
72          Close();          Close();
73          exit(-1);          exit(-1);
74      }      }
75    
76        // Connect to given output ports
77        if (playback_port[0])
78            if (jack_connect(Client, jack_port_name(Ports[0]), jack_port_name(playback_port[0])))
79                fprintf (stderr, "JackIO: Cannot connect port 0.\n");
80        if (playback_port[1])
81            if (jack_connect(Client, jack_port_name(Ports[1]), jack_port_name(playback_port[1])))
82                fprintf (stderr, "JackIO: Cannot connect port 1.\n");
83  }  }
84    
85  int JackIO::Process(uint Samples) {  int JackIO::Process(uint Samples) {

Legend:
Removed from v.32  
changed lines
  Added in v.33

  ViewVC Help
Powered by ViewVC