Commit 00b166e7 authored by sletz's avatar sletz
Browse files

Cleanup code using snprintf.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4586 0c269be4-1314-0410-8aa9-9f06e86f4224
parent d91cd422
......@@ -150,8 +150,8 @@ int JackAudioDriver::Attach()
jack_log("JackAudioDriver::Attach fBufferSize = %ld fSampleRate = %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate);
for (i = 0; i < fCaptureChannels; i++) {
snprintf(alias, sizeof(alias) - 1, "%s:%s:out%d", fAliasName, fCaptureDriverName, i + 1);
snprintf(name, sizeof(name) - 1, "%s:capture_%d", fClientControl.fName, i + 1);
snprintf(alias, sizeof(alias), "%s:%s:out%d", fAliasName, fCaptureDriverName, i + 1);
snprintf(name, sizeof(name), "%s:capture_%d", fClientControl.fName, i + 1);
if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, CaptureDriverFlags, fEngineControl->fBufferSize, &port_index) < 0) {
jack_error("driver: cannot register port for %s", name);
return -1;
......@@ -163,8 +163,8 @@ int JackAudioDriver::Attach()
}
for (i = 0; i < fPlaybackChannels; i++) {
snprintf(alias, sizeof(alias) - 1, "%s:%s:in%d", fAliasName, fPlaybackDriverName, i + 1);
snprintf(name, sizeof(name) - 1, "%s:playback_%d", fClientControl.fName, i + 1);
snprintf(alias, sizeof(alias), "%s:%s:in%d", fAliasName, fPlaybackDriverName, i + 1);
snprintf(name, sizeof(name), "%s:playback_%d", fClientControl.fName, i + 1);
if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, PlaybackDriverFlags, fEngineControl->fBufferSize, &port_index) < 0) {
jack_error("driver: cannot register port for %s", name);
return -1;
......@@ -177,7 +177,7 @@ int JackAudioDriver::Attach()
// Monitor ports
if (fWithMonitorPorts) {
jack_log("Create monitor port");
snprintf(name, sizeof(name) - 1, "%s:monitor_%u", fClientControl.fName, i + 1);
snprintf(name, sizeof(name), "%s:monitor_%u", fClientControl.fName, i + 1);
if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, fEngineControl->fBufferSize, &port_index) < 0) {
jack_error("Cannot register monitor port for %s", name);
return -1;
......
......@@ -23,7 +23,7 @@ namespace Jack
{
bool JackGlobals::fVerbose = 0;
jack_tls_key JackGlobals::fRealTime;
static bool gKeyRealtimeInitialized = jack_tls_allocate_key(&JackGlobals::fRealTime);
......@@ -37,7 +37,7 @@ JackClient* JackGlobals::fClientTable[CLIENT_NUM] = {};
#ifndef WIN32
jack_thread_creator_t JackGlobals::fJackThreadCreator = pthread_create;
#endif
#ifdef __CLIENTDEBUG__
std::ofstream* JackGlobals::fStream = NULL;
......@@ -59,6 +59,6 @@ void JackGlobals::CheckContext(const char* name)
}
(*fStream) << "JACK API call : " << name << ", calling thread : " << pthread_self() << std::endl;
}
#endif
#endif
} // end of namespace
......@@ -65,8 +65,8 @@ int JackMidiDriver::Attach()
jack_log("JackMidiDriver::Attach fBufferSize = %ld fSampleRate = %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate);
for (i = 0; i < fCaptureChannels; i++) {
snprintf(alias, sizeof(alias) - 1, "%s:%s:out%d", fAliasName, fCaptureDriverName, i + 1);
snprintf(name, sizeof(name) - 1, "%s:capture_%d", fClientControl.fName, i + 1);
snprintf(alias, sizeof(alias), "%s:%s:out%d", fAliasName, fCaptureDriverName, i + 1);
snprintf(name, sizeof(name), "%s:capture_%d", fClientControl.fName, i + 1);
if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_MIDI_TYPE, CaptureDriverFlags, fEngineControl->fBufferSize, &port_index) < 0) {
jack_error("driver: cannot register port for %s", name);
return -1;
......@@ -78,8 +78,8 @@ int JackMidiDriver::Attach()
}
for (i = 0; i < fPlaybackChannels; i++) {
snprintf(alias, sizeof(alias) - 1, "%s:%s:in%d", fAliasName, fPlaybackDriverName, i + 1);
snprintf(name, sizeof(name) - 1, "%s:playback_%d", fClientControl.fName, i + 1);
snprintf(alias, sizeof(alias), "%s:%s:in%d", fAliasName, fPlaybackDriverName, i + 1);
(name, sizeof(name), "%s:playback_%d", fClientControl.fName, i + 1);
if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_MIDI_TYPE, PlaybackDriverFlags, fEngineControl->fBufferSize, &port_index) < 0) {
jack_error("driver: cannot register port for %s", name);
return -1;
......
......@@ -253,8 +253,8 @@ namespace Jack
//audio
for (audio_port_index = 0; audio_port_index < fCaptureChannels; audio_port_index++) {
snprintf(alias, sizeof(alias) - 1, "%s:%s:out%d", fAliasName, fCaptureDriverName, audio_port_index + 1);
snprintf(name, sizeof(name) - 1, "%s:capture_%d", fClientControl.fName, audio_port_index + 1);
snprintf(alias, sizeof(alias), "%s:%s:out%d", fAliasName, fCaptureDriverName, audio_port_index + 1);
snprintf(name, sizeof(name), "%s:capture_%d", fClientControl.fName, audio_port_index + 1);
if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE,
CaptureDriverFlags, fEngineControl->fBufferSize, &port_index) < 0) {
jack_error("driver: cannot register port for %s", name);
......@@ -271,8 +271,8 @@ namespace Jack
}
for (audio_port_index = 0; audio_port_index < fPlaybackChannels; audio_port_index++) {
snprintf(alias, sizeof(alias) - 1, "%s:%s:in%d", fAliasName, fPlaybackDriverName, audio_port_index + 1);
snprintf(name, sizeof(name) - 1, "%s:playback_%d",fClientControl.fName, audio_port_index + 1);
snprintf(alias, sizeof(alias), "%s:%s:in%d", fAliasName, fPlaybackDriverName, audio_port_index + 1);
snprintf(name, sizeof(name), "%s:playback_%d",fClientControl.fName, audio_port_index + 1);
if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE,
PlaybackDriverFlags, fEngineControl->fBufferSize, &port_index) < 0) {
jack_error("driver: cannot register port for %s", name);
......@@ -290,8 +290,8 @@ namespace Jack
//midi
for (midi_port_index = 0; midi_port_index < fParams.fSendMidiChannels; midi_port_index++) {
snprintf(alias, sizeof(alias) - 1, "%s:%s:out%d", fAliasName, fCaptureDriverName, midi_port_index + 1);
snprintf(name, sizeof (name) - 1, "%s:midi_capture_%d", fClientControl.fName, midi_port_index + 1);
snprintf(alias, sizeof(alias), "%s:%s:out%d", fAliasName, fCaptureDriverName, midi_port_index + 1);
snprintf(name, sizeof (name), "%s:midi_capture_%d", fClientControl.fName, midi_port_index + 1);
if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_MIDI_TYPE,
CaptureDriverFlags, fEngineControl->fBufferSize, &port_index) < 0) {
jack_error("driver: cannot register port for %s", name);
......@@ -307,8 +307,8 @@ namespace Jack
}
for (midi_port_index = 0; midi_port_index < fParams.fReturnMidiChannels; midi_port_index++) {
snprintf(alias, sizeof(alias) - 1, "%s:%s:in%d", fAliasName, fPlaybackDriverName, midi_port_index + 1);
snprintf(name, sizeof(name) - 1, "%s:midi_playback_%d", fClientControl.fName, midi_port_index + 1);
snprintf(alias, sizeof(alias), "%s:%s:in%d", fAliasName, fPlaybackDriverName, midi_port_index + 1);
snprintf(name, sizeof(name), "%s:midi_playback_%d", fClientControl.fName, midi_port_index + 1);
if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_MIDI_TYPE,
PlaybackDriverFlags, fEngineControl->fBufferSize, &port_index) < 0) {
jack_error("driver: cannot register port for %s", name);
......
......@@ -114,8 +114,8 @@ int JackAlsaDriver::Attach()
jack_log("JackAlsaDriver::Attach fBufferSize %ld fSampleRate %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate);
for (int i = 0; i < fCaptureChannels; i++) {
snprintf(alias, sizeof(alias) - 1, "%s:%s:out%d", fAliasName, fCaptureDriverName, i + 1);
snprintf(name, sizeof(name) - 1, "%s:capture_%d", fClientControl.fName, i + 1);
snprintf(alias, sizeof(alias), "%s:%s:out%d", fAliasName, fCaptureDriverName, i + 1);
snprintf(name, sizeof(name), "%s:capture_%d", fClientControl.fName, i + 1);
if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize, &port_index) < 0) {
jack_error("driver: cannot register port for %s", name);
return -1;
......@@ -129,8 +129,8 @@ int JackAlsaDriver::Attach()
port_flags = (unsigned long)PlaybackDriverFlags;
for (int i = 0; i < fPlaybackChannels; i++) {
snprintf(alias, sizeof(alias) - 1, "%s:%s:in%d", fAliasName, fPlaybackDriverName, i + 1);
snprintf(name, sizeof(name) - 1, "%s:playback_%d", fClientControl.fName, i + 1);
snprintf(alias, sizeof(alias), "%s:%s:in%d", fAliasName, fPlaybackDriverName, i + 1);
snprintf(name, sizeof(name), "%s:playback_%d", fClientControl.fName, i + 1);
if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize, &port_index) < 0) {
jack_error("driver: cannot register port for %s", name);
return -1;
......@@ -143,7 +143,7 @@ int JackAlsaDriver::Attach()
// Monitor ports
if (fWithMonitorPorts) {
jack_log("Create monitor port");
snprintf(name, sizeof(name) - 1, "%s:monitor_%d", fClientControl.fName, i + 1);
snprintf(name, sizeof(name), "%s:monitor_%d", fClientControl.fName, i + 1);
if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, MonitorDriverFlags, fEngineControl->fBufferSize, &port_index) < 0) {
jack_error("ALSA: cannot register monitor port for %s", name);
} else {
......@@ -278,14 +278,14 @@ int JackAlsaDriver::Open(jack_nframes_t nframes,
int playback_card = card_to_num(playback_driver_name);
char audio_name[32];
snprintf(audio_name, sizeof(audio_name) - 1, "Audio%d", capture_card);
snprintf(audio_name, sizeof(audio_name), "Audio%d", capture_card);
if (!JackServerGlobals::on_device_acquire(audio_name)) {
jack_error("Audio device %s cannot be acquired...", capture_driver_name);
return -1;
}
if (playback_card != capture_card) {
snprintf(audio_name, sizeof(audio_name) - 1, "Audio%d", playback_card);
snprintf(audio_name, sizeof(audio_name), "Audio%d", playback_card);
if (!JackServerGlobals::on_device_acquire(audio_name)) {
jack_error("Audio device %s cannot be acquired...", playback_driver_name);
return -1;
......@@ -334,13 +334,13 @@ int JackAlsaDriver::Close()
char audio_name[32];
int capture_card = card_to_num(fCaptureDriverName);
if (capture_card >= 0) {
snprintf(audio_name, sizeof(audio_name) - 1, "Audio%d", capture_card);
snprintf(audio_name, sizeof(audio_name), "Audio%d", capture_card);
JackServerGlobals::on_device_release(audio_name);
}
int playback_card = card_to_num(fPlaybackDriverName);
if (playback_card >= 0 && playback_card != capture_card) {
snprintf(audio_name, sizeof(audio_name) - 1, "Audio%d", playback_card);
(audio_name, sizeof(audio_name), "Audio%d", playback_card);
JackServerGlobals::on_device_release(audio_name);
}
}
......
......@@ -427,9 +427,9 @@ inline int midi_port_open_jack(alsa_rawmidi_t *midi, midi_port_t *port, int type
char name[128];
if (type & JackPortIsOutput)
snprintf(name, sizeof(name) - 1, "system:midi_capture_%d", ++midi->midi_in_cnt);
snprintf(name, sizeof(name), "system:midi_capture_%d", ++midi->midi_in_cnt);
else
snprintf(name, sizeof(name) - 1, "system:midi_playback_%d", ++midi->midi_out_cnt);
snprintf(name, sizeof(name), "system:midi_playback_%d", ++midi->midi_out_cnt);
port->jack = jack_port_register(midi->client, name, JACK_DEFAULT_MIDI_TYPE,
type | JackPortIsPhysical | JackPortIsTerminal, 0);
......
......@@ -492,9 +492,9 @@ port_t* port_create(alsa_seqmidi_t *self, int type, snd_seq_addr_t addr, const s
}
if (jack_caps & JackPortIsOutput)
snprintf(name, sizeof(name) - 1, "system:midi_capture_%d", ++self->midi_in_cnt);
snprintf(name, sizeof(name), "system:midi_capture_%d", ++self->midi_in_cnt);
else
snprintf(name, sizeof(name) - 1, "system:midi_playback_%d", ++self->midi_out_cnt);
snprintf(name, sizeof(name), "system:midi_playback_%d", ++self->midi_out_cnt);
port->jack_port = jack_port_register(self->jack,
name, JACK_DEFAULT_MIDI_TYPE, jack_caps, 0);
......
......@@ -414,11 +414,11 @@ int JackFFADODriver::Attach()
fCaptureChannels = 0;
for (channel_t chn = 0; chn < driver->capture_nchannels; chn++) {
ffado_streaming_get_capture_stream_name(driver->dev, chn, portname, sizeof(portname) - 1);
ffado_streaming_get_capture_stream_name(driver->dev, chn, portname, sizeof(portname));
driver->capture_channels[chn].stream_type = ffado_streaming_get_capture_stream_type(driver->dev, chn);
if (driver->capture_channels[chn].stream_type == ffado_stream_type_audio) {
snprintf(buf, sizeof(buf) - 1, "firewire_pcm:%s_in", portname);
snprintf(buf, sizeof(buf), "firewire_pcm:%s_in", portname);
printMessage ("Registering audio capture port %s", buf);
if (fEngine->PortRegister(fClientControl.fRefNum, buf,
JACK_DEFAULT_AUDIO_TYPE,
......@@ -438,13 +438,13 @@ int JackFFADODriver::Attach()
range.min = range.max = driver->period_size + driver->capture_frame_latency;
port->SetLatencyRange(JackCaptureLatency, &range);
// capture port aliases (jackd1 style port names)
snprintf(buf, sizeof(buf) - 1, "%s:capture_%i", fClientControl.fName, (int) chn + 1);
snprintf(buf, sizeof(buf), "%s:capture_%i", fClientControl.fName, (int) chn + 1);
port->SetAlias(buf);
fCapturePortList[chn] = port_index;
jack_log("JackFFADODriver::Attach fCapturePortList[i] %ld ", port_index);
fCaptureChannels++;
} else if (driver->capture_channels[chn].stream_type == ffado_stream_type_midi) {
snprintf(buf, sizeof(buf) - 1, "firewire_pcm:%s_in", portname);
snprintf(buf, sizeof(buf), "firewire_pcm:%s_in", portname);
printMessage ("Registering midi capture port %s", buf);
if (fEngine->PortRegister(fClientControl.fRefNum, buf,
JACK_DEFAULT_MIDI_TYPE,
......@@ -487,12 +487,12 @@ int JackFFADODriver::Attach()
fPlaybackChannels = 0;
for (channel_t chn = 0; chn < driver->playback_nchannels; chn++) {
ffado_streaming_get_playback_stream_name(driver->dev, chn, portname, sizeof(portname) - 1);
ffado_streaming_get_playback_stream_name(driver->dev, chn, portname, sizeof(portname));
driver->playback_channels[chn].stream_type = ffado_streaming_get_playback_stream_type(driver->dev, chn);
if (driver->playback_channels[chn].stream_type == ffado_stream_type_audio) {
snprintf(buf, sizeof(buf) - 1, "firewire_pcm:%s_out", portname);
snprintf(buf, sizeof(buf), "firewire_pcm:%s_out", portname);
printMessage ("Registering audio playback port %s", buf);
if (fEngine->PortRegister(fClientControl.fRefNum, buf,
JACK_DEFAULT_AUDIO_TYPE,
......@@ -515,13 +515,13 @@ int JackFFADODriver::Attach()
range.min = range.max = (driver->period_size * (driver->device_options.nb_buffers - 1)) + ((fEngineControl->fSyncMode) ? 0 : fEngineControl->fBufferSize) + driver->playback_frame_latency;
port->SetLatencyRange(JackPlaybackLatency, &range);
// playback port aliases (jackd1 style port names)
snprintf(buf, sizeof(buf) - 1, "%s:playback_%i", fClientControl.fName, (int) chn + 1);
snprintf(buf, sizeof(buf), "%s:playback_%i", fClientControl.fName, (int) chn + 1);
port->SetAlias(buf);
fPlaybackPortList[chn] = port_index;
jack_log("JackFFADODriver::Attach fPlaybackPortList[i] %ld ", port_index);
fPlaybackChannels++;
} else if (driver->playback_channels[chn].stream_type == ffado_stream_type_midi) {
snprintf(buf, sizeof(buf) - 1, "firewire_pcm:%s_out", portname);
snprintf(buf, sizeof(buf), "firewire_pcm:%s_out", portname);
printMessage ("Registering midi playback port %s", buf);
if (fEngine->PortRegister(fClientControl.fRefNum, buf,
......
......@@ -510,7 +510,7 @@ JackFreebobDriver::freebob_driver_midi_init(freebob_driver_t *driver)
continue;
}
freebob_streaming_get_capture_stream_name(dev, chn, buf, sizeof(buf) - 1);
freebob_streaming_get_capture_stream_name(dev, chn, buf, sizeof(buf));
printMessage("Register MIDI IN port %s", buf);
m->input_ports[i]->seq_port_nr = snd_seq_create_simple_port(m->seq_handle, buf,
......@@ -567,7 +567,7 @@ JackFreebobDriver::freebob_driver_midi_init(freebob_driver_t *driver)
continue;
}
freebob_streaming_get_playback_stream_name(dev, chn, buf, sizeof(buf) - 1);
freebob_streaming_get_playback_stream_name(dev, chn, buf, sizeof(buf));
printMessage("Register MIDI OUT port %s", buf);
m->output_ports[i]->seq_port_nr = snd_seq_create_simple_port(m->seq_handle, buf,
......@@ -723,8 +723,8 @@ int JackFreebobDriver::Attach()
for (unsigned int i = 0; i < driver->capture_nchannels; i++) {
freebob_streaming_get_capture_stream_name(driver->dev, i, portname, sizeof(portname) - 1);
snprintf(buf, sizeof(buf) - 1, "%s:%s", fClientControl.fName, portname);
freebob_streaming_get_capture_stream_name(driver->dev, i, portname, sizeof(portname));
snprintf(buf, sizeof(buf), "%s:%s", fClientControl.fName, portname);
if (freebob_streaming_get_capture_stream_type(driver->dev, i) != freebob_stream_type_audio) {
printMessage ("Don't register capture port %s", buf);
......@@ -753,8 +753,8 @@ int JackFreebobDriver::Attach()
for (unsigned int i = 0; i < driver->playback_nchannels; i++) {
freebob_streaming_get_playback_stream_name(driver->dev, i, portname, sizeof(portname) - 1);
snprintf(buf, sizeof(buf) - 1, "%s:%s", fClientControl.fName, portname);
freebob_streaming_get_playback_stream_name(driver->dev, i, portname, sizeof(portname));
snprintf(buf, sizeof(buf), "%s:%s", fClientControl.fName, portname);
if (freebob_streaming_get_playback_stream_type(driver->dev, i) != freebob_stream_type_audio) {
printMessage ("Don't register playback port %s", buf);
......
......@@ -1926,12 +1926,12 @@ int JackCoreAudioDriver::Attach()
if (err != noErr) {
jack_log("AudioDeviceGetProperty kAudioDevicePropertyChannelName error");
}
snprintf(alias, sizeof(alias) - 1, "%s:%s:out_%s%u", fAliasName, fCaptureDriverName, channel_name, i + 1);
snprintf(alias, sizeof(alias), "%s:%s:out_%s%u", fAliasName, fCaptureDriverName, channel_name, i + 1);
} else {
snprintf(alias, sizeof(alias) - 1, "%s:%s:out%u", fAliasName, fCaptureDriverName, i + 1);
snprintf(alias, sizeof(alias), "%s:%s:out%u", fAliasName, fCaptureDriverName, i + 1);
}
snprintf(name, sizeof(name) - 1, "%s:capture_%d", fClientControl.fName, i + 1);
snprintf(name, sizeof(name), "%s:capture_%d", fClientControl.fName, i + 1);
if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, CaptureDriverFlags, fEngineControl->fBufferSize, &port_index) < 0) {
jack_error("Cannot register port for %s", name);
......@@ -1954,12 +1954,12 @@ int JackCoreAudioDriver::Attach()
if (err != noErr) {
jack_log("AudioDeviceGetProperty kAudioDevicePropertyChannelName error");
}
snprintf(alias, sizeof(alias) - 1, "%s:%s:in_%s%u", fAliasName, fPlaybackDriverName, channel_name, i + 1);
snprintf(alias, sizeof(alias), "%s:%s:in_%s%u", fAliasName, fPlaybackDriverName, channel_name, i + 1);
} else {
snprintf(alias, sizeof(alias) - 1, "%s:%s:in%u", fAliasName, fPlaybackDriverName, i + 1);
snprintf(alias, sizeof(alias), "%s:%s:in%u", fAliasName, fPlaybackDriverName, i + 1);
}
snprintf(name, sizeof(name) - 1, "%s:playback_%d", fClientControl.fName, i + 1);
snprintf(name, sizeof(name), "%s:playback_%d", fClientControl.fName, i + 1);
if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, PlaybackDriverFlags, fEngineControl->fBufferSize, &port_index) < 0) {
jack_error("Cannot register port for %s", name);
......@@ -1973,7 +1973,7 @@ int JackCoreAudioDriver::Attach()
// Monitor ports
if (fWithMonitorPorts) {
jack_log("Create monitor port");
snprintf(name, sizeof(name) - 1, "%s:monitor_%u", fClientControl.fName, i + 1);
snprintf(name, sizeof(name), "%s:monitor_%u", fClientControl.fName, i + 1);
if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, MonitorDriverFlags, fEngineControl->fBufferSize, &port_index) < 0) {
jack_error("Cannot register monitor port for %s", name);
return -1;
......
......@@ -80,13 +80,13 @@ JackCoreMidiPort::Initialize(const char *alias_name, const char *client_name,
jack_error("JackCoreMidiPort::Initialize - failed to allocate memory "
"for endpoint name.");
get_basic_alias:
snprintf(alias, sizeof(alias) - 1, "%s:%s:%s%d", alias_name,
snprintf(alias, sizeof(alias), "%s:%s:%s%d", alias_name,
driver_name, is_output ? "in" : "out", num);
} else {
snprintf(alias, sizeof(alias) - 1, "%s:%s:%s%d", alias_name,
snprintf(alias, sizeof(alias), "%s:%s:%s%d", alias_name,
endpoint_name, is_output ? "in" : "out", num);
}
snprintf(name, sizeof(name) - 1, "%s:%s_%d", client_name,
snprintf(name, sizeof(name), "%s:%s_%d", client_name,
is_output ? "playback" : "capture", num);
this->endpoint = endpoint;
initialized = true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment