Hi,
I noticed that if I compile in the libsamplerate, sems starts to crash left
and right, with no apparent pattern. Valgrind complained about writes to
wrong places, but the code didn't have any problem. Eventually I figured out
that the Makefiles have the problem, the applications didn't set
the -DUSE_LIBSAMPLERATE, so the eventually the memory got all messed up.
Patch attached.
br
Szo
Index: core/plug-in/Makefile.audio_module
===================================================================
--- core/plug-in/Makefile.audio_module (revision 1057)
+++ core/plug-in/Makefile.audio_module (working copy)
@@ -5,6 +5,11 @@
CPPFLAGS += -I $(COREPATH) -I $(COREPATH)/amci
CFLAGS += -Wall $(module_cflags)
+ifdef USE_LIBSAMPLERATE
+CPPFLAGS += -DUSE_LIBSAMPLERATE
+LDFLAGS +=-lsamplerate
+endif
+
audio_mod_dir = $(COREPATH)/lib
lib_name = $(plug_in_name).so
Index: core/plug-in/Makefile.app_module
===================================================================
--- core/plug-in/Makefile.app_module (revision 1057)
+++ core/plug-in/Makefile.app_module (working copy)
@@ -10,6 +10,11 @@
CPPFLAGS += $(module_cflags)
CXXFLAGS += $(module_cflags)
+ifdef USE_LIBSAMPLERATE
+CPPFLAGS += -DUSE_LIBSAMPLERATE
+LDFLAGS +=-lsamplerate
+endif
+
app_module_dir = $(COREPATH)/lib
lib_name = $(plug_in_name).so
Index: core/AmAudio.cpp
===================================================================
--- core/AmAudio.cpp (revision 1057)
+++ core/AmAudio.cpp (working copy)
@@ -261,6 +261,10 @@
: fmt(_fmt),
max_rec_time(-1),
rec_time(0)
+#ifdef USE_LIBSAMPLERATE
+ , resample_state(NULL),
+ resample_buf_samples(0)
+#endif
{
}
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev