Browse Source

Cleanup.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4608 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.9.8
sletz 12 years ago
parent
commit
022e551350
17 changed files with 33 additions and 31 deletions
  1. +1
    -1
      common/JackAPI.cpp
  2. +2
    -2
      common/JackAudioDriver.cpp
  3. +2
    -2
      common/JackClient.cpp
  4. +2
    -0
      common/JackConstants.h
  5. +2
    -2
      common/JackDriver.cpp
  6. +1
    -1
      common/JackEngine.cpp
  7. +2
    -2
      common/JackMidiDriver.cpp
  8. +2
    -2
      common/JackNetDriver.cpp
  9. +3
    -3
      common/JackPort.cpp
  10. +3
    -3
      common/JackPort.h
  11. +2
    -2
      linux/alsa/JackAlsaDriver.cpp
  12. +2
    -2
      linux/alsarawmidi/JackALSARawMidiPort.h
  13. +2
    -2
      linux/firewire/JackFFADODriver.cpp
  14. +2
    -2
      linux/freebob/JackFreebobDriver.cpp
  15. +2
    -2
      macosx/coreaudio/JackCoreAudioDriver.cpp
  16. +1
    -1
      macosx/coremidi/JackCoreMidiPort.cpp
  17. +2
    -2
      macosx/coremidi/JackCoreMidiPort.h

+ 1
- 1
common/JackAPI.cpp View File

@@ -1494,7 +1494,7 @@ LIB_EXPORT int jack_client_name_size(void)

LIB_EXPORT int jack_port_name_size(void)
{
return JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE;
return REAL_JACK_PORT_NAME_SIZE;
}

LIB_EXPORT int jack_port_type_size(void)


+ 2
- 2
common/JackAudioDriver.cpp View File

@@ -140,8 +140,8 @@ int JackAudioDriver::Attach()
{
JackPort* port;
jack_port_id_t port_index;
char name[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char alias[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char name[REAL_JACK_PORT_NAME_SIZE];
char alias[REAL_JACK_PORT_NAME_SIZE];
int i;

jack_log("JackAudioDriver::Attach fBufferSize = %ld fSampleRate = %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate);


+ 2
- 2
common/JackClient.cpp View File

@@ -640,14 +640,14 @@ int JackClient::PortRegister(const char* port_name, const char* port_type, unsig
{
// Check if port name is empty
string port_name_str = string(port_name);
if (port_name_str.size() == 0) {
if (port_name_str.size() == 0)
jack_error("port_name is empty");
return 0; // Means failure here...
}

// Check port name length
string name = string(GetClientControl()->fName) + string(":") + port_name_str;
if (name.size() >= JACK_PORT_NAME_SIZE) {
if (name.size() >= REAL_JACK_PORT_NAME_SIZE) {
jack_error("\"%s:%s\" is too long to be used as a JACK port name.\n"
"Please use %lu characters or less",
GetClientControl()->fName,


+ 2
- 0
common/JackConstants.h View File

@@ -36,6 +36,8 @@
#define JACK_UUID_SIZE 32
#define JACK_SESSION_COMMAND_SIZE 256

#define REAL_JACK_PORT_NAME_SIZE JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE

#ifndef PORT_NUM
#define PORT_NUM 2048
#endif


+ 2
- 2
common/JackDriver.cpp View File

@@ -461,8 +461,8 @@ void JackDriver::SaveConnections()
{
const char** connections;
fConnections.clear();
char alias1[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char alias2[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char alias1[REAL_JACK_PORT_NAME_SIZE];
char alias2[REAL_JACK_PORT_NAME_SIZE];
char* aliases[2];

aliases[0] = alias1;


+ 1
- 1
common/JackEngine.cpp View File

@@ -921,7 +921,7 @@ int JackEngine::PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t ds

int JackEngine::PortRename(int refnum, jack_port_id_t port, const char* name)
{
char old_name[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char old_name[REAL_JACK_PORT_NAME_SIZE];
strcpy(old_name, fGraphManager->GetPort(port)->GetName());
fGraphManager->GetPort(port)->SetName(name);
NotifyPortRename(port, old_name);


+ 2
- 2
common/JackMidiDriver.cpp View File

@@ -58,8 +58,8 @@ int JackMidiDriver::Attach()
{
JackPort* port;
jack_port_id_t port_index;
char name[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char alias[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char name[REAL_JACK_PORT_NAME_SIZE];
char alias[REAL_JACK_PORT_NAME_SIZE];
int i;

jack_log("JackMidiDriver::Attach fBufferSize = %ld fSampleRate = %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate);


+ 2
- 2
common/JackNetDriver.cpp View File

@@ -245,8 +245,8 @@ namespace Jack

JackPort* port;
jack_port_id_t port_index;
char name[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char alias[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char name[REAL_JACK_PORT_NAME_SIZE];
char alias[REAL_JACK_PORT_NAME_SIZE];
int audio_port_index;
int midi_port_index;
jack_latency_range_t range;


+ 3
- 3
common/JackPort.cpp View File

@@ -225,7 +225,7 @@ void JackPort::SetName(const char* new_name)

bool JackPort::NameEquals(const char* target)
{
char buf[JACK_PORT_NAME_SIZE + 1];
char buf[REAL_JACK_PORT_NAME_SIZE];

/* this nasty, nasty kludge is here because between 0.109.0 and 0.109.1,
the ALSA audio backend had the name "ALSA", whereas as before and
@@ -249,12 +249,12 @@ int JackPort::GetAliases(char* const aliases[2])
int cnt = 0;

if (fAlias1[0] != '\0') {
snprintf(aliases[0], JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE, "%s", fAlias1);
snprintf(aliases[0], REAL_JACK_PORT_NAME_SIZE, "%s", fAlias1);
cnt++;
}

if (fAlias2[0] != '\0') {
snprintf(aliases[1], JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE, "%s", fAlias2);
snprintf(aliases[1], REAL_JACK_PORT_NAME_SIZE, "%s", fAlias2);
cnt++;
}



+ 3
- 3
common/JackPort.h View File

@@ -45,9 +45,9 @@ class SERVER_EXPORT JackPort

int fTypeId;
enum JackPortFlags fFlags;
char fName[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char fAlias1[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char fAlias2[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char fName[REAL_JACK_PORT_NAME_SIZE];
char fAlias1[REAL_JACK_PORT_NAME_SIZE];
char fAlias2[REAL_JACK_PORT_NAME_SIZE];
int fRefNum;

jack_nframes_t fLatency;


+ 2
- 2
linux/alsa/JackAlsaDriver.cpp View File

@@ -96,8 +96,8 @@ int JackAlsaDriver::Attach()
JackPort* port;
jack_port_id_t port_index;
unsigned long port_flags = (unsigned long)CaptureDriverFlags;
char name[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char alias[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char name[REAL_JACK_PORT_NAME_SIZE];
char alias[REAL_JACK_PORT_NAME_SIZE];

assert(fCaptureChannels < DRIVER_PORT_NUM);
assert(fPlaybackChannels < DRIVER_PORT_NUM);


+ 2
- 2
linux/alsarawmidi/JackALSARawMidiPort.h View File

@@ -31,12 +31,12 @@ namespace Jack {

private:

char alias[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char alias[REAL_JACK_PORT_NAME_SIZE];
struct pollfd *alsa_poll_fds;
int alsa_poll_fd_count;
int fds[2];
unsigned short io_mask;
char name[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char name[REAL_JACK_PORT_NAME_SIZE];
struct pollfd *queue_poll_fd;

protected:


+ 2
- 2
linux/firewire/JackFFADODriver.cpp View File

@@ -347,8 +347,8 @@ int JackFFADODriver::Attach()
{
JackPort* port;
jack_port_id_t port_index;
char buf[JACK_PORT_NAME_SIZE];
char portname[JACK_PORT_NAME_SIZE];
char buf[REAL_JACK_PORT_NAME_SIZE];
char portname[REAL_JACK_PORT_NAME_SIZE];
jack_latency_range_t range;

ffado_driver_t* driver = (ffado_driver_t*)fDriver;


+ 2
- 2
linux/freebob/JackFreebobDriver.cpp View File

@@ -669,8 +669,8 @@ int JackFreebobDriver::Attach()
JackPort* port;
jack_port_id_t port_index;

char buf[JACK_PORT_NAME_SIZE];
char portname[JACK_PORT_NAME_SIZE];
char buf[REAL_JACK_PORT_NAME_SIZE];
char portname[REAL_JACK_PORT_NAME_SIZE];
jack_latency_range_t range;

freebob_driver_t* driver = (freebob_driver_t*)fDriver;


+ 2
- 2
macosx/coreaudio/JackCoreAudioDriver.cpp View File

@@ -1910,8 +1910,8 @@ int JackCoreAudioDriver::Attach()
UInt32 size;
Boolean isWritable;
char channel_name[64];
char name[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char alias[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char name[REAL_JACK_PORT_NAME_SIZE];
char alias[REAL_JACK_PORT_NAME_SIZE];

jack_log("JackCoreAudioDriver::Attach fBufferSize %ld fSampleRate %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate);



+ 1
- 1
macosx/coremidi/JackCoreMidiPort.cpp View File

@@ -62,7 +62,7 @@ JackCoreMidiPort::Initialize(const char *alias_name, const char *client_name,
const char *driver_name, int index,
MIDIEndpointRef endpoint, bool is_output)
{
char endpoint_name[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char endpoint_name[REAL_JACK_PORT_NAME_SIZE];
CFStringRef endpoint_name_ref;
int num = index + 1;
Boolean res;


+ 2
- 2
macosx/coremidi/JackCoreMidiPort.h View File

@@ -30,9 +30,9 @@ namespace Jack {

private:

char alias[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char alias[REAL_JACK_PORT_NAME_SIZE];
bool initialized;
char name[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char name[REAL_JACK_PORT_NAME_SIZE];

protected:



Loading…
Cancel
Save