Commit Graph

77 Commits

Author SHA1 Message Date
Filipe Coelho 59550f67ee
Fix client UUID gen, and some warnings (#440)
* Fix generation of client uuid

Signed-off-by: falkTX <falktx@falktx.com>

* Remove all client properties when removed; Cleanup a few things

Signed-off-by: falkTX <falktx@falktx.com>

* Make all uuid function arguments use jack_uuid_t type; Fix warnings

Signed-off-by: falkTX <falktx@falktx.com>

* Rework uuids to never be int, more cleanup

Signed-off-by: falkTX <falktx@falktx.com>
2019-03-18 08:33:50 +01:00
Gaël PORTAY a91969e12d Fix uninitialized fEndDateUst.
Reported by valgrind using the command below:
$ valgrind jackd -p128 -t2000 -dalsa -dhw:0 -r44100 -p2048 -n2 -S
==17496== Memcheck, a memory error detector
==17496== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==17496== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==17496== Command: jackd -p128 -t2000 -dalsa -dhw:0 -r44100 -p2048 -n2 -S
==17496==
jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
creating alsa driver ... hw:0|hw:0|2048|2|44100|0|0|nomon|swmeter|-|16bit
configuring for 44100Hz, period = 2048 frames (46.4 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 16bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 2 periods for playback
==17496== Thread 3:
==17496== Conditional jump or move depends on uninitialised value(s)
==17496==    at 0x4E91CC9: Jack::JackEngineControl::CalcCPULoad(Jack::JackClientInterface**, Jack::JackGraphManager*, unsigned long, unsigned long) (JackEngineControl.cpp:58)
==17496==    by 0x4EB3256: Jack::JackEngineControl::CycleBegin(Jack::JackClientInterface**, Jack::JackGraphManager*, unsigned long, unsigned long) (JackEngineControl.h:153)
==17496==    by 0x4EAF54A: Jack::JackEngine::Process(unsigned long, unsigned long) (JackEngine.cpp:166)
==17496==    by 0x4EA922E: Jack::JackLockedEngine::Process(unsigned long, unsigned long) (JackLockedEngine.h:261)
==17496==    by 0x4EA8819: Jack::JackAudioDriver::ProcessGraphAsyncMaster() (JackAudioDriver.cpp:250)
==17496==    by 0x4EA87D0: Jack::JackAudioDriver::ProcessGraphAsync() (JackAudioDriver.cpp:236)
==17496==    by 0x4EA8795: Jack::JackAudioDriver::ProcessAsync() (JackAudioDriver.cpp:225)
==17496==    by 0x4EA870E: Jack::JackAudioDriver::Process() (JackAudioDriver.cpp:202)
==17496==    by 0x4EBA5DA: Jack::JackThreadedDriver::Process() (JackThreadedDriver.cpp:71)
==17496==    by 0x4EBAC52: Jack::JackThreadedDriver::Execute() (JackThreadedDriver.cpp:244)
==17496==    by 0x4EA4B63: Jack::JackPosixThread::ThreadHandler(void*) (JackPosixThread.cpp:61)
==17496==    by 0x59F5181: start_thread (pthread_create.c:312)
==17496==
^CJack main caught signal 2
==17496==
==17496== HEAP SUMMARY:
==17496==     in use at exit: 95,475 bytes in 1,441 blocks
==17496==   total heap usage: 2,793 allocs, 1,352 frees, 7,217,645 bytes allocated
==17496==
==17496== LEAK SUMMARY:
==17496==    definitely lost: 1,458 bytes in 10 blocks
==17496==    indirectly lost: 7,680 bytes in 4 blocks
==17496==      possibly lost: 42,998 bytes in 1,314 blocks
==17496==    still reachable: 43,339 bytes in 113 blocks
==17496==         suppressed: 0 bytes in 0 blocks
==17496== Rerun with --leak-check=full to see details of leaked memory
==17496==
==17496== For counts of detected and suppressed errors, rerun with: -v
==17496== Use --track-origins=yes to see where uninitialised values come from
==17496== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
2016-05-19 13:29:21 -04:00
Stephane Letz 51f923882e Correct JackDriver::Open : call to fGraphManager->SetBufferSize has to use current fEngineControl->fBufferSize value. 2016-02-11 11:58:01 +01:00
Stephane Letz 02f74a659a String management fix. 2016-01-01 20:40:22 +01:00
Stephane Letz f60fde8a2d Cleanup backend class structure. 2013-10-16 13:30:33 +02:00
Stephane Letz e4de2d61da Autosave mode in netjack2 netmanager. 2013-05-13 09:33:50 +02:00
Stephane Letz 4c62b949d3 Correct JackDriver::SaveConnections. 2013-04-24 17:03:47 +02:00
Stephane Letz 5d06b94ef7 Use port type information in JackDriver::SaveConnections and JackDriver::RestoreConnections. 2013-04-18 15:44:21 +02:00
Stephane Letz 8d8fa12505 Improve JackDriver SaveConnections and RestoreConnections(2). 2013-04-16 11:21:14 +02:00
Stephane Letz 2e12829a04 Improve JackDriver SaveConnections and RestoreConnections. 2013-04-16 10:49:39 +02:00
Stephane Letz 15950eb1df Rework XRun handling. 2013-01-27 12:29:19 +01:00
sletz b6962bd0d7 Correct client time-out setting.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4759 0c269be4-1314-0410-8aa9-9f06e86f4224
2012-01-31 20:43:13 +00:00
sletz 85df85f520 Fix for compilation on Solaris.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4670 0c269be4-1314-0410-8aa9-9f06e86f4224
2012-01-06 09:50:43 +00:00
sletz 3e3fb604c8 Cleanup.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4648 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-12-15 13:49:24 +00:00
sletz 866f001cdc More cleanup in backends.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4646 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-12-15 10:55:05 +00:00
sletz 4f60f19c2f Cleanup of backend stack.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4645 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-12-15 10:08:10 +00:00
sletz 022e551350 Cleanup.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4608 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-11-25 12:52:05 +00:00
sletz 4f25dd864b Correct jack_port_name_size API.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4607 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-11-25 12:29:55 +00:00
sletz 496146f6b5 More robust dynamic port management in JACK/CoreMidi bridge.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4604 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-11-25 11:06:38 +00:00
sletz d574ce33ea Code factorization.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4601 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-11-24 14:54:25 +00:00
Stephane Letz 734e450924 NetJack2 code cleanup. 2011-11-04 14:47:54 +01:00
sletz 5a5cc73ac7 New JackTimedDriver class to be used by JackDummyDriver, JackNetDriver and JackNetOneDriver classes.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4522 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-07-29 14:55:00 +00:00
Stephane Letz 5ebeb196af More relax JackEngine::NotifyAddClient. 2011-07-23 15:27:17 +02:00
sletz 4f5e3ecd37 Correct driver lifetime management.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4266 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-04-04 20:58:20 +00:00
sletz 3b80fc105c Cleanup.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4256 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-04-02 15:03:01 +00:00
Stephane Letz cf98c33ef8 Correct SetBufferSize for drivers. 2011-03-30 11:41:00 +02:00
Stephane Letz ace4b75385 Merge branch 'master' into newer-midi 2011-03-26 12:57:22 +01:00
Stephane Letz 981ff8cf45 Major redesign of driver activation (master and salve mode). 2011-03-25 17:18:37 +01:00
sletz 92d88530ec Implement renaming in JackDriver::Open to avoid name collision (thanks Devin Anderson).
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4221 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-03-24 10:16:30 +00:00
Stephane Letz 17df184da2 jackctl_server_add_slave and jackctl_server_remove_slave now test if server is running. 2011-03-22 17:41:18 +01:00
Devin Anderson 62abf3f768 Make freewheel driver 'Start()', 'Process()', etc. methods called via the freewheel driver object when freewheel mode is off, and via the threaded driver wrapper when freewheel mode is on. 2011-03-21 16:58:30 -07:00
Devin Anderson db132e1974 Update server control API with jackctl_server_open and jackctl_server_close (see http://trac.jackaudio.org/ticket/219 for rationale). Update drivers to support Start/Stop of slave drivers. Update dbus to use new jackctl_server_* functions. Freewheel driver is no longer an implicit slave of the master audio driver. Haven't tested freewheeling, and didn't update Solaris OSS driver. Tested slave addition by adding loopback driver, but don't have a slave driver in this branch on Linux platform to test with. 2011-03-20 22:39:31 -07:00
sletz ae99359963 New latency API implementation (in progress).
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4150 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-03-04 15:23:58 +00:00
sletz 85ae7ba5cb Fix for ticket #152.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3868 0c269be4-1314-0410-8aa9-9f06e86f4224
2010-01-06 17:30:34 +00:00
sletz 61c5eacd34 In JackCoreAudioDriver, force the SR value to the wanted one *before* creating aggregate device (otherwise creation will fail).
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3679 0c269be4-1314-0410-8aa9-9f06e86f4224
2009-10-28 17:41:16 +00:00
sletz ae57b1d033 CoreAudio backend now issue a JackInfoShutdownCallback when an unrecoverable error is detected (sampling rate change, stream configuration change…)
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3654 0c269be4-1314-0410-8aa9-9f06e86f4224
2009-10-20 16:10:28 +00:00
sletz d09d8c3c82 Add a string parameter to server ==> client notification, add a new InfoShutdown callback.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3653 0c269be4-1314-0410-8aa9-9f06e86f4224
2009-10-20 11:07:58 +00:00
sletz 9066f85ba0 Rename JackDriver::Init method to JackDriver::Initialize (to avoid confusion with JackThread::Init method).
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3599 0c269be4-1314-0410-8aa9-9f06e86f4224
2009-07-15 14:34:45 +00:00
sletz d38a6c9c1d Move InitFrameTime in JackDriver::Start method.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3538 0c269be4-1314-0410-8aa9-9f06e86f4224
2009-05-15 14:27:07 +00:00
sletz 8146837a13 First working version of native MIDI backend (JackCoreMidiDriver, JackWinMMEDriver).
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3526 0c269be4-1314-0410-8aa9-9f06e86f4224
2009-05-05 14:49:59 +00:00
sletz 34ff05a8ca Native MIDI backend (JackCoreMidiDriver, JackWinMMEDriver) in progress.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3498 0c269be4-1314-0410-8aa9-9f06e86f4224
2009-04-07 12:26:59 +00:00
sletz b2d7940247 Correct timing measurement error done in ALSA driver (r3253)
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3258 0c269be4-1314-0410-8aa9-9f06e86f4224
2009-01-23 11:03:46 +00:00
sletz f19b74f904 Header cleanup, add --clients and --ports options in configure.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2957 0c269be4-1314-0410-8aa9-9f06e86f4224
2008-10-02 13:58:46 +00:00
sletz 3b8e4f2c23 Michael Voigt JackTime patch.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2929 0c269be4-1314-0410-8aa9-9f06e86f4224
2008-09-19 20:35:21 +00:00
sletz 3e01068967 Merge Michael Voigt drops branch after reorganization step.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2880 0c269be4-1314-0410-8aa9-9f06e86f4224
2008-09-05 13:36:28 +00:00
sletz 6dc1387fc5 Loopback driver working again.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2687 0c269be4-1314-0410-8aa9-9f06e86f4224
2008-07-12 10:27:19 +00:00
sletz 5349284639 Netioadapter now adapts for buffer size and sample rate changes.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2639 0c269be4-1314-0410-8aa9-9f06e86f4224
2008-07-04 07:34:56 +00:00
sletz e5bcc3068a Add IsFixedBufferSize method in all drivers.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2636 0c269be4-1314-0410-8aa9-9f06e86f4224
2008-07-03 10:37:59 +00:00
sletz 8f3e986c02 Embed JackEngineControl in JackDriver (starting from Tim Blechmann idea).
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2538 0c269be4-1314-0410-8aa9-9f06e86f4224
2008-06-19 05:30:58 +00:00
sletz 81a50f285f Driver class hierarchy simplification.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2529 0c269be4-1314-0410-8aa9-9f06e86f4224
2008-06-17 07:57:16 +00:00