Browse Source

Client incorrect re-naming fixed: now done at fifo level only.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3325 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.9.2
sletz 16 years ago
parent
commit
ab6574f221
12 changed files with 36 additions and 30 deletions
  1. +4
    -3
      ChangeLog
  2. +2
    -2
      common/JackAudioAdapter.cpp
  3. +1
    -1
      common/JackClient.cpp
  4. +5
    -7
      common/JackLibAPI.cpp
  5. +1
    -1
      common/JackNetDriver.cpp
  6. +4
    -6
      common/JackServerAPI.cpp
  7. +4
    -2
      common/JackTools.cpp
  8. +1
    -1
      macosx/JackMachClientChannel.cpp
  9. +5
    -2
      macosx/JackMachSemaphore.cpp
  10. +4
    -2
      posix/JackPosixSemaphore.cpp
  11. +0
    -1
      windows/JackWinNamedPipeClientChannel.cpp
  12. +5
    -2
      windows/JackWinSemaphore.cpp

+ 4
- 3
ChangeLog View File

@@ -25,7 +25,8 @@ Michael Voigt
2009-02-17 Stephane Letz <letz@grame.fr>
* Fix the mutex/signal classes on Windows.
* Fix the mutex/signal classes on Windows.
* Client incorrect re-naming fixed: now done at fifo level only.
2009-02-16 Stephane Letz <letz@grame.fr>
@@ -33,8 +34,8 @@ Michael Voigt
2009-02-11 Stephane Letz <letz@grame.fr>
* Merge Solaris branch back on trunk.
* Equality of input and output buffer size removed (for now) in JackOSSDriver.
* Merge Solaris branch back on trunk.
* Equality of input and output buffer size removed (for now) in JackOSSDriver.
2009-02-10 Stephane Letz <letz@grame.fr>


+ 2
- 2
common/JackAudioAdapter.cpp View File

@@ -144,9 +144,9 @@ namespace Jack
for ( i = 0; i < fPlaybackChannels; i++ )
fPlaybackRingBuffer[i] = new JackLibSampleRateResampler(fAudioAdapter->GetQuality());
fAudioAdapter->SetRingBuffers ( fCaptureRingBuffer, fPlaybackRingBuffer );
if ( fCaptureChannels )
if (fCaptureChannels > 0)
jack_log ( "ReadSpace = %ld", fCaptureRingBuffer[0]->ReadSpace() );
if ( fPlaybackChannels )
if (fPlaybackChannels > 0)
jack_log ( "WriteSpace = %ld", fPlaybackRingBuffer[0]->WriteSpace() );

//jack ports


+ 1
- 1
common/JackClient.cpp View File

@@ -926,7 +926,7 @@ int JackClient::SetProcessThread(JackThreadCallback fun, void *arg)

char* JackClient::GetInternalClientName(int ref)
{
char name_res[JACK_CLIENT_NAME_SIZE];
char name_res[JACK_CLIENT_NAME_SIZE + 1];
int result = -1;
fChannel->GetInternalClientName(GetClientControl()->fRefNum, ref, name_res, &result);



+ 5
- 7
common/JackLibAPI.cpp View File

@@ -52,21 +52,19 @@ extern "C"
JackLibGlobals* JackLibGlobals::fGlobals = NULL;
int JackLibGlobals::fClientCount = 0;

EXPORT jack_client_t* jack_client_open_aux(const char* ext_client_name, jack_options_t options, jack_status_t* status, va_list ap)
EXPORT jack_client_t* jack_client_open_aux(const char* client_name, jack_options_t options, jack_status_t* status, va_list ap)
{
jack_varargs_t va; /* variable arguments */
jack_status_t my_status;
JackClient* client;
char client_name[JACK_CLIENT_NAME_SIZE + 1];

if (ext_client_name == NULL) {
if (client_name == NULL) {
jack_error("jack_client_open called with a NULL client_name");
return NULL;
}

jack_log("jack_client_open %s", ext_client_name);
JackTools::RewriteName(ext_client_name, client_name);

jack_log("jack_client_open %s", client_name);
if (status == NULL) /* no status from caller? */
status = &my_status; /* use local status word */
*status = (jack_status_t)0;


+ 1
- 1
common/JackNetDriver.cpp View File

@@ -632,7 +632,7 @@ namespace Jack
{
char multicast_ip[16];
strcpy ( multicast_ip, DEFAULT_MULTICAST_IP );
char net_name[JACK_CLIENT_NAME_SIZE];
char net_name[JACK_CLIENT_NAME_SIZE + 1];
int udp_port = DEFAULT_PORT;
int mtu = DEFAULT_MTU;
uint transport_sync = 1;


+ 4
- 6
common/JackServerAPI.cpp View File

@@ -48,21 +48,19 @@ extern "C"

using namespace Jack;

EXPORT jack_client_t* jack_client_open_aux(const char* ext_client_name, jack_options_t options, jack_status_t* status, va_list ap)
EXPORT jack_client_t* jack_client_open_aux(const char* client_name, jack_options_t options, jack_status_t* status, va_list ap)
{
jack_varargs_t va; /* variable arguments */
jack_status_t my_status;
JackClient* client;
char client_name[JACK_CLIENT_NAME_SIZE + 1];

if (ext_client_name == NULL) {
if (client_name == NULL) {
jack_error("jack_client_open called with a NULL client_name");
return NULL;
}

jack_log("jack_client_open %s", ext_client_name);
JackTools::RewriteName(ext_client_name, client_name);

jack_log("jack_client_open %s", client_name);
if (status == NULL) /* no status from caller? */
status = &my_status; /* use local status word */
*status = (jack_status_t)0;


+ 4
- 2
common/JackTools.cpp View File

@@ -169,7 +169,8 @@ namespace Jack {
}
}

int JackTools::GetTmpdir() {
int JackTools::GetTmpdir()
{
FILE* in;
size_t len;
char buf[JACK_PATH_MAX + 2]; /* allow tmpdir to live anywhere, plus newline, plus null */
@@ -200,7 +201,8 @@ namespace Jack {
}
#endif

void JackTools::RewriteName(const char* name, char* new_name) {
void JackTools::RewriteName(const char* name, char* new_name)
{
size_t i;
for (i = 0; i < strlen(name); i++) {
if ((name[i] == '/') || (name[i] == '\\'))


+ 1
- 1
macosx/JackMachClientChannel.cpp View File

@@ -80,7 +80,7 @@ int JackMachClientChannel::Open(const char* server_name, const char* name, char*
}

// Prepare local port using client name
char buf[JACK_CLIENT_NAME_SIZE];
char buf[JACK_CLIENT_NAME_SIZE + 1];
snprintf(buf, sizeof(buf) - 1, "%s:%s", jack_client_entry, name_res);

if (!fClientPort.AllocatePort(buf, 16)) {


+ 5
- 2
macosx/JackMachSemaphore.cpp View File

@@ -18,6 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include "JackMachSemaphore.h"
#include "JackConstants.h"
#include "JackTools.h"
#include "JackError.h"
#include <stdio.h>
@@ -27,9 +28,11 @@ namespace Jack

mach_port_t JackMachSemaphore::fBootPort = 0;

void JackMachSemaphore::BuildName(const char* name, const char* server_name, char* res)
void JackMachSemaphore::BuildName(const char* client_name, const char* server_name, char* res)
{
sprintf(res, "jack_mach_sem.%d_%s_%s", JackTools::GetUID(), server_name, name);
char ext_client_name[JACK_CLIENT_NAME_SIZE + 1];
JackTools::RewriteName(client_name, ext_client_name);
sprintf(res, "jack_mach_sem.%d_%s_%s", JackTools::GetUID(), server_name, ext_client_name);
}

bool JackMachSemaphore::Signal()


+ 4
- 2
posix/JackPosixSemaphore.cpp View File

@@ -28,9 +28,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace Jack
{

void JackPosixSemaphore::BuildName(const char* name, const char* server_name, char* res)
void JackPosixSemaphore::BuildName(const char* client_name, const char* server_name, char* res)
{
sprintf(res, "jack_sem.%d_%s_%s", JackTools::GetUID(), server_name, name);
char ext_client_name[JACK_CLIENT_NAME_SIZE + 1];
JackTools::RewriteName(client_name, ext_client_name);
sprintf(res, "jack_sem.%d_%s_%s", JackTools::GetUID(), server_name, ext_client_name);
}

bool JackPosixSemaphore::Signal()


+ 0
- 1
windows/JackWinNamedPipeClientChannel.cpp View File

@@ -77,7 +77,6 @@ int JackWinNamedPipeClientChannel::Open(const char* server_name, const char* nam
goto error;
}


fClient = obj;
return 0;



+ 5
- 2
windows/JackWinSemaphore.cpp View File

@@ -18,6 +18,7 @@ This program is free software; you can redistribute it and/or modify
*/

#include "JackWinSemaphore.h"
#include "JackConstants.h"
#include "JackTools.h"
#include "JackError.h"
#include <stdio.h>
@@ -25,9 +26,11 @@ This program is free software; you can redistribute it and/or modify
namespace Jack
{

void JackWinSemaphore::BuildName(const char* name, const char* server_name, char* res)
void JackWinSemaphore::BuildName(const char* client_name, const char* server_name, char* res)
{
sprintf(res, "jack_pipe.%s_%s", server_name, name);
char ext_client_name[JACK_CLIENT_NAME_SIZE + 1];
JackTools::RewriteName(client_name, ext_client_name);
sprintf(res, "jack_pipe.%s_%s", server_name, ext_client_name);
}

bool JackWinSemaphore::Signal()


Loading…
Cancel
Save