2 |
* * |
* * |
3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* * |
* * |
7 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
8 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
41 |
* @throws AudioOutputException on error |
* @throws AudioOutputException on error |
42 |
* @see AcquireChannels() |
* @see AcquireChannels() |
43 |
*/ |
*/ |
44 |
AudioOutputDeviceJack::AudioOutputDeviceJack(String* AutoConnectPortIDs, uint AutoConnectPorts) : AudioOutputDevice() { |
AudioOutputDeviceJack::AudioOutputDeviceJack(String* AutoConnectPortIDs, uint AutoConnectPorts) : AudioOutputDevice(AudioOutputDevice::type_jack) { |
45 |
if ((hJackClient = jack_client_new("LinuxSampler")) == 0) |
if ((hJackClient = jack_client_new("LinuxSampler")) == 0) |
46 |
throw AudioOutputException("Seems Jack server not running."); |
throw AudioOutputException("Seems Jack server not running."); |
47 |
|
|
110 |
|
|
111 |
void AudioOutputDeviceJack::AcquireChannels(uint uiChannels) { |
void AudioOutputDeviceJack::AcquireChannels(uint uiChannels) { |
112 |
if (uiChannels > this->Channels.size()) { |
if (uiChannels > this->Channels.size()) { |
113 |
for (int c = uiChannels; c < uiChannels; c++) { |
for (int c = this->Channels.size(); c < uiChannels; c++) { |
114 |
// create new jack output port |
// create new jack output port |
115 |
std::stringstream portid; portid << "LinuxSampler:" << c; |
std::stringstream portid; portid << "LinuxSampler:" << c; |
116 |
jack_port_t* newport; |
jack_port_t* newport; |