Problem:
int res = aften_encode_frame(&fAftenContext, fAC3Buffer + SPDIF_HEADER_SIZE, fSampleBuffer);
Fails, because API is
AFTEN_API int aften_encode_frame(AftenContext *s, unsigned char *frame_buffer,const void *samples, int count)
The additional parameter 'count' was added to libaften function aften_encode_frame() here:
e1cbb66628 (diff-d4868af7d235a914aef2ec4f979fcb9fR87)
Solves https://github.com/jackaudio/jack2/issues/455
* 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>
For this client program, it's hard to imagine a case where
autostarting a jack server is reasonable just to query or set the bufsize.
This is in accordance with programs like jack_lsp, jack_connect
(do not start a server if none is running).
- Use jack_set_error_function() (currently no-op)
In the case of clients that use jack_options_t JackNoStartServer,
running it with no server started produces verbose output in the form:
```
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JACK server not running?
```
Setting a no-op error handler before trying jack_client_open()
will hide these messages.
Checking the status allows to output a user-friendly error message.
The first string is generic for any fail of jack_client_open()
`Error: cannot connect to JACK, `
Most importantly it informs the user that there is an error.
Depending on status the string is extended with either
`server is not running.`
or
`jack_client_open() failed, status =...`
if the status indicates anything else than JackServerFailed.
Running jack_lsp or jack_connect with no server running outputs (new)
`
Error: cannot connect to JACK, server is not running.
`
More aspects of example_clients/* can be reviewed for unification.
Some do ask:
`JACK server not running?`
Others tell
`JACK server not running.`
If this commit won't show deficits: jack_client_open() sections can be
changed in all example_clients accordingly.
Note: obviously the --version option is currently a NO-OP in many client programs. This needs a closer look.
Only REG_EXTENDED regular expressions are understood.
Eg. foo_{1|2} is NOT understood.
This commit solves segfault when using invalid regular expressions.
See https://github.com/jackaudio/jack2/issues/433
Running ldd -r -u <jack_binary> should tell about unused dependencies.
Also see
https://github.com/jackaudio/jack2/issues/430
Minor changes
-set script to fail on any error
-check early for existing jackd
-add comments
* Revert "oss_driver: Use float to S32 conversion if requested"
This reverts commit c5a0f5ea1c.
* Revert "alsa_in/out: Use float to S32 conversion if requested"
This reverts commit 148c8d8e6a.
* Revert "alsa_driver: Use float to S32 conversion if requested"
This reverts commit d017e1fffe.
* Revert "memops: Provide function for float to S32 conversion"
This reverts commit bb99e09b99.
* Revert "memops: Align S24LE and S32LE to float conversion"
This reverts commit b4ea23df6a.
* Revert "memops: Provide function for S32 to float conversion"
This reverts commit 244fc27e29.
* Revert "memops: Align float to S24LE and S32LE conversion"
This reverts commit 4455fe020c.
* Revert "memops: Remove not used conversion macros"
This reverts commit a82f3f2fb4.
* Revert "memops: Use right-aligned S24LE to float conversion"
This reverts commit e753254313.
* Revert "memops: Use right-aligned float to S24LE conversion"
This reverts commit 831163e516.
Running script 'jack_property_test.sh' with recent jack1 and jack2 git builds show different results.
Notes:
-jack1 gives only false positives due to a small text change
-jack2 has issues using client name as subject/identifier/uuid
-> see '** FAILED' lines
-jack1 is much faster in performing the same script
-running the script in a loop causes memory problems with jack2
output running with jack1:
test system_c1: jack_property -D
OK: 0
** FAILED: JACK metadata successfully delete
** EXP EQ: JACK metadata successfully deleted
test system_c2: jack_property -l
OK: 0
OK:
test system_c3: jack_property -c -l system
OK: 0
OK:
test system_c4: jack_property -c -s system client_key client_value
OK: 0
OK:
test system_c5: jack_property -c -l system
OK: 0
OK: key: client_key value: client_value
test system_c6: jack_property -c -l system client_key
OK: 0
OK: client_value
test system_c7: jack_property -l
OK: 0
OK: key: client_key value: client_value
test system_c8: jack_property -p -l system:non
OK: 0
OK: cannot find port name system:non
test system_p1: jack_property -D
OK: 0
** FAILED: JACK metadata successfully delete
** EXP EQ: JACK metadata successfully deleted
test system_p2: jack_property -l
OK: 0
OK:
test system_p3: jack_property -p -l system:playback_1
OK: 0
OK:
test system_p4: jack_property -p -s system:playback_1 port_key port_value
OK: 0
OK:
test system_p5: jack_property -p -l system:playback_1
OK: 0
OK: key: port_key value: port_value
test system_p6: jack_property -p -l system:playback_1 port_key
OK: 0
OK: port_value
test system_p7: jack_property -p -d system:playback_1 port_key
OK: 0
OK:
test system_p8: jack_property -p -l system:playback_1 port_key
OK: 0
OK: Value not found for port_key of system:playback_1
test system_p9: jack_property -p -d system:playback_1 port_key
OK: 0
OK: "port_key" property not removed for system:playback_1
test system_p10: jack_property -p -l system:playback_1
OK: 0
OK:
test system_p11: jack_property -p -l system:playback_1 non
OK: 0
OK: Value not found for non of system:playback_1
test system_p12: jack_property -c -l non
OK: 0
OK: cannot get UUID for client named non
metro:120_bpm
test metro_c1: jack_property -D
OK: 0
** FAILED: JACK metadata successfully delete
** EXP EQ: JACK metadata successfully deleted
test metro_c2: jack_property -l
OK: 0
OK:
test metro_c3: jack_property -c -l metro
OK: 0
OK:
test metro_c4: jack_property -c -s metro client_key client_value
OK: 0
OK:
test metro_c5: jack_property -c -l metro
OK: 0
OK: key: client_key value: client_value
test metro_c6: jack_property -c -l metro client_key
OK: 0
OK: client_value
test metro_c7: jack_property -l
OK: 0
OK: key: client_key value: client_value
test metro_c8: jack_property -p -l metro:non
OK: 0
OK: cannot find port name metro:non
test metro_p1: jack_property -D
OK: 0
** FAILED: JACK metadata successfully delete
** EXP EQ: JACK metadata successfully deleted
test metro_p2: jack_property -l
OK: 0
OK:
test metro_p3: jack_property -p -l metro:120_bpm
OK: 0
OK:
test metro_p4: jack_property -p -s metro:120_bpm port_key port_value
OK: 0
OK:
test metro_p5: jack_property -p -l metro:120_bpm
OK: 0
OK: key: port_key value: port_value
test metro_p6: jack_property -p -l metro:120_bpm port_key
OK: 0
OK: port_value
test metro_p7: jack_property -p -d metro:120_bpm port_key
OK: 0
OK:
test metro_p8: jack_property -p -l metro:120_bpm port_key
OK: 0
OK: Value not found for port_key of metro:120_bpm
test metro_p9: jack_property -p -d metro:120_bpm port_key
OK: 0
OK: "port_key" property not removed for metro:120_bpm
test metro_p10: jack_property -p -l metro:120_bpm
OK: 0
OK:
test metro_p11: jack_property -p -l metro:120_bpm non
OK: 0
OK: Value not found for non of metro:120_bpm
test metro_p12: jack_property -c -l non
OK: 0
OK: cannot get UUID for client named non
JACK metadata successfully delete
./jack_property_test.sh: line 215: 21025 Hangup jack_metro -b120
done, exit status is 1
real 0m1.011s
user 0m0.125s
sys 0m0.324s
==========================================
output running with jack2:
test system_c1: jack_property -D
OK: 0
OK: JACK metadata successfully deleted
test system_c2: jack_property -l
OK: 0
OK:
test system_c3: jack_property -c -l system
OK: 0
OK:
test system_c4: jack_property -c -s system client_key client_value
OK: 0
OK:
test system_c5: jack_property -c -l system
OK: 0
OK: key: client_key value: client_value
test system_c6: jack_property -c -l system client_key
OK: 0
OK: client_value
test system_c7: jack_property -l
OK: 0
OK: key: client_key value: client_value
test system_c8: jack_property -p -l system:non
OK: 0
OK: cannot find port name system:non
test system_p1: jack_property -D
OK: 0
OK: JACK metadata successfully deleted
test system_p2: jack_property -l
OK: 0
OK:
test system_p3: jack_property -p -l system:playback_1
OK: 0
OK:
test system_p4: jack_property -p -s system:playback_1 port_key port_value
OK: 0
OK:
test system_p5: jack_property -p -l system:playback_1
OK: 0
OK: key: port_key value: port_value
test system_p6: jack_property -p -l system:playback_1 port_key
OK: 0
OK: port_value
test system_p7: jack_property -p -d system:playback_1 port_key
OK: 0
OK:
test system_p8: jack_property -p -l system:playback_1 port_key
OK: 0
OK: Value not found for port_key of system:playback_1
test system_p9: jack_property -p -d system:playback_1 port_key
OK: 0
OK: "port_key" property not removed for system:playback_1
test system_p10: jack_property -p -l system:playback_1
OK: 0
OK:
test system_p11: jack_property -p -l system:playback_1 non
OK: 0
OK: Value not found for non of system:playback_1
test system_p12: jack_property -c -l non
OK: 0
OK: cannot get UUID for client named non
metro:120_bpm
test metro_c1: jack_property -D
OK: 0
OK: JACK metadata successfully deleted
test metro_c2: jack_property -l
OK: 0
OK:
test metro_c3: jack_property -c -l metro
** FAILED: 255
** EXP EQ: 0
** FAILED: cannot parse client UUID as UUID
** EXP EQ:
test metro_c4: jack_property -c -s metro client_key client_value
** FAILED: 255
** EXP EQ: 0
** FAILED: cannot parse client UUID as UUID
** EXP EQ:
test metro_c5: jack_property -c -l metro
** FAILED: 255
** EXP EQ: 0
** FAILED: cannot parse client UUID as UUID
** EXP EQ: key: client_key value: client_value
test metro_c6: jack_property -c -l metro client_key
** FAILED: 255
** EXP EQ: 0
** FAILED: cannot parse client UUID as UUID
** EXP EQ: client_value
test metro_c7: jack_property -l
OK: 0
** FAILED:
** EXP EQ: key: client_key value: client_value
test metro_c8: jack_property -p -l metro:non
OK: 0
OK: cannot find port name metro:non
test metro_p1: jack_property -D
OK: 0
OK: JACK metadata successfully deleted
test metro_p2: jack_property -l
OK: 0
OK:
test metro_p3: jack_property -p -l metro:120_bpm
OK: 0
OK:
test metro_p4: jack_property -p -s metro:120_bpm port_key port_value
OK: 0
OK:
test metro_p5: jack_property -p -l metro:120_bpm
OK: 0
OK: key: port_key value: port_value
test metro_p6: jack_property -p -l metro:120_bpm port_key
OK: 0
OK: port_value
test metro_p7: jack_property -p -d metro:120_bpm port_key
OK: 0
OK:
test metro_p8: jack_property -p -l metro:120_bpm port_key
OK: 0
OK: Value not found for port_key of metro:120_bpm
test metro_p9: jack_property -p -d metro:120_bpm port_key
OK: 0
OK: "port_key" property not removed for metro:120_bpm
test metro_p10: jack_property -p -l metro:120_bpm
OK: 0
OK:
test metro_p11: jack_property -p -l metro:120_bpm non
OK: 0
OK: Value not found for non of metro:120_bpm
test metro_p12: jack_property -c -l non
OK: 0
OK: cannot get UUID for client named non
JACK metadata successfully deleted
signal received, exiting ...
done, exit status is 1
real 0m2.806s
user 0m0.176s
sys 0m0.374s
Problem:
#set two properties for UUID 4294967296
$ jack_property -s 4294967296 "a" 1
$ jack_property -s 4294967296 b "2"
#-l lists them
$ jack_property -l
4294967296
key: b value: 2
key: a value: 1
#-l for UUID doesn't list them <<<<<<
$ jack_property -l 4294967296
$ jack_property -l 4294967296 a
Value not found for a of 4294967296
$ jack_property -l 4294967296 b
Value not found for b of 4294967296
#it seems that 3 chars is the minimum length for value when querying for UUID
$ jack_property -s 4294967296 a 123
$ jack_property -l 4294967296
key: a value: 123
$ jack_property -l 4294967296 a
123
In example-clients/property.c:
/* list all properties for a given UUID */
if ((cnt = jack_get_properties (uuid, &description)) < 0) {
fprintf (stderr, "could not retrieve properties for %s\n", subject);
exit (1);
}
cnt is always 0 for values < 3 chars. Why?
In common/JackMetadata.cpp:
int JackMetadata::GetProperty(jack_uuid_t subject, const char* key, char** value, char** type)
int JackMetadata::GetProperties(jack_uuid_t subject, jack_description_t* desc)
This loop gets results:
while ((ret = cursor->get (cursor, &key, &data, DB_NEXT)) == 0) {
but are dropped because of this check:
/* result must have at least 2 chars plus 2 nulls to be valid
if (data.size < 4) {
This rule isn't understood. Explanations are welcome!
Reducing the check to 2 (1 char + null) will consider single char values.
This makes listing properties for a given UUID the same keys as when listing all UUIDs and keys.
No side-effects of lowering the value has been detected (yet).
Note: there is no problem getting "short" values in this method:
int JackMetadata::GetAllProperties(jack_description_t** descriptions)
(as used by jack_property -l without UUID)
jack_property output after change to (data.size < 2):
$ jack_property -s 4294967296 "a" 1
$ jack_property -s 4294967296 b "2"
$ jack_property -l
4294967296
key: b value: 2
key: a value: 1
$ jack_property -l 4294967296
key: b value: 2
key: a value: 1
$ jack_property -l 4294967296 a
1
$ jack_property -l 4294967296 b
2
Note: This change should be considered also for JACK1 (libjack/metadata.c)
to keep implementations in sync.
For OSX travis builds:
Since recently, brew install --c++11 stops the build.
Error: invalid option: --c++11
The command "./.ci/install-deps.sh" failed and exited with 1 during .
Your build has been stopped.