aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoël Krähemann <jkraehemann@gmail.com>2018-10-11 11:22:10 +0200
committerJoël Krähemann <jkraehemann@gmail.com>2018-10-11 11:22:10 +0200
commitec2925a4f103c733523c44445e771ef2f5dd76b8 (patch)
tree306a9d54d1a63ba62a7d03d9042db7e118ad015d
parent3ee0c2bf7494f47cf9f1504c3523125decfec268 (diff)
downloadgsequencer-ec2925a4f103c733523c44445e771ef2f5dd76b8.tar.gz
added ags_copy_pattern_audio_test.c and ags_copy_pattern_channel_test.c
-rw-r--r--ChangeLog3
-rw-r--r--Makefile.in106
-rw-r--r--ags/audio/recall/ags_copy_pattern_audio.c7
-rw-r--r--ags/audio/recall/ags_copy_pattern_channel.c2
-rw-r--r--ags/test/audio/recall/ags_copy_pattern_audio_test.c174
-rw-r--r--ags/test/audio/recall/ags_copy_pattern_channel_test.c165
-rw-r--r--unit-tests.mk14
7 files changed, 467 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 5822fb948..f733c9009 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@ ags (2.0.34)
* fixed missing ags-feed recall in factory
* fixed missing property AgsAnalyseChannel:buffer-cleared
* fixed ags_copy_channel_new() to use correct property AgsRecallChannel:source
+ * fixed ags_copy_pattern_audio_new() to use correct type to set bank-index-0 and bank-index-1
* added ags_recall_recycling_test.c
* added ags_envelope_audio_signal_test.c
* added ags_eq10_audio_signal_test.c
@@ -19,6 +20,8 @@ ags (2.0.34)
* added ags_capture_wave_audio_test.c
* added ags_capture_wave_channel_test.c
* added ags_copy_channel_test.c
+ * added ags_copy_pattern_audio_test.c
+ * added ags_copy_pattern_channel_test.c
ags (2.0.33)
diff --git a/Makefile.in b/Makefile.in
index 27d8a9a30..b777acec9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -170,6 +170,8 @@ check_PROGRAMS = ags_buffer_util_test$(EXEEXT) \
ags_capture_wave_channel_test$(EXEEXT) \
ags_copy_audio_signal_test$(EXEEXT) \
ags_copy_channel_test$(EXEEXT) \
+ ags_copy_pattern_audio_test$(EXEEXT) \
+ ags_copy_pattern_channel_test$(EXEEXT) \
ags_envelope_audio_signal_test$(EXEEXT) \
ags_eq10_audio_signal_test$(EXEEXT) \
ags_feed_audio_signal_test$(EXEEXT) \
@@ -1244,6 +1246,30 @@ ags_copy_channel_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(ags_copy_channel_test_CFLAGS) $(CFLAGS) \
$(ags_copy_channel_test_LDFLAGS) $(LDFLAGS) -o $@
+am_ags_copy_pattern_audio_test_OBJECTS = ags/test/audio/recall/copy_pattern_audio_test-ags_copy_pattern_audio_test.$(OBJEXT)
+ags_copy_pattern_audio_test_OBJECTS = \
+ $(am_ags_copy_pattern_audio_test_OBJECTS)
+ags_copy_pattern_audio_test_DEPENDENCIES = libags_audio.la \
+ libags_server.la libags_thread.la libags.la libags_thread.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+ags_copy_pattern_audio_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(ags_copy_pattern_audio_test_CFLAGS) $(CFLAGS) \
+ $(ags_copy_pattern_audio_test_LDFLAGS) $(LDFLAGS) -o $@
+am_ags_copy_pattern_channel_test_OBJECTS = ags/test/audio/recall/copy_pattern_channel_test-ags_copy_pattern_channel_test.$(OBJEXT)
+ags_copy_pattern_channel_test_OBJECTS = \
+ $(am_ags_copy_pattern_channel_test_OBJECTS)
+ags_copy_pattern_channel_test_DEPENDENCIES = libags_audio.la \
+ libags_server.la libags_thread.la libags.la libags_thread.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+ags_copy_pattern_channel_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(ags_copy_pattern_channel_test_CFLAGS) $(CFLAGS) \
+ $(ags_copy_pattern_channel_test_LDFLAGS) $(LDFLAGS) -o $@
am_ags_destroy_worker_test_OBJECTS = ags/test/thread/destroy_worker_test-ags_destroy_worker_test.$(OBJEXT)
ags_destroy_worker_test_OBJECTS = \
$(am_ags_destroy_worker_test_OBJECTS)
@@ -2837,6 +2863,8 @@ am__depfiles_remade = ags/$(DEPDIR)/gsequencer-gsequencer_main.Po \
ags/test/audio/recall/$(DEPDIR)/capture_wave_channel_test-ags_capture_wave_channel_test.Po \
ags/test/audio/recall/$(DEPDIR)/copy_audio_signal_test-ags_copy_audio_signal_test.Po \
ags/test/audio/recall/$(DEPDIR)/copy_channel_test-ags_copy_channel_test.Po \
+ ags/test/audio/recall/$(DEPDIR)/copy_pattern_audio_test-ags_copy_pattern_audio_test.Po \
+ ags/test/audio/recall/$(DEPDIR)/copy_pattern_channel_test-ags_copy_pattern_channel_test.Po \
ags/test/audio/recall/$(DEPDIR)/envelope_audio_signal_test-ags_envelope_audio_signal_test.Po \
ags/test/audio/recall/$(DEPDIR)/eq10_audio_signal_test-ags_eq10_audio_signal_test.Po \
ags/test/audio/recall/$(DEPDIR)/feed_audio_signal_test-ags_feed_audio_signal_test.Po \
@@ -2983,6 +3011,8 @@ SOURCES = $(libags_la_SOURCES) $(libags_audio_la_SOURCES) \
$(ags_config_test_SOURCES) $(ags_conversion_test_SOURCES) \
$(ags_copy_audio_signal_test_SOURCES) \
$(ags_copy_channel_test_SOURCES) \
+ $(ags_copy_pattern_audio_test_SOURCES) \
+ $(ags_copy_pattern_channel_test_SOURCES) \
$(ags_destroy_worker_test_SOURCES) $(ags_devin_test_SOURCES) \
$(ags_devout_test_SOURCES) $(ags_dssi_manager_test_SOURCES) \
$(ags_dssi_plugin_test_SOURCES) \
@@ -3076,6 +3106,8 @@ DIST_SOURCES = $(libags_la_SOURCES) $(libags_audio_la_SOURCES) \
$(ags_config_test_SOURCES) $(ags_conversion_test_SOURCES) \
$(ags_copy_audio_signal_test_SOURCES) \
$(ags_copy_channel_test_SOURCES) \
+ $(ags_copy_pattern_audio_test_SOURCES) \
+ $(ags_copy_pattern_channel_test_SOURCES) \
$(ags_destroy_worker_test_SOURCES) $(ags_devin_test_SOURCES) \
$(ags_devout_test_SOURCES) $(ags_dssi_manager_test_SOURCES) \
$(ags_dssi_plugin_test_SOURCES) \
@@ -4428,6 +4460,18 @@ ags_copy_channel_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(
ags_copy_channel_test_LDFLAGS = -pthread $(LDFLAGS)
ags_copy_channel_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS)
+# copy audio pattern unit test
+ags_copy_pattern_audio_test_SOURCES = ags/test/audio/recall/ags_copy_pattern_audio_test.c
+ags_copy_pattern_audio_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS)
+ags_copy_pattern_audio_test_LDFLAGS = -pthread $(LDFLAGS)
+ags_copy_pattern_audio_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS)
+
+# copy channel pattern unit test
+ags_copy_pattern_channel_test_SOURCES = ags/test/audio/recall/ags_copy_pattern_channel_test.c
+ags_copy_pattern_channel_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS)
+ags_copy_pattern_channel_test_LDFLAGS = -pthread $(LDFLAGS)
+ags_copy_pattern_channel_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS)
+
# envelope audio signal unit test
ags_envelope_audio_signal_test_SOURCES = ags/test/audio/recall/ags_envelope_audio_signal_test.c
ags_envelope_audio_signal_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS)
@@ -8346,6 +8390,20 @@ ags/test/audio/recall/copy_channel_test-ags_copy_channel_test.$(OBJEXT): \
ags_copy_channel_test$(EXEEXT): $(ags_copy_channel_test_OBJECTS) $(ags_copy_channel_test_DEPENDENCIES) $(EXTRA_ags_copy_channel_test_DEPENDENCIES)
@rm -f ags_copy_channel_test$(EXEEXT)
$(AM_V_CCLD)$(ags_copy_channel_test_LINK) $(ags_copy_channel_test_OBJECTS) $(ags_copy_channel_test_LDADD) $(LIBS)
+ags/test/audio/recall/copy_pattern_audio_test-ags_copy_pattern_audio_test.$(OBJEXT): \
+ ags/test/audio/recall/$(am__dirstamp) \
+ ags/test/audio/recall/$(DEPDIR)/$(am__dirstamp)
+
+ags_copy_pattern_audio_test$(EXEEXT): $(ags_copy_pattern_audio_test_OBJECTS) $(ags_copy_pattern_audio_test_DEPENDENCIES) $(EXTRA_ags_copy_pattern_audio_test_DEPENDENCIES)
+ @rm -f ags_copy_pattern_audio_test$(EXEEXT)
+ $(AM_V_CCLD)$(ags_copy_pattern_audio_test_LINK) $(ags_copy_pattern_audio_test_OBJECTS) $(ags_copy_pattern_audio_test_LDADD) $(LIBS)
+ags/test/audio/recall/copy_pattern_channel_test-ags_copy_pattern_channel_test.$(OBJEXT): \
+ ags/test/audio/recall/$(am__dirstamp) \
+ ags/test/audio/recall/$(DEPDIR)/$(am__dirstamp)
+
+ags_copy_pattern_channel_test$(EXEEXT): $(ags_copy_pattern_channel_test_OBJECTS) $(ags_copy_pattern_channel_test_DEPENDENCIES) $(EXTRA_ags_copy_pattern_channel_test_DEPENDENCIES)
+ @rm -f ags_copy_pattern_channel_test$(EXEEXT)
+ $(AM_V_CCLD)$(ags_copy_pattern_channel_test_LINK) $(ags_copy_pattern_channel_test_OBJECTS) $(ags_copy_pattern_channel_test_LDADD) $(LIBS)
ags/test/thread/destroy_worker_test-ags_destroy_worker_test.$(OBJEXT): \
ags/test/thread/$(am__dirstamp) \
ags/test/thread/$(DEPDIR)/$(am__dirstamp)
@@ -9677,6 +9735,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/recall/$(DEPDIR)/capture_wave_channel_test-ags_capture_wave_channel_test.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/recall/$(DEPDIR)/copy_audio_signal_test-ags_copy_audio_signal_test.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/recall/$(DEPDIR)/copy_channel_test-ags_copy_channel_test.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/recall/$(DEPDIR)/copy_pattern_audio_test-ags_copy_pattern_audio_test.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/recall/$(DEPDIR)/copy_pattern_channel_test-ags_copy_pattern_channel_test.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/recall/$(DEPDIR)/envelope_audio_signal_test-ags_envelope_audio_signal_test.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/recall/$(DEPDIR)/eq10_audio_signal_test-ags_eq10_audio_signal_test.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/recall/$(DEPDIR)/feed_audio_signal_test-ags_feed_audio_signal_test.Po@am__quote@ # am--include-marker
@@ -14403,6 +14463,34 @@ ags/test/audio/recall/copy_channel_test-ags_copy_channel_test.obj: ags/test/audi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_copy_channel_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/recall/copy_channel_test-ags_copy_channel_test.obj `if test -f 'ags/test/audio/recall/ags_copy_channel_test.c'; then $(CYGPATH_W) 'ags/test/audio/recall/ags_copy_channel_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/recall/ags_copy_channel_test.c'; fi`
+ags/test/audio/recall/copy_pattern_audio_test-ags_copy_pattern_audio_test.o: ags/test/audio/recall/ags_copy_pattern_audio_test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_copy_pattern_audio_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/recall/copy_pattern_audio_test-ags_copy_pattern_audio_test.o -MD -MP -MF ags/test/audio/recall/$(DEPDIR)/copy_pattern_audio_test-ags_copy_pattern_audio_test.Tpo -c -o ags/test/audio/recall/copy_pattern_audio_test-ags_copy_pattern_audio_test.o `test -f 'ags/test/audio/recall/ags_copy_pattern_audio_test.c' || echo '$(srcdir)/'`ags/test/audio/recall/ags_copy_pattern_audio_test.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/recall/$(DEPDIR)/copy_pattern_audio_test-ags_copy_pattern_audio_test.Tpo ags/test/audio/recall/$(DEPDIR)/copy_pattern_audio_test-ags_copy_pattern_audio_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/recall/ags_copy_pattern_audio_test.c' object='ags/test/audio/recall/copy_pattern_audio_test-ags_copy_pattern_audio_test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_copy_pattern_audio_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/recall/copy_pattern_audio_test-ags_copy_pattern_audio_test.o `test -f 'ags/test/audio/recall/ags_copy_pattern_audio_test.c' || echo '$(srcdir)/'`ags/test/audio/recall/ags_copy_pattern_audio_test.c
+
+ags/test/audio/recall/copy_pattern_audio_test-ags_copy_pattern_audio_test.obj: ags/test/audio/recall/ags_copy_pattern_audio_test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_copy_pattern_audio_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/recall/copy_pattern_audio_test-ags_copy_pattern_audio_test.obj -MD -MP -MF ags/test/audio/recall/$(DEPDIR)/copy_pattern_audio_test-ags_copy_pattern_audio_test.Tpo -c -o ags/test/audio/recall/copy_pattern_audio_test-ags_copy_pattern_audio_test.obj `if test -f 'ags/test/audio/recall/ags_copy_pattern_audio_test.c'; then $(CYGPATH_W) 'ags/test/audio/recall/ags_copy_pattern_audio_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/recall/ags_copy_pattern_audio_test.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/recall/$(DEPDIR)/copy_pattern_audio_test-ags_copy_pattern_audio_test.Tpo ags/test/audio/recall/$(DEPDIR)/copy_pattern_audio_test-ags_copy_pattern_audio_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/recall/ags_copy_pattern_audio_test.c' object='ags/test/audio/recall/copy_pattern_audio_test-ags_copy_pattern_audio_test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_copy_pattern_audio_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/recall/copy_pattern_audio_test-ags_copy_pattern_audio_test.obj `if test -f 'ags/test/audio/recall/ags_copy_pattern_audio_test.c'; then $(CYGPATH_W) 'ags/test/audio/recall/ags_copy_pattern_audio_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/recall/ags_copy_pattern_audio_test.c'; fi`
+
+ags/test/audio/recall/copy_pattern_channel_test-ags_copy_pattern_channel_test.o: ags/test/audio/recall/ags_copy_pattern_channel_test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_copy_pattern_channel_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/recall/copy_pattern_channel_test-ags_copy_pattern_channel_test.o -MD -MP -MF ags/test/audio/recall/$(DEPDIR)/copy_pattern_channel_test-ags_copy_pattern_channel_test.Tpo -c -o ags/test/audio/recall/copy_pattern_channel_test-ags_copy_pattern_channel_test.o `test -f 'ags/test/audio/recall/ags_copy_pattern_channel_test.c' || echo '$(srcdir)/'`ags/test/audio/recall/ags_copy_pattern_channel_test.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/recall/$(DEPDIR)/copy_pattern_channel_test-ags_copy_pattern_channel_test.Tpo ags/test/audio/recall/$(DEPDIR)/copy_pattern_channel_test-ags_copy_pattern_channel_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/recall/ags_copy_pattern_channel_test.c' object='ags/test/audio/recall/copy_pattern_channel_test-ags_copy_pattern_channel_test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_copy_pattern_channel_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/recall/copy_pattern_channel_test-ags_copy_pattern_channel_test.o `test -f 'ags/test/audio/recall/ags_copy_pattern_channel_test.c' || echo '$(srcdir)/'`ags/test/audio/recall/ags_copy_pattern_channel_test.c
+
+ags/test/audio/recall/copy_pattern_channel_test-ags_copy_pattern_channel_test.obj: ags/test/audio/recall/ags_copy_pattern_channel_test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_copy_pattern_channel_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/recall/copy_pattern_channel_test-ags_copy_pattern_channel_test.obj -MD -MP -MF ags/test/audio/recall/$(DEPDIR)/copy_pattern_channel_test-ags_copy_pattern_channel_test.Tpo -c -o ags/test/audio/recall/copy_pattern_channel_test-ags_copy_pattern_channel_test.obj `if test -f 'ags/test/audio/recall/ags_copy_pattern_channel_test.c'; then $(CYGPATH_W) 'ags/test/audio/recall/ags_copy_pattern_channel_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/recall/ags_copy_pattern_channel_test.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/recall/$(DEPDIR)/copy_pattern_channel_test-ags_copy_pattern_channel_test.Tpo ags/test/audio/recall/$(DEPDIR)/copy_pattern_channel_test-ags_copy_pattern_channel_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/recall/ags_copy_pattern_channel_test.c' object='ags/test/audio/recall/copy_pattern_channel_test-ags_copy_pattern_channel_test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_copy_pattern_channel_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/recall/copy_pattern_channel_test-ags_copy_pattern_channel_test.obj `if test -f 'ags/test/audio/recall/ags_copy_pattern_channel_test.c'; then $(CYGPATH_W) 'ags/test/audio/recall/ags_copy_pattern_channel_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/recall/ags_copy_pattern_channel_test.c'; fi`
+
ags/test/thread/destroy_worker_test-ags_destroy_worker_test.o: ags/test/thread/ags_destroy_worker_test.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_destroy_worker_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/destroy_worker_test-ags_destroy_worker_test.o -MD -MP -MF ags/test/thread/$(DEPDIR)/destroy_worker_test-ags_destroy_worker_test.Tpo -c -o ags/test/thread/destroy_worker_test-ags_destroy_worker_test.o `test -f 'ags/test/thread/ags_destroy_worker_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_destroy_worker_test.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/destroy_worker_test-ags_destroy_worker_test.Tpo ags/test/thread/$(DEPDIR)/destroy_worker_test-ags_destroy_worker_test.Po
@@ -16638,6 +16726,20 @@ ags_copy_channel_test.log: ags_copy_channel_test$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+ags_copy_pattern_audio_test.log: ags_copy_pattern_audio_test$(EXEEXT)
+ @p='ags_copy_pattern_audio_test$(EXEEXT)'; \
+ b='ags_copy_pattern_audio_test'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+ags_copy_pattern_channel_test.log: ags_copy_pattern_channel_test$(EXEEXT)
+ @p='ags_copy_pattern_channel_test$(EXEEXT)'; \
+ b='ags_copy_pattern_channel_test'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
ags_envelope_audio_signal_test.log: ags_envelope_audio_signal_test$(EXEEXT)
@p='ags_envelope_audio_signal_test$(EXEEXT)'; \
b='ags_envelope_audio_signal_test'; \
@@ -17762,6 +17864,8 @@ distclean: distclean-recursive
-rm -f ags/test/audio/recall/$(DEPDIR)/capture_wave_channel_test-ags_capture_wave_channel_test.Po
-rm -f ags/test/audio/recall/$(DEPDIR)/copy_audio_signal_test-ags_copy_audio_signal_test.Po
-rm -f ags/test/audio/recall/$(DEPDIR)/copy_channel_test-ags_copy_channel_test.Po
+ -rm -f ags/test/audio/recall/$(DEPDIR)/copy_pattern_audio_test-ags_copy_pattern_audio_test.Po
+ -rm -f ags/test/audio/recall/$(DEPDIR)/copy_pattern_channel_test-ags_copy_pattern_channel_test.Po
-rm -f ags/test/audio/recall/$(DEPDIR)/envelope_audio_signal_test-ags_envelope_audio_signal_test.Po
-rm -f ags/test/audio/recall/$(DEPDIR)/eq10_audio_signal_test-ags_eq10_audio_signal_test.Po
-rm -f ags/test/audio/recall/$(DEPDIR)/feed_audio_signal_test-ags_feed_audio_signal_test.Po
@@ -18526,6 +18630,8 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ags/test/audio/recall/$(DEPDIR)/capture_wave_channel_test-ags_capture_wave_channel_test.Po
-rm -f ags/test/audio/recall/$(DEPDIR)/copy_audio_signal_test-ags_copy_audio_signal_test.Po
-rm -f ags/test/audio/recall/$(DEPDIR)/copy_channel_test-ags_copy_channel_test.Po
+ -rm -f ags/test/audio/recall/$(DEPDIR)/copy_pattern_audio_test-ags_copy_pattern_audio_test.Po
+ -rm -f ags/test/audio/recall/$(DEPDIR)/copy_pattern_channel_test-ags_copy_pattern_channel_test.Po
-rm -f ags/test/audio/recall/$(DEPDIR)/envelope_audio_signal_test-ags_envelope_audio_signal_test.Po
-rm -f ags/test/audio/recall/$(DEPDIR)/eq10_audio_signal_test-ags_eq10_audio_signal_test.Po
-rm -f ags/test/audio/recall/$(DEPDIR)/feed_audio_signal_test-ags_feed_audio_signal_test.Po
diff --git a/ags/audio/recall/ags_copy_pattern_audio.c b/ags/audio/recall/ags_copy_pattern_audio.c
index 0df1ec2eb..8c24c7f13 100644
--- a/ags/audio/recall/ags_copy_pattern_audio.c
+++ b/ags/audio/recall/ags_copy_pattern_audio.c
@@ -545,13 +545,13 @@ ags_copy_pattern_audio_new(AgsAudio *audio,
/* apply bank index */
value = g_new0(GValue,
1);
- g_value_init(value, G_TYPE_UINT64);
+ g_value_init(value, G_TYPE_FLOAT);
g_object_get(copy_pattern_audio,
"bank-index-0" , &port,
NULL);
- g_value_set_uint64(value, bank_index_0);
+ g_value_set_float(value, bank_index_0);
ags_port_safe_write(port,
value);
@@ -559,7 +559,8 @@ ags_copy_pattern_audio_new(AgsAudio *audio,
"bank-index-1" , &port,
NULL);
- g_value_set_uint64(value, bank_index_1);
+ g_value_reset(value);
+ g_value_set_float(value, bank_index_1);
ags_port_safe_write(copy_pattern_audio->bank_index_1,
value);
diff --git a/ags/audio/recall/ags_copy_pattern_channel.c b/ags/audio/recall/ags_copy_pattern_channel.c
index bb429dcfe..9dc984f4c 100644
--- a/ags/audio/recall/ags_copy_pattern_channel.c
+++ b/ags/audio/recall/ags_copy_pattern_channel.c
@@ -345,7 +345,7 @@ ags_copy_pattern_channel_new(AgsChannel *destination,
copy_pattern_channel = (AgsCopyPatternChannel *) g_object_new(AGS_TYPE_COPY_PATTERN_CHANNEL,
"destination", destination,
- "channel", source,
+ "source", source,
NULL);
return(copy_pattern_channel);
diff --git a/ags/test/audio/recall/ags_copy_pattern_audio_test.c b/ags/test/audio/recall/ags_copy_pattern_audio_test.c
new file mode 100644
index 000000000..18f2dc6b1
--- /dev/null
+++ b/ags/test/audio/recall/ags_copy_pattern_audio_test.c
@@ -0,0 +1,174 @@
+/* GSequencer - Advanced GTK Sequencer
+ * Copyright (C) 2005-2018 Joël Krähemann
+ *
+ * This file is part of GSequencer.
+ *
+ * GSequencer is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GSequencer is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GSequencer. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <CUnit/CUnit.h>
+#include <CUnit/Automated.h>
+#include <CUnit/Basic.h>
+
+#include <ags/libags.h>
+#include <ags/libags-audio.h>
+
+#include <math.h>
+
+int ags_copy_pattern_audio_test_init_suite();
+int ags_copy_pattern_audio_test_clean_suite();
+
+void ags_copy_pattern_audio_test_port();
+
+AgsDevout *devout;
+AgsAudio *audio;
+
+extern AgsApplicationContext *ags_application_context;
+
+/* The suite initialization function.
+ * Opens the temporary file used by the tests.
+ * Returns zero on success, non-zero otherwise.
+ */
+int
+ags_copy_pattern_audio_test_init_suite()
+{
+ ags_application_context = ags_audio_application_context_new();
+
+ /* create soundcard */
+ devout = g_object_new(AGS_TYPE_DEVOUT,
+ NULL);
+ g_object_ref(devout);
+
+ /* create audio */
+ audio = ags_audio_new(devout);
+ g_object_ref(audio);
+
+ ags_audio_set_flags(audio,
+ (AGS_AUDIO_OUTPUT_HAS_RECYCLING |
+ AGS_AUDIO_INPUT_HAS_RECYCLING));
+ ags_audio_set_ability_flags(audio,
+ AGS_SOUND_ABILITY_PLAYBACK);
+
+ /* create input/output */
+ ags_audio_set_audio_channels(audio,
+ 1, 0);
+
+ ags_audio_set_pads(audio,
+ AGS_TYPE_OUTPUT,
+ 1, 0);
+ ags_audio_set_pads(audio,
+ AGS_TYPE_INPUT,
+ 1, 0);
+
+ ags_audio_set_ability_flags(audio->output,
+ AGS_SOUND_ABILITY_PLAYBACK);
+
+ ags_audio_set_ability_flags(audio->input,
+ AGS_SOUND_ABILITY_PLAYBACK);
+
+ ags_connectable_connect(AGS_CONNECTABLE(audio));
+
+ ags_connectable_connect(AGS_CONNECTABLE(audio->output));
+ ags_connectable_connect(AGS_CONNECTABLE(audio->input));
+
+ return(0);
+}
+
+/* The suite cleanup function.
+ * Closes the temporary file used by the tests.
+ * Returns zero on success, non-zero otherwise.
+ */
+int
+ags_copy_pattern_audio_test_clean_suite()
+{
+ g_object_run_dispose(devout);
+ g_object_unref(devout);
+
+ g_object_run_dispose(audio);
+ g_object_unref(audio);
+
+ return(0);
+}
+
+void
+ags_copy_pattern_audio_test_port()
+{
+ AgsCopyPatternAudio *copy_pattern_audio;
+ AgsPort *port;
+
+ copy_pattern_audio = ags_copy_pattern_audio_new(audio,
+ 0,
+ 0);
+
+ CU_ASSERT(copy_pattern_audio != NULL);
+ CU_ASSERT(AGS_IS_COPY_PATTERN_AUDIO(copy_pattern_audio));
+
+ /* test ports */
+ port = NULL;
+ g_object_get(copy_pattern_audio,
+ "bank-index-0", &port,
+ NULL);
+
+ CU_ASSERT(port != NULL);
+ CU_ASSERT(AGS_IS_PORT(port));
+
+ port = NULL;
+ g_object_get(copy_pattern_audio,
+ "bank-index-1", &port,
+ NULL);
+
+ CU_ASSERT(port != NULL);
+ CU_ASSERT(AGS_IS_PORT(port));
+}
+
+int
+main(int argc, char **argv)
+{
+ CU_pSuite pSuite = NULL;
+
+ putenv("LC_ALL=C");
+ putenv("LANG=C");
+
+ /* initialize the CUnit test registry */
+ if(CUE_SUCCESS != CU_initialize_registry()){
+ return CU_get_error();
+ }
+
+ /* add a suite to the registry */
+ pSuite = CU_add_suite("AgsCopyPatternAudioTest", ags_copy_pattern_audio_test_init_suite, ags_copy_pattern_audio_test_clean_suite);
+
+ if(pSuite == NULL){
+ CU_cleanup_registry();
+
+ return CU_get_error();
+ }
+
+ /* add the tests to the suite */
+ if((CU_add_test(pSuite, "test of AgsCopyPatternAudio port", ags_copy_pattern_audio_test_port) == NULL)){
+ CU_cleanup_registry();
+
+ return CU_get_error();
+ }
+
+ /* Run all tests using the CUnit Basic interface */
+ CU_basic_set_mode(CU_BRM_VERBOSE);
+ CU_basic_run_tests();
+
+ CU_cleanup_registry();
+
+ return(CU_get_error());
+}
diff --git a/ags/test/audio/recall/ags_copy_pattern_channel_test.c b/ags/test/audio/recall/ags_copy_pattern_channel_test.c
new file mode 100644
index 000000000..0c7f9d971
--- /dev/null
+++ b/ags/test/audio/recall/ags_copy_pattern_channel_test.c
@@ -0,0 +1,165 @@
+/* GSequencer - Advanced GTK Sequencer
+ * Copyright (C) 2005-2018 Joël Krähemann
+ *
+ * This file is part of GSequencer.
+ *
+ * GSequencer is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GSequencer is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GSequencer. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <CUnit/CUnit.h>
+#include <CUnit/Automated.h>
+#include <CUnit/Basic.h>
+
+#include <ags/libags.h>
+#include <ags/libags-audio.h>
+
+#include <math.h>
+
+int ags_copy_pattern_channel_test_init_suite();
+int ags_copy_pattern_channel_test_clean_suite();
+
+void ags_copy_pattern_channel_test_port();
+
+AgsDevout *devout;
+AgsAudio *audio;
+
+extern AgsApplicationContext *ags_application_context;
+
+/* The suite initialization function.
+ * Opens the temporary file used by the tests.
+ * Returns zero on success, non-zero otherwise.
+ */
+int
+ags_copy_pattern_channel_test_init_suite()
+{
+ ags_application_context = ags_audio_application_context_new();
+
+ /* create soundcard */
+ devout = g_object_new(AGS_TYPE_DEVOUT,
+ NULL);
+ g_object_ref(devout);
+
+ /* create audio */
+ audio = ags_audio_new(devout);
+ g_object_ref(audio);
+
+ ags_audio_set_flags(audio,
+ (AGS_AUDIO_OUTPUT_HAS_RECYCLING |
+ AGS_AUDIO_INPUT_HAS_RECYCLING));
+ ags_audio_set_ability_flags(audio,
+ AGS_SOUND_ABILITY_PLAYBACK);
+
+ /* create input/output */
+ ags_audio_set_audio_channels(audio,
+ 1, 0);
+
+ ags_audio_set_pads(audio,
+ AGS_TYPE_OUTPUT,
+ 1, 0);
+ ags_audio_set_pads(audio,
+ AGS_TYPE_INPUT,
+ 1, 0);
+
+ ags_channel_set_ability_flags(audio->output,
+ AGS_SOUND_ABILITY_PLAYBACK);
+
+ ags_channel_set_ability_flags(audio->input,
+ AGS_SOUND_ABILITY_PLAYBACK);
+
+ ags_connectable_connect(AGS_CONNECTABLE(audio));
+
+ ags_connectable_connect(AGS_CONNECTABLE(audio->output));
+ ags_connectable_connect(AGS_CONNECTABLE(audio->input));
+
+ return(0);
+}
+
+/* The suite cleanup function.
+ * Closes the temporary file used by the tests.
+ * Returns zero on success, non-zero otherwise.
+ */
+int
+ags_copy_pattern_channel_test_clean_suite()
+{
+ g_object_run_dispose(devout);
+ g_object_unref(devout);
+
+ g_object_run_dispose(audio);
+ g_object_unref(audio);
+
+ return(0);
+}
+
+void
+ags_copy_pattern_channel_test_port()
+{
+ AgsCopyPatternChannel *copy_pattern_channel;
+ AgsPort *port;
+
+ copy_pattern_channel = ags_copy_pattern_channel_new(NULL,
+ audio->input);
+
+ CU_ASSERT(copy_pattern_channel != NULL);
+ CU_ASSERT(AGS_IS_COPY_PATTERN_CHANNEL(copy_pattern_channel));
+
+ /* test ports */
+ port = NULL;
+ g_object_get(copy_pattern_channel,
+ "pattern", &port,
+ NULL);
+
+ CU_ASSERT(port != NULL);
+ CU_ASSERT(AGS_IS_PORT(port));
+}
+
+int
+main(int argc, char **argv)
+{
+ CU_pSuite pSuite = NULL;
+
+ putenv("LC_ALL=C");
+ putenv("LANG=C");
+
+ /* initialize the CUnit test registry */
+ if(CUE_SUCCESS != CU_initialize_registry()){
+ return CU_get_error();
+ }
+
+ /* add a suite to the registry */
+ pSuite = CU_add_suite("AgsCopyPatternChannelTest", ags_copy_pattern_channel_test_init_suite, ags_copy_pattern_channel_test_clean_suite);
+
+ if(pSuite == NULL){
+ CU_cleanup_registry();
+
+ return CU_get_error();
+ }
+
+ /* add the tests to the suite */
+ if((CU_add_test(pSuite, "test of AgsCopyPatternChannel port", ags_copy_pattern_channel_test_port) == NULL)){
+ CU_cleanup_registry();
+
+ return CU_get_error();
+ }
+
+ /* Run all tests using the CUnit Basic interface */
+ CU_basic_set_mode(CU_BRM_VERBOSE);
+ CU_basic_run_tests();
+
+ CU_cleanup_registry();
+
+ return(CU_get_error());
+}
diff --git a/unit-tests.mk b/unit-tests.mk
index 874463ea3..59cb98689 100644
--- a/unit-tests.mk
+++ b/unit-tests.mk
@@ -100,6 +100,8 @@ check_PROGRAMS += \
ags_capture_wave_channel_test \
ags_copy_audio_signal_test \
ags_copy_channel_test \
+ ags_copy_pattern_audio_test \
+ ags_copy_pattern_channel_test \
ags_envelope_audio_signal_test \
ags_eq10_audio_signal_test \
ags_feed_audio_signal_test \
@@ -630,6 +632,18 @@ ags_copy_channel_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(
ags_copy_channel_test_LDFLAGS = -pthread $(LDFLAGS)
ags_copy_channel_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS)
+# copy audio pattern unit test
+ags_copy_pattern_audio_test_SOURCES = ags/test/audio/recall/ags_copy_pattern_audio_test.c
+ags_copy_pattern_audio_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS)
+ags_copy_pattern_audio_test_LDFLAGS = -pthread $(LDFLAGS)
+ags_copy_pattern_audio_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS)
+
+# copy channel pattern unit test
+ags_copy_pattern_channel_test_SOURCES = ags/test/audio/recall/ags_copy_pattern_channel_test.c
+ags_copy_pattern_channel_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS)
+ags_copy_pattern_channel_test_LDFLAGS = -pthread $(LDFLAGS)
+ags_copy_pattern_channel_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS)
+
# envelope audio signal unit test
ags_envelope_audio_signal_test_SOURCES = ags/test/audio/recall/ags_envelope_audio_signal_test.c
ags_envelope_audio_signal_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS)