Commit 7173037a authored by sletz's avatar sletz
Browse files

Fix the types of a few function parameters.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4546 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 7ac5f1ce
......@@ -214,7 +214,7 @@ extern "C"
jack_position_t *pos);
LIB_EXPORT jack_nframes_t jack_get_current_transport_frame(const jack_client_t *client);
LIB_EXPORT int jack_transport_reposition(jack_client_t *client,
jack_position_t *pos);
const jack_position_t *pos);
LIB_EXPORT void jack_transport_start(jack_client_t *client);
LIB_EXPORT void jack_transport_stop(jack_client_t *client);
LIB_EXPORT void jack_get_transport_info(jack_client_t *client,
......@@ -1626,7 +1626,7 @@ LIB_EXPORT jack_nframes_t jack_get_current_transport_frame(const jack_client_t*
}
}
LIB_EXPORT int jack_transport_reposition(jack_client_t* ext_client, jack_position_t* pos)
LIB_EXPORT int jack_transport_reposition(jack_client_t* ext_client, const jack_position_t* pos)
{
#ifdef __CLIENTDEBUG__
JackGlobals::CheckContext("jack_transport_reposition");
......
......@@ -848,14 +848,14 @@ void JackClient::TransportLocate(jack_nframes_t frame)
GetEngineControl()->fTransport.RequestNewPos(&pos);
}
int JackClient::TransportReposition(jack_position_t* pos)
int JackClient::TransportReposition(const jack_position_t* pos)
{
jack_position_t tmp = *pos;
jack_log("JackClient::TransportReposition pos = %ld", pos->frame);
if (tmp.valid & ~JACK_POSITION_MASK) {
return EINVAL;
} else {
GetEngineControl()->fTransport.RequestNewPos(pos);
GetEngineControl()->fTransport.RequestNewPos(&tmp);
return 0;
}
}
......
......@@ -164,7 +164,7 @@ class SERVER_EXPORT JackClient : public JackClientInterface, public JackRunnable
virtual void TransportLocate(jack_nframes_t frame);
virtual jack_transport_state_t TransportQuery(jack_position_t* pos);
virtual jack_nframes_t GetCurrentTransportFrame();
virtual int TransportReposition(jack_position_t* pos);
virtual int TransportReposition(const jack_position_t* pos);
virtual void TransportStart();
virtual void TransportStop();
......
......@@ -30,10 +30,10 @@ extern "C"
{
#endif
LIB_EXPORT jack_nframes_t jack_midi_get_event_count(void* port_buffer);
LIB_EXPORT uint32_t jack_midi_get_event_count(void* port_buffer);
LIB_EXPORT int jack_midi_event_get(jack_midi_event_t* event,
void* port_buffer, jack_nframes_t event_index);
void* port_buffer, uint32_t event_index);
LIB_EXPORT void jack_midi_clear_buffer(void* port_buffer);
......@@ -54,7 +54,7 @@ extern "C"
using namespace Jack;
LIB_EXPORT
jack_nframes_t jack_midi_get_event_count(void* port_buffer)
uint32_t jack_midi_get_event_count(void* port_buffer)
{
JackMidiBuffer *buf = (JackMidiBuffer*)port_buffer;
if (!buf || !buf->IsValid()) {
......@@ -64,7 +64,7 @@ jack_nframes_t jack_midi_get_event_count(void* port_buffer)
}
LIB_EXPORT
int jack_midi_event_get(jack_midi_event_t *event, void* port_buffer, jack_nframes_t event_index)
int jack_midi_event_get(jack_midi_event_t *event, void* port_buffer, uint32_t event_index)
{
JackMidiBuffer *buf = (JackMidiBuffer*)port_buffer;
if (!buf || !buf->IsValid()) {
......@@ -143,7 +143,7 @@ int jack_midi_event_write(void* port_buffer,
}
LIB_EXPORT
jack_nframes_t jack_midi_get_lost_event_count(void* port_buffer)
uint32_t jack_midi_get_lost_event_count(void* port_buffer)
{
JackMidiBuffer *buf = (JackMidiBuffer*)port_buffer;
if (buf && buf->IsValid())
......
......@@ -13,7 +13,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
......@@ -38,7 +38,7 @@ JackTransportEngine::JackTransportEngine(): JackAtomicArrayState<jack_position_t
{
fTransportState = JackTransportStopped;
fTransportCmd = fPreviousCmd = TransportCommandStop;
fSyncTimeout = 10000000; /* 10 seconds default...
fSyncTimeout = 10000000; /* 10 seconds default...
in case of big netjack1 roundtrip */
fSyncTimeLeft = 0;
fTimeBaseMaster = -1;
......@@ -112,8 +112,8 @@ void JackTransportEngine::MakeAllStartingLocating(JackClientInterface** table)
JackClientControl* control = client->GetClientControl();
// Inactive clients don't have their process function called at all, so they must appear as already "rolling" for the transport....
control->fTransportState = (control->fActive && control->fCallback[kRealTimeCallback]) ? JackTransportStarting : JackTransportRolling;
control->fTransportSync = true;
control->fTransportTimebase = true;
control->fTransportSync = true;
control->fTransportTimebase = true;
jack_log("MakeAllStartingLocating ref = %ld", i);
}
}
......@@ -127,8 +127,8 @@ void JackTransportEngine::MakeAllStopping(JackClientInterface** table)
if (client) {
JackClientControl* control = client->GetClientControl();
control->fTransportState = JackTransportStopped;
control->fTransportSync = false;
control->fTransportTimebase = false;
control->fTransportSync = false;
control->fTransportTimebase = false;
jack_log("MakeAllStopping ref = %ld", i);
}
}
......@@ -142,8 +142,8 @@ void JackTransportEngine::MakeAllLocating(JackClientInterface** table)
if (client) {
JackClientControl* control = client->GetClientControl();
control->fTransportState = JackTransportStopped;
control->fTransportSync = true;
control->fTransportTimebase = true;
control->fTransportSync = true;
control->fTransportTimebase = true;
jack_log("MakeAllLocating ref = %ld", i);
}
}
......
......@@ -13,7 +13,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
......@@ -48,43 +48,43 @@ We have:
The current position can be read by clients.
We use a JackAtomicArrayState pattern that allows to manage several "next" states independantly.
In jack1 implementation, transport code (jack_transport_cycle_end) was not called if the graph could not be locked (see jack_run_one_cycle).
Here transport cycle (CycleBegin, CycleEnd) has to run in the RT thread concurrently with code executed from the "command" thread.
Each client maintains a state in it's shared memory area defined by:
- it's current transport state
- a boolean that is "true" when slow-sync cb has to be called
- a boolean that is "true" when timebase cb is called with new_pos on
Several operations set the "slow-sync cb" flag to true:
- setting a new cb (client)
- activate (client)
- transport start (server)
- new pos (server)
Slow-sync cb calls stops when:
- the cb return true (client)
- desactivate (client)
- transport stop (server)
Several operations set the "timebase cb" flag to true:
- setting a new cb (client)
- activate (client)
- transport start (server) ??
- new pos (server)
Timebase cb "new_pos" argument calls stops when:
- after one cb call with "new_pos" argument true (client)
- desactivate (client)
- release (client)
- transport stop (server)
*/
class JackClientInterface;
......@@ -109,7 +109,7 @@ class SERVER_EXPORT JackTransportEngine : public JackAtomicArrayState<jack_posit
void MakeAllStartingLocating(JackClientInterface** table);
void MakeAllStopping(JackClientInterface** table);
void MakeAllLocating(JackClientInterface** table);
void SyncTimeout(jack_nframes_t frame_rate, jack_nframes_t buffer_size);
public:
......@@ -128,22 +128,22 @@ class SERVER_EXPORT JackTransportEngine : public JackAtomicArrayState<jack_posit
{
return fTransportState;
}
void SetState(jack_transport_state_t state)
{
fTransportState = state;
}
/*
\brief
\brief
*/
int ResetTimebase(int refnum);
/*
\brief
\brief
*/
int SetTimebaseMaster(int refnum, bool conditionnal);
void GetTimebaseMaster(int& refnum, bool& conditionnal)
{
refnum = fTimeBaseMaster;
......@@ -151,17 +151,17 @@ class SERVER_EXPORT JackTransportEngine : public JackAtomicArrayState<jack_posit
}
/*
\brief
\brief
*/
void CycleBegin(jack_nframes_t frame_rate, jack_time_t time);
/*
\brief
\brief
*/
void CycleEnd(JackClientInterface** table, jack_nframes_t frame_rate, jack_nframes_t buffer_size);
/*
\brief
\brief
*/
void SetSyncTimeout(jack_time_t timeout)
{
......@@ -174,20 +174,20 @@ class SERVER_EXPORT JackTransportEngine : public JackAtomicArrayState<jack_posit
{
return (jack_unique_t)INC_ATOMIC(&fWriteCounter);
}
void RequestNewPos(jack_position_t* pos);
jack_transport_state_t Query(jack_position_t* pos);
jack_nframes_t GetCurrentFrame();
static void CopyPosition(jack_position_t* from, jack_position_t* to);
bool GetNetworkSync() const
{
return fNetworkSync;
}
void SetNetworkSync(bool sync)
{
fNetworkSync = sync;
......
......@@ -53,7 +53,7 @@ typedef struct _jack_midi_event
* @param port_buffer Port buffer from which to retrieve event.
* @return number of events inside @a port_buffer
*/
jack_nframes_t
uint32_t
jack_midi_get_event_count(void* port_buffer) JACK_OPTIONAL_WEAK_EXPORT;
......@@ -70,8 +70,8 @@ jack_midi_get_event_count(void* port_buffer) JACK_OPTIONAL_WEAK_EXPORT;
*/
int
jack_midi_event_get(jack_midi_event_t *event,
void *port_buffer,
jack_nframes_t event_index) JACK_OPTIONAL_WEAK_EXPORT;
void *port_buffer,
uint32_t event_index) JACK_OPTIONAL_WEAK_EXPORT;
/** Clear an event buffer.
......@@ -158,7 +158,7 @@ jack_midi_event_write(void *port_buffer,
* @param port_buffer Port to receive count for.
* @returns Number of events that could not be written to @a port_buffer.
*/
jack_nframes_t
uint32_t
jack_midi_get_lost_event_count(void *port_buffer) JACK_OPTIONAL_WEAK_EXPORT;
/*@}*/
......
/*
Copyright (C) 2002 Paul Davis
Copyright (C) 2003 Jack O'Quin
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
......@@ -135,7 +135,7 @@ int jack_set_timebase_callback (jack_client_t *client,
* sync_callbacks until ready. This function is realtime-safe.
*
* @see jack_transport_reposition, jack_set_sync_callback
*
*
* @param client the JACK client structure.
* @param frame frame number of new transport position.
*
......@@ -170,7 +170,7 @@ jack_transport_state_t jack_transport_query (const jack_client_t *client,
* @param client the JACK client structure
*/
jack_nframes_t jack_get_current_transport_frame (const jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
/**
* Request a new transport position.
*
......@@ -181,14 +181,14 @@ jack_nframes_t jack_get_current_transport_frame (const jack_client_t *client) JA
* sync_callbacks until ready. This function is realtime-safe.
*
* @see jack_transport_locate, jack_set_sync_callback
*
*
* @param client the JACK client structure.
* @param pos requested new transport position.
*
* @return 0 if valid request, EINVAL if position structure rejected.
*/
int jack_transport_reposition (jack_client_t *client,
jack_position_t *pos) JACK_OPTIONAL_WEAK_EXPORT;
const jack_position_t *pos) JACK_OPTIONAL_WEAK_EXPORT;
/**
* Start the JACK transport rolling.
......@@ -239,7 +239,7 @@ void jack_set_transport_info (jack_client_t *client,
jack_transport_info_t *tinfo) JACK_OPTIONAL_WEAK_EXPORT;
/*@}*/
#ifdef __cplusplus
}
#endif
......
......@@ -6170,6 +6170,7 @@
isa = PBXProject;
buildConfigurationList = 4B699DD5097D427F00A18468 /* Build configuration list for PBXProject "Jackdmp" */;
compatibilityVersion = "Xcode 2.4";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
......
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