Closed simdax closed 4 years ago
Hello,
sorry for the long delay, i actually didn't watch the repository so i didn't get notified.
Here is a compatibility layer which should work :
// compatibility layer for liblfds 711 version
#ifdef LFDS711
#include "liblfds711.h"
#define lfds720_freelist_n_element lfds711_freelist_element
#define lfds720_ringbuffer_n_element lfds711_ringbuffer_element
#define lfds720_ringbuffer_n_state lfds711_ringbuffer_state
#define lfds720_freelist_n_state lfds711_freelist_state
#define LFDS720_PAL_ATOMIC_ISOLATION_LENGTH_IN_BYTES LFDS711_PAL_ATOMIC_ISOLATION_IN_BYTES
#define lfds720_ringbuffer_n_init_valid_on_current_logical_core lfds711_ringbuffer_init_valid_on_current_logical_core
#define lfds720_freelist_n_init_valid_on_current_logical_core lfds711_freelist_init_valid_on_current_logical_core
#define LFDS720_FREELIST_N_SET_VALUE_IN_ELEMENT LFDS711_FREELIST_SET_VALUE_IN_ELEMENT
#define LFDS720_FREELIST_N_GET_VALUE_FROM_ELEMENT LFDS711_FREELIST_GET_VALUE_FROM_ELEMENT
#define lfds720_freelist_n_threadsafe_push lfds711_freelist_push
#define lfds720_freelist_n_threadsafe_pop lfds711_freelist_pop
#define lfds720_ringbuffer_n_cleanup lfds711_ringbuffer_cleanup
#define lfds720_freelist_n_cleanup lfds711_freelist_cleanup
#define lfds720_ringbuffer_n_read lfds711_ringbuffer_read
#define lfds720_ringbuffer_n_write lfds711_ringbuffer_write
#define lfds720_misc_flag lfds711_misc_flag
#define LFDS720_MISC_FLAG_RAISED LFDS711_MISC_FLAG_RAISED
#define LFDS720_MISC_MAKE_VALID_ON_CURRENT_LOGICAL_CORE_INITS_COMPLETED_BEFORE_NOW_ON_ANY_OTHER_PHYSICAL_CORE LFDS711_MISC_MAKE_VALID_ON_CURRENT_LOGICAL_CORE_INITS_COMPLETED_BEFORE_NOW_ON_ANY_OTHER_LOGICAL_CORE
#define lfds720_pal_uint_t lfds711_pal_uint_t
#else
#include "liblfds720.h"
#endif
I will see to provide a liblfds711 compatible layer if that doesn't work.
hmmm seems not working, due to some discrepancies between 720_n_thing that transpiles to 711_thing. At the end I have :
$ make
gcc main.c tools.c samples.c grains.c oscillators.c wavetables.c note.c usage.c lib/lodepng.c lib/Yin.c filters.c -I lo -I inc -I inc/portaudio -I inc/soundpipe -g -DDEBUG -std=c11 -pedantic -D_POSIX_SOURCE -DALSA_RT -DLFDS711 -llfds -lportaudio -lsamplerate -lwebsockets -lrt -lm -lasound -ljack -pthread -lsndfile -o fas
main.c: In function ‘paCallback’:
main.c:565:80: warning: passing argument 3 of ‘lfds711_freelist_push’ from incompatible pointer type [-Wincompatible-pointer-types]
lfds720_freelist_n_threadsafe_push(&freelist_frames, NULL, &curr_freelist_frames_data->fe);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from inc/liblfds711.h:19,
from fas.h:26,
from main.c:45:
inc/liblfds711/lfds711_freelist.h:60:66: note: expected ‘struct lfds711_prng_st_state *’ but argument is of type ‘struct lfds711_freelist_element *’
struct lfds711_prng_st_state *psts );
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
main.c:728:84: warning: passing argument 3 of ‘lfds711_freelist_push’ from incompatible pointer type [-Wincompatible-pointer-types]
lfds720_freelist_n_threadsafe_push(&freelist_frames, NULL, &curr_freelist_frames_data->fe);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from inc/liblfds711.h:19,
from fas.h:26,
from main.c:45:
inc/liblfds711/lfds711_freelist.h:60:66: note: expected ‘struct lfds711_prng_st_state *’ but argument is of type ‘struct lfds711_freelist_element *’
struct lfds711_prng_st_state *psts );
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
main.c: In function ‘setHeight’:
main.c:758:70: warning: passing argument 3 of ‘lfds711_freelist_pop’ from incompatible pointer type [-Wincompatible-pointer-types]
while (lfds720_freelist_n_threadsafe_pop(&freelist_frames, NULL, &fe)) {
^~~
In file included from inc/liblfds711.h:19,
from fas.h:26,
from main.c:45:
inc/liblfds711/lfds711_freelist.h:64:57: note: expected ‘struct lfds711_prng_st_state *’ but argument is of type ‘struct lfds711_freelist_element **’
struct lfds711_prng_st_state *psts );
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
main.c:770:68: warning: passing argument 3 of ‘lfds711_freelist_push’ from incompatible pointer type [-Wincompatible-pointer-types]
lfds720_freelist_n_threadsafe_push(&freelist_frames, NULL, &ffd[i].fe);
^~~~~~~~~~
In file included from inc/liblfds711.h:19,
from fas.h:26,
from main.c:45:
inc/liblfds711/lfds711_freelist.h:60:66: note: expected ‘struct lfds711_prng_st_state *’ but argument is of type ‘struct lfds711_freelist_element *’
struct lfds711_prng_st_state *psts );
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
main.c: In function ‘clearQueues’:
main.c:840:68: warning: passing argument 3 of ‘lfds711_freelist_push’ from incompatible pointer type [-Wincompatible-pointer-types]
lfds720_freelist_n_threadsafe_push(&freelist_frames, NULL, &freelist_frames_data->fe);
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from inc/liblfds711.h:19,
from fas.h:26,
from main.c:45:
inc/liblfds711/lfds711_freelist.h:60:66: note: expected ‘struct lfds711_prng_st_state *’ but argument is of type ‘struct lfds711_freelist_element *’
The most simple way would be : how to get the libflds720 or why not shipping it in the repo ?
Some function signature changed a bit, the last two arguments of the function must be swapped.
libflds720 is not yet released, the version i have is an incomplete draft which was packaged by the library author upon request because ARM64 support was needed.
An alternative for now would be to clone the repository just before the merge of the ARM64 branch, head is just 2 commits away and it is mostly conveniences stuff although the latest commit fix an important bug : https://github.com/grz0zrg/fas/tree/77ef94f21eaacdf8863600a1ace8b12e8743ce5f
Compat. layer for liblfds720 -> liblfds711 was added. FAS now use liblfds711 by default (until liblfds720 is released)
Hello,
In the doc, it is said that we have to clone liblfds711, but it seems that liblfds720 is needed. Unhopefully, liblfds's last version seems to be 711. And the error log discourages me simply trying to rename the thing