Commit 3c19d53f authored by sletz's avatar sletz
Browse files

Compiles on Windows again.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3465 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 8922e4df
......@@ -69,7 +69,7 @@ int JackEngine::Close()
{
jack_log("JackEngine::Close");
fChannel.Close();
// Close remaining clients (RT is stopped)
for (int i = REAL_REFNUM; i < CLIENT_NUM; i++) {
if (JackLoadableInternalClient* loadable_client = dynamic_cast<JackLoadableInternalClient*>(fClientTable[i])) {
......@@ -85,10 +85,10 @@ int JackEngine::Close()
fClientTable[i] = NULL;
}
}
return 0;
}
//-----------------------------
// Client ressource management
//-----------------------------
......@@ -147,7 +147,7 @@ void JackEngine::ProcessCurrent(jack_time_t cur_cycle_begin)
bool JackEngine::Process(jack_time_t cur_cycle_begin, jack_time_t prev_cycle_end)
{
bool res = true;
// Cycle begin
fEngineControl->CycleBegin(fClientTable, fGraphManager, cur_cycle_begin, prev_cycle_end);
......@@ -213,7 +213,7 @@ void JackEngine::NotifyClient(int refnum, int event, int sync, int value1, int v
jack_log("JackEngine::NotifyClient: client not available anymore");
} else if (client->GetClientControl()->fCallback[event]) {
if (client->ClientNotify(refnum, client->GetClientControl()->fName, event, sync, value1, value2) < 0)
jack_error("NotifyClient fails name = %s event = %ld = val1 = %ld val2 = %ld", client->GetClientControl()->fName, event, value1, value2);
jack_error("NotifyClient fails name = %s event = %ld val1 = %ld val2 = %ld", client->GetClientControl()->fName, event, value1, value2);
} else {
jack_log("JackEngine::NotifyClient: no callback for event = %ld", event);
}
......@@ -226,7 +226,7 @@ void JackEngine::NotifyClients(int event, int sync, int value1, int value2)
if (client) {
if (client->GetClientControl()->fCallback[event]) {
if (client->ClientNotify(i, client->GetClientControl()->fName, event, sync, value1, value2) < 0)
jack_error("NotifyClient fails name = %s event = %ld = val1 = %ld val2 = %ld", client->GetClientControl()->fName, event, value1, value2);
jack_error("NotifyClient fails name = %s event = %ld val1 = %ld val2 = %ld", client->GetClientControl()->fName, event, value1, value2);
} else {
jack_log("JackEngine::NotifyClients: no callback for event = %ld", event);
}
......@@ -461,7 +461,7 @@ int JackEngine::GetClientPID(const char* name)
if (client && (strcmp(client->GetClientControl()->fName, name) == 0))
return client->GetClientControl()->fPID;
}
return 0;
}
......@@ -472,7 +472,7 @@ int JackEngine::GetClientRefNum(const char* name)
if (client && (strcmp(client->GetClientControl()->fName, name) == 0))
return client->GetClientControl()->fRefNum;
}
return -1;
}
......@@ -511,7 +511,7 @@ int JackEngine::ClientExternalOpen(const char* name, int pid, int* ref, int* sha
jack_error("Cannot notify add client");
goto error;
}
fGraphManager->InitRefNum(refnum);
fEngineControl->ResetRollingUsecs();
*shared_engine = fEngineControl->GetShmIndex();
......@@ -576,7 +576,7 @@ int JackEngine::ClientExternalClose(int refnum)
{
AssertRefnum(refnum);
JackClientInterface* client = fClientTable[refnum];
if (client) {
fEngineControl->fTransport.ResetTimebase(refnum);
int res = ClientCloseAux(refnum, client, true);
......@@ -613,7 +613,7 @@ int JackEngine::ClientCloseAux(int refnum, JackClientInterface* client, bool wai
for (i = 0; (i < PORT_NUM_FOR_CLIENT) && (ports[i] != EMPTY) ; i++) {
PortUnRegister(refnum, ports[i]);
}
// Remove the client from the table
ReleaseRefnum(refnum);
......@@ -641,11 +641,11 @@ int JackEngine::ClientActivate(int refnum, bool state)
AssertRefnum(refnum);
JackClientInterface* client = fClientTable[refnum];
assert(fClientTable[refnum]);
jack_log("JackEngine::ClientActivate ref = %ld name = %s", refnum, client->GetClientControl()->fName);
if (state)
if (state)
fGraphManager->Activate(refnum);
// Wait for graph state change to be effective
if (!fSignal.LockedTimedWait(fEngineControl->fTimeOutUsecs * 10)) {
jack_error("JackEngine::ClientActivate wait error ref = %ld name = %s", refnum, client->GetClientControl()->fName);
......@@ -665,11 +665,11 @@ int JackEngine::ClientDeactivate(int refnum)
return -1;
jack_log("JackEngine::ClientDeactivate ref = %ld name = %s", refnum, client->GetClientControl()->fName);
// Disconnect all ports ==> notifications are sent
jack_int_t ports[PORT_NUM_FOR_CLIENT];
int i;
fGraphManager->GetInputPorts(refnum, ports);
for (i = 0; (i < PORT_NUM_FOR_CLIENT) && (ports[i] != EMPTY) ; i++) {
PortDisconnect(refnum, ports[i], ALL_PORTS);
......@@ -679,7 +679,7 @@ int JackEngine::ClientDeactivate(int refnum)
for (i = 0; (i < PORT_NUM_FOR_CLIENT) && (ports[i] != EMPTY) ; i++) {
PortDisconnect(refnum, ports[i], ALL_PORTS);
}
fGraphManager->Deactivate(refnum);
fLastSwitchUsecs = 0; // Force switch to occur next cycle, even when called with "dead" clients
......@@ -701,11 +701,11 @@ int JackEngine::PortRegister(int refnum, const char* name, const char *type, uns
jack_log("JackEngine::PortRegister ref = %ld name = %s type = %s flags = %d buffer_size = %d", refnum, name, type, flags, buffer_size);
AssertRefnum(refnum);
assert(fClientTable[refnum]);
// Check if port name already exists
if (fGraphManager->GetPort(name) != NO_PORT) {
jack_error("port_name \"%s\" already exists", name);
return -1;
return -1;
}
*port_index = fGraphManager->AllocatePort(refnum, name, type, (JackPortFlags)flags, fEngineControl->fBufferSize);
......@@ -722,7 +722,7 @@ int JackEngine::PortUnRegister(int refnum, jack_port_id_t port_index)
jack_log("JackEngine::PortUnRegister ref = %ld port_index = %ld", refnum, port_index);
AssertRefnum(refnum);
assert(fClientTable[refnum]);
// Disconnect port ==> notification is sent
PortDisconnect(refnum, port_index, ALL_PORTS);
......@@ -775,7 +775,7 @@ int JackEngine::PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst)
}
int res = fGraphManager->Connect(src, dst);
if (res == 0)
if (res == 0)
NotifyPortConnect(src, dst, true);
return res;
}
......
/* This module provides a set of abstract shared memory interfaces
* with support using both System V and POSIX shared memory
* implementations. The code is divided into three sections:
*
* - common (interface-independent) code
* - POSIX implementation
* - System V implementation
*
* The implementation used is determined by whether USE_POSIX_SHM was
* set in the ./configure step.
*/
/*
* Copyright (C) 2003 Paul Davis
* Copyright (C) 2004 Jack O'Quin
* Copyright (C) 2006-2007 Grame
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
......@@ -30,11 +18,24 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
/* This module provides a set of abstract shared memory interfaces
* with support using both System V and POSIX shared memory
* implementations. The code is divided into three sections:
*
* - common (interface-independent) code
* - POSIX implementation
* - System V implementation
*
* The implementation used is determined by whether USE_POSIX_SHM was
* set in the ./configure step.
*/
#include "JackConstants.h"
#ifdef WIN32
#include <process.h>
#include <process.h>
#include <stdio.h>
#else
#include <unistd.h>
......@@ -57,7 +58,7 @@
#include "shm.h"
#include "JackError.h"
static int GetUID()
static int GetUID()
{
#ifdef WIN32
return _getpid();
......@@ -67,7 +68,7 @@ static int GetUID()
#endif
}
static int GetPID()
static int GetPID()
{
#ifdef WIN32
return _getpid();
......@@ -105,9 +106,9 @@ static jack_shm_id_t registry_id; /* SHM id for the registry */
#ifdef WIN32
static jack_shm_info_t registry_info = {/* SHM info for the registry */
JACK_SHM_NULL_INDEX,
JACK_SHM_NULL_INDEX,
NULL
};
};
#else
static jack_shm_info_t registry_info = { /* SHM info for the registry */
.index = JACK_SHM_NULL_INDEX,
......@@ -142,7 +143,7 @@ static char jack_shm_server_prefix[JACK_SERVER_NAME_SIZE] = "";
static int semid = -1;
#ifdef WIN32
#ifdef WIN32
static void
semaphore_init () {}
......@@ -167,7 +168,7 @@ semaphore_init ()
struct sembuf sbuf;
int create_flags = IPC_CREAT | IPC_EXCL
| S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
/* Get semaphore ID associated with this key. */
if ((semid = semget(semkey, 0, 0)) == -1) {
......@@ -188,7 +189,7 @@ semaphore_init ()
}
} else {
semaphore_error ("semget creation");
semaphore_error ("semget creation");
}
}
}
......@@ -208,7 +209,7 @@ semaphore_add (int value)
#endif
static void
static void
jack_shm_lock_registry (void)
{
if (semid == -1)
......@@ -217,7 +218,7 @@ jack_shm_lock_registry (void)
semaphore_add (-1);
}
static void
static void
jack_shm_unlock_registry (void)
{
semaphore_add (1);
......@@ -232,7 +233,7 @@ jack_shm_init_registry ()
memset (jack_shm_header, 0, JACK_SHM_REGISTRY_SIZE);
jack_shm_header->magic = JACK_SHM_MAGIC;
//jack_shm_header->protocol = JACK_PROTOCOL_VERSION;
//jack_shm_header->protocol = JACK_PROTOCOL_VERSION;
jack_shm_header->type = jack_shmtype;
jack_shm_header->size = JACK_SHM_REGISTRY_SIZE;
jack_shm_header->hdr_len = sizeof (jack_shm_header_t);
......@@ -249,7 +250,7 @@ jack_shm_validate_registry ()
/* registry must be locked */
if ((jack_shm_header->magic == JACK_SHM_MAGIC)
//&& (jack_shm_header->protocol == JACK_PROTOCOL_VERSION)
//&& (jack_shm_header->protocol == JACK_PROTOCOL_VERSION)
&& (jack_shm_header->type == jack_shmtype)
&& (jack_shm_header->size == JACK_SHM_REGISTRY_SIZE)
&& (jack_shm_header->hdr_len == sizeof (jack_shm_header_t))
......@@ -281,7 +282,7 @@ static void
jack_set_server_prefix (const char *server_name)
{
snprintf (jack_shm_server_prefix, sizeof (jack_shm_server_prefix),
"jack-%d:%s:", GetUID(), server_name);
"jack-%d:%s:", GetUID(), server_name);
}
/* gain server addressability to shared memory registration segment
......@@ -299,7 +300,7 @@ jack_server_initialize_shm (int new_registry)
jack_shm_lock_registry ();
rc = jack_access_registry (&registry_info);
if (new_registry) {
jack_remove_shm (&registry_id);
rc = ENOENT;
......@@ -365,9 +366,9 @@ jack_initialize_shm (const char *server_name)
}
char* jack_shm_addr (jack_shm_info_t* si)
char* jack_shm_addr (jack_shm_info_t* si)
{
return (char*)si->ptr.attached_at;
return (char*)si->ptr.attached_at;
}
void
......@@ -393,7 +394,7 @@ jack_get_free_shm_info ()
break;
}
}
if (i < MAX_SHM_ID) {
si = &jack_shm_registry[i];
}
......@@ -422,7 +423,7 @@ jack_release_shm_info (jack_shm_registry_index_t index)
}
}
/* Claim server_name for this process.
/* Claim server_name for this process.
*
* returns 0 if successful
* EEXIST if server_name was already active for this user
......@@ -485,7 +486,7 @@ jack_register_server (const char *server_name, int new_registry)
strncpy (jack_shm_header->server[i].name,
jack_shm_server_prefix,
JACK_SERVER_NAME_SIZE);
unlock:
jack_shm_unlock_registry ();
return 0;
......@@ -517,10 +518,10 @@ jack_cleanup_shm ()
jack_shm_info_t copy;
jack_shm_lock_registry ();
for (i = 0; i < MAX_SHM_ID; i++) {
jack_shm_registry_t* r;
r = &jack_shm_registry[i];
memcpy (&copy, r, sizeof (jack_shm_info_t));
destroy = FALSE;
......@@ -532,7 +533,7 @@ jack_cleanup_shm ()
/* is this my shm segment? */
if (r->allocator == GetPID()) {
/* allocated by this process, so unattach
/* allocated by this process, so unattach
and destroy. */
jack_release_shm (&copy);
destroy = TRUE;
......@@ -651,7 +652,7 @@ jack_access_registry (jack_shm_info_t *ri)
ri->index = JACK_SHM_REGISTRY_INDEX;
jack_shm_header = ri->ptr.attached_at;
jack_shm_registry = (jack_shm_registry_t *) (jack_shm_header + 1);
close (shm_fd); // steph
return 0;
}
......@@ -668,7 +669,7 @@ jack_create_registry (jack_shm_info_t *ri)
{
/* registry must be locked */
int shm_fd;
strncpy (registry_id, "/jack-shm-registry", sizeof (registry_id));
if ((shm_fd = shm_open (registry_id, O_RDWR|O_CREAT, 0666)) < 0) {
......@@ -677,10 +678,10 @@ jack_create_registry (jack_shm_info_t *ri)
strerror (errno));
return rc;
}
/* Previous shm_open result depends of the actual value of umask, force correct file permisssion here */
if (fchmod(shm_fd, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) < 0) {
jack_log("Cannot chmod jack-shm-registry (%s) %d %d", strerror (errno));
jack_log("Cannot chmod jack-shm-registry (%s) %d %d", strerror (errno));
}
/* Set the desired segment size. NOTE: the non-conformant Mac
......@@ -804,7 +805,7 @@ jack_attach_shm (jack_shm_info_t* si)
if ((si->ptr.attached_at = mmap (0, registry->size, PROT_READ|PROT_WRITE,
MAP_SHARED, shm_fd, 0)) == MAP_FAILED) {
jack_error ("Cannot mmap shm segment %s (%s)",
jack_error ("Cannot mmap shm segment %s (%s)",
registry->id,
strerror (errno));
close (shm_fd);
......@@ -830,7 +831,7 @@ jack_attach_shm_read (jack_shm_info_t* si)
if ((si->ptr.attached_at = mmap (0, registry->size, PROT_READ,
MAP_SHARED, shm_fd, 0)) == MAP_FAILED) {
jack_error ("Cannot mmap shm segment %s (%s)",
jack_error ("Cannot mmap shm segment %s (%s)",
registry->id,
strerror (errno));
close (shm_fd);
......@@ -848,12 +849,10 @@ jack_access_registry (jack_shm_info_t *ri)
{
/* registry must be locked */
HANDLE shm_fd;
LPSECURITY_ATTRIBUTES sec = 0;
strncpy (registry_id, "jack-shm-registry", sizeof (registry_id));
/* try to open an existing segment */
if ((shm_fd = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, registry_id)) == NULL) {
int rc = GetLastError();
if (rc != ERROR_FILE_NOT_FOUND) {
......@@ -862,7 +861,7 @@ jack_access_registry (jack_shm_info_t *ri)
return rc;
}
if ((ri->attached_at = MapViewOfFile (shm_fd, FILE_MAP_ALL_ACCESS, 0, 0, JACK_SHM_REGISTRY_SIZE)) == NULL) {
if ((ri->ptr.attached_at = MapViewOfFile (shm_fd, FILE_MAP_ALL_ACCESS, 0, 0, JACK_SHM_REGISTRY_SIZE)) == NULL) {
jack_error ("Cannot mmap shm registry segment (%ld)", GetLastError());
jack_remove_shm (&registry_id);
CloseHandle (shm_fd);
......@@ -871,7 +870,7 @@ jack_access_registry (jack_shm_info_t *ri)
/* set up global pointers */
ri->index = JACK_SHM_REGISTRY_INDEX;
jack_shm_header = ri->attached_at;
jack_shm_header = ri->ptr.attached_at;
jack_shm_registry = (jack_shm_registry_t *) (jack_shm_header + 1);
//CloseHandle(shm_fd); // TO CHECK
......@@ -886,16 +885,16 @@ jack_create_registry (jack_shm_info_t *ri)
strncpy (registry_id, "jack-shm-registry", sizeof (registry_id));
if ((shm_fd = CreateFileMapping(INVALID_HANDLE_VALUE,
0, PAGE_READWRITE,
0, JACK_SHM_REGISTRY_SIZE,
if ((shm_fd = CreateFileMapping(INVALID_HANDLE_VALUE,
0, PAGE_READWRITE,
0, JACK_SHM_REGISTRY_SIZE,
registry_id)) == NULL || (shm_fd == INVALID_HANDLE_VALUE)) {
int rc = GetLastError();
jack_error ("Cannot create shm registry segment (%ld)", rc);
return rc;
}
if ((ri->attached_at = MapViewOfFile (shm_fd, FILE_MAP_ALL_ACCESS, 0, 0, JACK_SHM_REGISTRY_SIZE)) == NULL) {
if ((ri->ptr.attached_at = MapViewOfFile (shm_fd, FILE_MAP_ALL_ACCESS, 0, 0, JACK_SHM_REGISTRY_SIZE)) == NULL) {
jack_error ("Cannot mmap shm registry segment (%ld)", GetLastError());
jack_remove_shm (&registry_id);
CloseHandle (shm_fd);
......@@ -904,7 +903,7 @@ jack_create_registry (jack_shm_info_t *ri)
/* set up global pointers */
ri->index = JACK_SHM_REGISTRY_INDEX;
jack_shm_header = ri->attached_at;
jack_shm_header = ri->ptr.attached_at;
jack_shm_registry = (jack_shm_registry_t *) (jack_shm_header + 1);
/* initialize registry contents */
......@@ -924,8 +923,8 @@ void
jack_release_shm (jack_shm_info_t* si)
{
/* registry may or may not be locked */
if (si->attached_at != NULL) {
UnmapViewOfFile (si->attached_at);
if (si->ptr.attached_at != NULL) {
UnmapViewOfFile (si->ptr.attached_at);
}
}
......@@ -951,9 +950,9 @@ jack_shmalloc (const char *shm_name, jack_shmsize_t size, jack_shm_info_t* si)
goto unlock;
}
if ((shm_fd = CreateFileMapping(INVALID_HANDLE_VALUE,
0, PAGE_READWRITE,
0, size,
if ((shm_fd = CreateFileMapping(INVALID_HANDLE_VALUE,
0, PAGE_READWRITE,
0, size,
name)) == NULL || (shm_fd == INVALID_HANDLE_VALUE)) {
int rc = GetLastError();
jack_error ("Cannot create shm segment (%ld)",rc);
......@@ -966,7 +965,7 @@ jack_shmalloc (const char *shm_name, jack_shmsize_t size, jack_shm_info_t* si)
strncpy (registry->id, name, sizeof (registry->id));
registry->allocator = _getpid();
si->index = registry->index;
si->attached_at = NULL; /* not attached */
si->ptr.attached_at = NULL; /* not attached */
rc = 0; /* success */
unlock:
......@@ -986,7 +985,7 @@ jack_attach_shm (jack_shm_info_t* si)
return -1;
}
if ((si->attached_at = MapViewOfFile (shm_fd, FILE_MAP_ALL_ACCESS, 0, 0, registry->size)) == NULL) {
if ((si->ptr.attached_at = MapViewOfFile (shm_fd, FILE_MAP_ALL_ACCESS, 0, 0, registry->size)) == NULL) {
jack_error ("Cannot mmap shm segment (%ld)", GetLastError());
jack_remove_shm (&registry_id);
CloseHandle (shm_fd);
......@@ -1009,10 +1008,10 @@ jack_attach_shm_read (jack_shm_info_t* si)
return -1;
}
if ((si->attached_at = MapViewOfFile (shm_fd, FILE_MAP_READ, 0, 0, registry->size)) == NULL) {
jack_error ("Cannot mmap shm segment (%ld)", GetLastError());
jack_remove_shm (&registry_id);
CloseHandle (shm_fd);
if ((si->ptr.attached_at = MapViewOfFile (shm_fd, FILE_MAP_READ, 0, 0, registry->size)) == NULL) {
jack_error("Cannot mmap shm segment (%ld)", GetLastError());
jack_remove_shm(&registry_id);
CloseHandle(shm_fd);
return -1;
}
......@@ -1127,7 +1126,7 @@ jack_release_shm (jack_shm_info_t* si)
int
jack_shmalloc (const char* name_not_used, jack_shmsize_t size,
jack_shm_info_t* si)
jack_shm_info_t* si)
{
int shmflags;
int shmid;
......
......@@ -27,11 +27,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
/* POST_PACKED_STRUCTURE needs to be a macro which
expands into a compiler directive. The directive must
tell the compiler to arrange the preceding structure
declaration so that it is packed on byte-boundaries rather
declaration so that it is packed on byte-boundaries rather
than use the natural alignment of the processor and/or
compiler.
*/
#if (__GNUC__< 4) /* On Solaris, does not seem to work with GCC 3.XX serie */
#if (__GNUC__< 4) /* Does not seem to work with GCC 3.XX serie */
#define POST_PACKED_STRUCTURE
#elif defined(JACK_32_64)
#define POST_PACKED_STRUCTURE __attribute__((__packed__))
......@@ -43,19 +43,19 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#define EXPORT __attribute__((visibility("default")))
#ifdef SERVER_SIDE
#if (__GNUC__< 4)
#define SERVER_EXPORT
#define SERVER_EXPORT
#else
#define SERVER_EXPORT __attribute__((visibility("default")))
#endif
#endif
#else
#define SERVER_EXPORT
#endif
#else
#else
#define MEM_ALIGN(x,y) x
#define EXPORT
#define SERVER_EXPORT
/* Add other things here for non-gcc platforms for POST_PACKED_STRUCTURE */
#endif
#endif
/*
Copyright (C) 2005 Samuel TRACOL for GRAME
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
......@@ -20,7 +20,7 @@
/** @file jack_test.c
*
* @brief This client test the jack API.
*
*
*/
#include <stdio.h>
......@@ -38,7 +38,7 @@
#include <jack/transport.h>
#ifdef WIN32
#if defined(WIN32) && !defined(M_PI)
#define M_PI 3.151592653
#endif
......@@ -122,9 +122,9 @@ int client_register = 0;
/**
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Callbacks & basics functions
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*/
......@@ -266,9 +266,9 @@ int Jack_Sync_Callback(jack_transport_state_t state, jack_position_t *pos, void
/**
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
processing functions
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
* Proccess1 is for client1
......@@ -370,7 +370,7 @@ int process2(jack_nframes_t nframes, void *arg)
}
}
}
if (process2_activated == 2) { // envoie de signal1 pour test tie mode et le r�cup�re direct + latence de la boucle jack...
out2 = (jack_default_audio_sample_t *) jack_port_get_buffer (output_port2, nframes);
in2 = (jack_default_audio_sample_t *) jack_port_get_buffer (input_port2, nframes);
......@@ -389,7 +389,7 @@ int process2(jack_nframes_t nframes, void *arg)
}
}
}
if (process2_activated == 3) { // envoie de -signal1 pour sommation en oppo de phase par jack
in2 = (jack_default_audio_sample_t *) jack_port_get_buffer (input_port2, nframes);
......@@ -416,14 +416,14 @@ static int _process (jack_nframes_t nframes)
out = (jack_default_audio_sample_t *)jack_port_get_buffer (output_port1, nframes);
memcpy (out, in,
sizeof (jack_default_audio_sample_t) * nframes);
return 0;
return 0;
}
static void* jack_thread(void *arg)
static void* jack_thread(void *arg)
{