Commit 299bea3a authored by sletz's avatar sletz
Browse files

Remove compilation warnings.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4495 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 98d9be97
......@@ -78,12 +78,12 @@ Chris Caudle
2011-06-17 Stephane Letz <letz@grame.fr>
* NetJack2 : connection error handling.
* NetJack2: connection error handling.
2011-06-16 Stephane Letz <letz@grame.fr>
* Changes in NetJack2 connection management: no more timeout, any transmission error considered as fatal.
* NetJack2 : timeout again...
* NetJack2: timeout again...
2011-06-11 Stephane Letz <letz@grame.fr>
......@@ -96,7 +96,7 @@ Chris Caudle
2011-06-09 Stephane Letz <letz@grame.fr>
* Correct NetJack2 connection handling
* Correct NetJack2 connection handling.
2011-05-27 Stephane Letz <letz@grame.fr>
......@@ -116,7 +116,7 @@ Chris Caudle
2011-05-02 Stephane Letz <letz@grame.fr>
* Merge branch 'switch-master-port-registration-notifications : correct driver port registration.
* Merge branch switch-master-port-registration-notifications: correct driver port registration.
2011-04-21 Stephane Letz <letz@grame.fr>
......@@ -140,7 +140,7 @@ Chris Caudle
2011-04-02 Stephane Letz <letz@grame.fr>
* Netdriver can now ask for in/out values from the master (in progress).
* NetDriver can now ask for in/out values from the master (in progress).
* Correct drivers parameter settings.
2011-04-01 Stephane Letz <letz@grame.fr>
......@@ -238,7 +238,7 @@ Chris Caudle
2010-11-17 Stephane Letz <letz@grame.fr>
* ALSA backend : suspend/resume handling (jack1 r4075).
* ALSA backend: suspend/resume handling (jack1 r4075).
* Correct dummy driver.
2010-11-05 Stephane Letz <letz@grame.fr>
......@@ -290,7 +290,7 @@ Chris Caudle
2010-06-13 Stephane Letz <letz@grame.fr>
* Fix JackPosixSemaphore::TimedWait : same behavior as JackPosixSemaphore::Wait regarding EINTR.
* Fix JackPosixSemaphore::TimedWait: same behavior as JackPosixSemaphore::Wait regarding EINTR.
2010-05-31 Stephane Letz <letz@grame.fr>
......@@ -337,7 +337,7 @@ Chris Caudle
2010-03-04 Stephane Letz <letz@grame.fr>
* Correct JackMachServerChannel::Execute : keep running even in error cases.
* Correct JackMachServerChannel::Execute: keep running even in error cases.
* Raise JACK_PROTOCOL_VERSION number.
2010-03-03 Stephane Letz <letz@grame.fr>
......@@ -346,7 +346,7 @@ Chris Caudle
2010-03-02 Stephane Letz <letz@grame.fr>
* Improve JackCoreAudioDriver and JackCoreAudioAdapter : when no devices are described, takes default input and output and aggregate them.
* Improve JackCoreAudioDriver and JackCoreAudioAdapter: when no devices are described, takes default input and output and aggregate them.
2010-02-15 Stephane Letz <letz@grame.fr>
......@@ -388,7 +388,7 @@ Chris Caudle
2009-12-01 Stephane Letz <letz@grame.fr>
* Fix port_rename callback : now both old name and new name are given as parameters.
* Fix port_rename callback: now both old name and new name are given as parameters.
2009-11-30 Stephane Letz <letz@grame.fr>
......@@ -418,7 +418,7 @@ Chris Caudle
2009-11-17 Stephane Letz <letz@grame.fr>
* In JackCoreAudio driver, clock drift compensation in aggregated devices working.
* In JackCoreAudio driver, clock drift compensation semantic changed a bit : when on, does not activate if not needed (same clock domain).
* In JackCoreAudio driver, clock drift compensation semantic changed a bit: when on, does not activate if not needed (same clock domain).
2009-11-16 Stephane Letz <letz@grame.fr>
......@@ -426,14 +426,14 @@ Chris Caudle
2009-11-14 Stephane Letz <letz@grame.fr>
* Sync with JACK1 : -r parameter now used for no-realtime, realtime (-R) is now default, usable backend given vie platform.
* Sync with JACK1: -r parameter now used for no-realtime, realtime (-R) is now default, usable backend given vie platform.
2009-11-13 Stephane Letz <letz@grame.fr>
* Better memory allocation error checking in ringbuffer.c, weak import improvements.
* Memory allocation error checking for jack_client_new and jack_client_open (server and client side).
* Memory allocation error checking in server for RPC.
* Simplify server temporary mode : now use a JackTemporaryException.
* Simplify server temporary mode: now use a JackTemporaryException.
* Lock/Unlock shared memory segments (to test...).
2009-11-12 Stephane Letz <letz@grame.fr>
......@@ -450,12 +450,12 @@ Chris Caudle
2009-11-09 Stephane Letz <letz@grame.fr>
* Correct JackGraphManager::GetBuffer for the "client loop with one connection" case : buffer must be copied.
* Correct JackGraphManager::GetBuffer for the "client loop with one connection" case: buffer must be copied.
2009-11-07 Stephane Letz <letz@grame.fr>
* Fix AcquireRealTime and DropRealTime: now distinguish when called from another thread (AcquireRealTime/DropRealTime) and from the thread itself (AcquireSelfRealTime/DropSelfRealTime).
* Correct JackPosixThread::StartImp : thread priority setting now done in the RT case only.
* Correct JackPosixThread::StartImp: thread priority setting now done in the RT case only.
2009-11-06 Stephane Letz <letz@grame.fr>
......@@ -496,7 +496,7 @@ Chris Caudle
2009-10-25 Stephane Letz <letz@grame.fr>
* Improve aggregate device management in JackCoreAudioDriver : now a "private" device only and cleanup properly.
* Improve aggregate device management in JackCoreAudioDriver: now a "private" device only and cleanup properly.
* Aggregate device code added to JackCoreAudioAdapter.
2009-10-23 Stephane Letz <letz@grame.fr>
......@@ -517,7 +517,7 @@ Chris Caudle
2009-10-17 Stephane Letz <letz@grame.fr>
* Correct server temporary mode : now set a global and quit after server/client message handling is finished.
* Correct server temporary mode: now set a global and quit after server/client message handling is finished.
2009-10-15 Stephane Letz <letz@grame.fr>
......@@ -598,12 +598,12 @@ Chris Caudle
2009-06-30 Stephane Letz <letz@grame.fr>
* Tim Bechmann patch : hammerfall, only release monitor thread, if it has been created.
* Tim Bechmann patch: hammerfall, only release monitor thread, if it has been created.
2009-06-19 Stephane Letz <letz@grame.fr>
* Correct JackTransportEngine::MakeAllLocating, sync callback has to be called in this case also.
* NetJack2 code : better error checkout, method renaming.
* NetJack2 code: better error checkout, method renaming.
2009-06-17 Stephane Letz <letz@grame.fr>
......@@ -703,7 +703,7 @@ Chris Caudle
2009-03-11 Stephane Letz <letz@grame.fr>
* Client incorrect re-naming fixed : now done at socket level also.
* Client incorrect re-naming fixed: now done at socket level also.
2009-03-10 Stephane Letz <letz@grame.fr>
......@@ -918,7 +918,7 @@ Chris Caudle
2008-10-08 Stephane Letz <letz@grame.fr>
* Fix a SMP related bug introduced in rev 2957 : remove the __SMP__ flag and define LOCK for SMP in all cases.
* Fix a SMP related bug introduced in rev 2957: remove the __SMP__ flag and define LOCK for SMP in all cases.
2008-10-02 Stephane Letz <letz@grame.fr>
......@@ -933,7 +933,7 @@ Chris Caudle
2008-10-10 Stephane Letz <letz@grame.fr>
* Improve OSS backend : SNDCTL_DSP_SETFRAGMENT must be done before, use of AFMT_S16_LE kind of values.
* Improve OSS backend: SNDCTL_DSP_SETFRAGMENT must be done before, use of AFMT_S16_LE kind of values.
2008-10-09 Stephane Letz <letz@grame.fr>
......@@ -942,7 +942,7 @@ Chris Caudle
2008-10-08 Stephane Letz <letz@grame.fr>
* Fix a SMP related bug introduced in rev 2957 : remove the __SMP__ flag and define LOCK for SMP in all cases.
* Fix a SMP related bug introduced in rev 2957: remove the __SMP__ flag and define LOCK for SMP in all cases.
2008-10-03 Stephane Letz <letz@grame.fr>
......@@ -1059,7 +1059,7 @@ Chris Caudle
2008-07-08 Stephane Letz <letz@grame.fr>
* Add jack_get_descriptor in internal clients API.
* Fix JackFreewheelDriver::Process() in case if client time-out : continue processing until a better recovery strategy is chosen.
* Fix JackFreewheelDriver::Process() in case if client time-out: continue processing until a better recovery strategy is chosen.
2008-07-08 Stephane Letz <letz@grame.fr>
......@@ -1132,7 +1132,7 @@ Chris Caudle
2008-06-02 Stephane Letz <letz@grame.fr>
* Tim Blechmann patch to remove unnecessary virtual methods : choice of the appropriate platform version is now done at compilation time.
* Tim Blechmann patch to remove unnecessary virtual methods: choice of the appropriate platform version is now done at compilation time.
2008-06-02 Stephane Letz <letz@grame.fr>
......@@ -1159,12 +1159,12 @@ Chris Caudle
2008-05-27 Stephane Letz <letz@grame.fr>
* Correct timing in drivers : frame time has to be incremented before Read.
* Correct timing in drivers: frame time has to be incremented before Read.
2008-05-26 Stephane Letz <letz@grame.fr>
* Merge control branch.
* Cleanup example clients : use jack_client_open and install a proper 'quit' signal handler.
* Cleanup example clients: use jack_client_open and install a proper 'quit' signal handler.
2008-05-24 Stephane Letz <letz@grame.fr>
......@@ -1185,7 +1185,7 @@ Chris Caudle
* Correct JackEngine::PortUnRegister, JackEngine::ClientCloseAux and JackEngine::ClientDeactivate to correctly send notifications.
* New jack_get_client_pid API, implemented on server side.
* Better handling of graph state read functions : never wait when used in the real-time thread, current state is used.
* Better handling of graph state read functions: never wait when used in the real-time thread, current state is used.
2008-05-20 Stephane Letz <letz@grame.fr>
......@@ -1195,7 +1195,7 @@ Chris Caudle
2008-05-19 Stephane Letz <letz@grame.fr>
* Use of placement new for dynamic port allocation is possibly not safe... so avoid that until a definitive answer is found.
* JackAudioDriver::ProcessAsync and JackAudioDriver::ProcessSync were broken at some point : 0 has to be returned in all cases.
* JackAudioDriver::ProcessAsync and JackAudioDriver::ProcessSync were broken at some point: 0 has to be returned in all cases.
2008-05-16 Stephane Letz <letz@grame.fr>
......@@ -1224,7 +1224,7 @@ Chris Caudle
2008-05-05 Stephane Letz <letz@grame.fr>
* Fix JackClient::Close : notification channel is stopped first to avoid receiving notifications while closing and Close is again a synchronous call.
* Fix JackClient::Close: notification channel is stopped first to avoid receiving notifications while closing and Close is again a synchronous call.
* No more remaining client close in JackEngine::Close().
2008-05-01 Stephane Letz <letz@grame.fr>
......@@ -1265,7 +1265,7 @@ Chris Caudle
2008-03-29 Stephane Letz <letz@grame.fr>
* Correct a missing parameter in the usage message of jack_midiseq.
* Add a client counter in wrapper layer : library is unloaded only when all clients have been closed.
* Add a client counter in wrapper layer: library is unloaded only when all clients have been closed.
2008-03-28 Stephane Letz <letz@grame.fr>
......@@ -1455,7 +1455,7 @@ Chris Caudle
2008-01-03 Stephane Letz <letz@grame.fr>
* Dmitry Baikov MIDI patch : alsa_seqmidi and alsa_rammidi drivers.
* Dmitry Baikov MIDI patch: alsa_seqmidi and alsa_rammidi drivers.
2008-01-03 Stephane Letz <letz@grame.fr>
......
......@@ -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.
*/
......
......@@ -298,70 +298,66 @@ struct JackNetExtMaster : public JackNetMasterInterface {
void AllocPorts()
{
int port_index;
// Set buffers
// Set buffers
if (fParams.fSendAudioChannels > 0) {
fAudioCaptureBuffer = new float*[fParams.fSendAudioChannels];
for (port_index = 0; port_index < fParams.fSendAudioChannels; port_index++) {
fAudioCaptureBuffer[port_index] = new float[fParams.fPeriodSize];
fNetAudioCaptureBuffer->SetBuffer(port_index, fAudioCaptureBuffer[port_index]);
for (int audio_port_index = 0; audio_port_index < fParams.fSendAudioChannels; audio_port_index++) {
fAudioCaptureBuffer[audio_port_index] = new float[fParams.fPeriodSize];
fNetAudioCaptureBuffer->SetBuffer(audio_port_index, fAudioCaptureBuffer[audio_port_index]);
}
}
if (fParams.fSendMidiChannels > 0) {
fMidiCaptureBuffer = new JackMidiBuffer*[fParams.fSendMidiChannels];
for (port_index = 0; port_index < fParams.fSendMidiChannels; port_index++) {
fMidiCaptureBuffer[port_index] = (JackMidiBuffer*)new float[fParams.fPeriodSize];
fNetMidiCaptureBuffer->SetBuffer(port_index, fMidiCaptureBuffer[port_index]);
for (int midi_port_index = 0; midi_port_index < fParams.fSendMidiChannels; midi_port_index++) {
fMidiCaptureBuffer[midi_port_index] = (JackMidiBuffer*)new float[fParams.fPeriodSize];
fNetMidiCaptureBuffer->SetBuffer(midi_port_index, fMidiCaptureBuffer[midi_port_index]);
}
}
if (fParams.fReturnAudioChannels > 0) {
fAudioPlaybackBuffer = new float*[fParams.fReturnAudioChannels];
for (port_index = 0; port_index < fParams.fReturnAudioChannels; port_index++) {
fAudioPlaybackBuffer[port_index] = new float[fParams.fPeriodSize];
fNetAudioPlaybackBuffer->SetBuffer(port_index, fAudioPlaybackBuffer[port_index]);
for (int audio_port_index = 0; audio_port_index < fParams.fReturnAudioChannels; audio_port_index++) {
fAudioPlaybackBuffer[audio_port_index] = new float[fParams.fPeriodSize];
fNetAudioPlaybackBuffer->SetBuffer(audio_port_index, fAudioPlaybackBuffer[audio_port_index]);
}
}
if (fParams.fReturnMidiChannels > 0) {
fMidiPlaybackBuffer = new JackMidiBuffer*[fParams.fReturnMidiChannels];
for (port_index = 0; port_index < fParams.fReturnMidiChannels; port_index++) {
fMidiPlaybackBuffer[port_index] = (JackMidiBuffer*)new float[fParams.fPeriodSize];
fNetMidiPlaybackBuffer->SetBuffer(port_index, fMidiPlaybackBuffer[port_index]);
for (int midi_port_index = 0; midi_port_index < fParams.fReturnMidiChannels; midi_port_index++) {
fMidiPlaybackBuffer[midi_port_index] = (JackMidiBuffer*)new float[fParams.fPeriodSize];
fNetMidiPlaybackBuffer->SetBuffer(midi_port_index, fMidiPlaybackBuffer[midi_port_index]);
}
}
}
void FreePorts()
{
int port_index;
if (fAudioPlaybackBuffer) {
for (port_index = 0; port_index < fParams.fSendAudioChannels; port_index++)
delete[] fAudioPlaybackBuffer[port_index];
for (int audio_port_index = 0; audio_port_index < fParams.fSendAudioChannels; audio_port_index++)
delete[] fAudioPlaybackBuffer[audio_port_index];
delete[] fAudioPlaybackBuffer;
fAudioPlaybackBuffer = NULL;
}
if (fMidiPlaybackBuffer) {
for (port_index = 0; port_index < fParams.fSendMidiChannels; port_index++)
delete[] (fMidiPlaybackBuffer[port_index]);
for (int midi_port_index = 0; midi_port_index < fParams.fSendMidiChannels; midi_port_index++)
delete[] (fMidiPlaybackBuffer[midi_port_index]);
delete[] fMidiPlaybackBuffer;
fMidiPlaybackBuffer = NULL;
}
if (fAudioCaptureBuffer) {
for (port_index = 0; port_index < fParams.fReturnAudioChannels; port_index++)
delete[] fAudioCaptureBuffer[port_index];
for (int audio_port_index = 0; audio_port_index < fParams.fReturnAudioChannels; audio_port_index++)
delete[] fAudioCaptureBuffer[audio_port_index];
delete[] fAudioCaptureBuffer;
fAudioCaptureBuffer = NULL;
}
if (fMidiCaptureBuffer) {
for (port_index = 0; port_index < fParams.fReturnMidiChannels; port_index++)
delete[] fMidiCaptureBuffer[port_index];
for (int midi_port_index = 0; midi_port_index < fParams.fReturnMidiChannels; midi_port_index++)
delete[] fMidiCaptureBuffer[midi_port_index];
delete[] fMidiCaptureBuffer;
fMidiCaptureBuffer = NULL;
}
......@@ -372,12 +368,12 @@ struct JackNetExtMaster : public JackNetMasterInterface {
try {
assert(audio_input == fParams.fReturnAudioChannels);
for (int port_index = 0; port_index < audio_input; port_index++) {
fNetAudioPlaybackBuffer->SetBuffer(port_index, audio_input_buffer[port_index]);
for (int audio_port_index = 0; audio_port_index < audio_input; audio_port_index++) {
fNetAudioPlaybackBuffer->SetBuffer(audio_port_index, audio_input_buffer[audio_port_index]);
}
for (int port_index = 0; port_index < midi_input; port_index++) {
fNetMidiPlaybackBuffer->SetBuffer(port_index, ((JackMidiBuffer**)midi_input_buffer)[port_index]);
for (int midi_port_index = 0; midi_port_index < midi_input; midi_port_index++) {
fNetMidiPlaybackBuffer->SetBuffer(midi_port_index, ((JackMidiBuffer**)midi_input_buffer)[midi_port_index]);
}
if (SyncRecv() == SOCKET_ERROR)
......@@ -397,12 +393,12 @@ struct JackNetExtMaster : public JackNetMasterInterface {
try {
assert(audio_output == fParams.fSendAudioChannels);
for (int port_index = 0; port_index < audio_output; port_index++) {
fNetAudioCaptureBuffer->SetBuffer(port_index, audio_output_buffer[port_index]);
for (int audio_port_index = 0; audio_port_index < audio_output; audio_port_index++) {
fNetAudioCaptureBuffer->SetBuffer(audio_port_index, audio_output_buffer[audio_port_index]);
}
for (int port_index = 0; port_index < midi_output; port_index++) {
fNetMidiCaptureBuffer->SetBuffer(port_index, ((JackMidiBuffer**)midi_output_buffer)[port_index]);
for (int midi_port_index = 0; midi_port_index < midi_output; midi_port_index++) {
fNetMidiCaptureBuffer->SetBuffer(midi_port_index, ((JackMidiBuffer**)midi_output_buffer)[midi_port_index]);
}
EncodeSyncPacket();
......
......@@ -25,23 +25,25 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
class HardwareClock
{
public:
HardwareClock();
public:
void Reset();
void Update();
HardwareClock();
float GetDeltaTime() const;
double GetTime() const;
void Reset();
void Update();
private:
double m_clockToSeconds;
float GetDeltaTime() const;
double GetTime() const;
uint64_t m_startAbsTime;
uint64_t m_lastAbsTime;
private:
double m_time;
float m_deltaTime;
double m_clockToSeconds;
uint64_t m_startAbsTime;
uint64_t m_lastAbsTime;
double m_time;
float m_deltaTime;
};
HardwareClock::HardwareClock()
......
......@@ -366,7 +366,7 @@ namespace Jack
fPortBuffer = 0;
}
~JackPortList()
virtual ~JackPortList()
{
delete [] fPortBuffer;
}
......@@ -506,6 +506,9 @@ namespace Jack
:JackPortList(params, nports)
{}
virtual ~JackOptimizedPortList()
{}
int GetNumPackets()
{
// Count active ports
......@@ -554,8 +557,6 @@ namespace Jack
}
sub_period_bytes_size = sub_period_size * sizeof(sample_t) + sizeof(uint32_t); // The port number in coded on 4 bytes
for (uint32_t port_index = 0; port_index < port_num; port_index++) {
// Only copy to active ports : read the active port number then audio data
int* active_port_address = (int*)(net_buffer + port_index * sub_period_bytes_size);
......
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