diff options
author | Christian Glöckner <cgloeckner@freenet.de> | 2016-01-25 13:26:14 +0100 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2016-02-09 09:03:16 +0100 |
commit | 65a1f98c1bbb1837222e2eca4a457e66cf867b6e (patch) | |
tree | 891f2f4e50afef883588e2ab9c31db850dc93cbd /drumgizmo/input/test | |
parent | c970d83d7394e73f4bdff9c69a186ec91ac5f9de (diff) |
Removed outdated files
Diffstat (limited to 'drumgizmo/input/test')
-rw-r--r-- | drumgizmo/input/test/Makefile.am | 29 | ||||
-rw-r--r-- | drumgizmo/input/test/test.cc | 173 |
2 files changed, 0 insertions, 202 deletions
diff --git a/drumgizmo/input/test/Makefile.am b/drumgizmo/input/test/Makefile.am deleted file mode 100644 index 35466ab..0000000 --- a/drumgizmo/input/test/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ - -testsources = \ - test.cc - -if HAVE_INPUT_TEST - -testltlibs = test.la -testbuildsources = $(testsources) - -else - -testltlibs = -testbuildsources = - -endif - -EXTRA_DIST = $(testsources) - -lib_LTLIBRARIES = $(testltlibs) - -libdir = $(INPUT_PLUGIN_DIR) - -AM_CPPFLAGS = -I$(top_srcdir)/include -test_la_LDFLAGS = -module -avoid-version -shared -test_la_LIBADD = -test_la_SOURCES = $(testbuildsources) - -install-exec-hook: - rm -f $(DESTDIR)$(libdir)/test.la diff --git a/drumgizmo/input/test/test.cc b/drumgizmo/input/test/test.cc deleted file mode 100644 index b7b4a7d..0000000 --- a/drumgizmo/input/test/test.cc +++ /dev/null @@ -1,173 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/*************************************************************************** - * audioinputenginedummy.cc - * - * Sat Apr 30 21:11:54 CEST 2011 - * Copyright 2011 Bent Bisballe Nyeng - * deva@aasimon.org - ****************************************************************************/ - -/* - * This file is part of DrumGizmo. - * - * DrumGizmo 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 2 of the License, or - * (at your option) any later version. - * - * DrumGizmo 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 DrumGizmo; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ -#include <stdlib.h> - -#include <event.h> -#include <string> - -class Test { -public: - Test() { p = 0.1; instr = -1; len = -1; } - ~Test() {} - - bool init(int instruments, char *inames[]); - - void setParm(std::string parm, std::string value); - - bool start(); - void stop(); - - void pre(); - event_t *run(size_t pos, size_t len, size_t *nevents); - void post(); - -private: - float p; - int instr; - int len; -}; - -bool Test::init(int instruments, char *inames[]) -{ - return true; -} - -void Test::setParm(std::string parm, std::string value) -{ - if(parm == "p") p = atof(value.c_str()); - if(parm == "instr") instr = atoi(value.c_str()); - if(parm == "len") len = atoi(value.c_str()); -} - -bool Test::start() -{ - return true; -} - -void Test::stop() -{ -} - -void Test::pre() -{ -} - -event_t *Test::run(size_t pos, size_t nsamples, size_t *nevents) -{ - if((float)rand() / (float)RAND_MAX > p) { - *nevents = 0; - return NULL; - } - - *nevents = 1; - event_t *evs = (event_t *)malloc(sizeof(event_t)); - evs[0].type = TYPE_ONSET; - if(len != -1 && (int)pos > len * 44100) evs[0].type = TYPE_STOP; - - if(instr != -1) evs[0].instrument = instr; - else evs[0].instrument = rand() % 32; - - evs[0].velocity = (float)rand()/(float)RAND_MAX; - evs[0].offset = nsamples?rand()%nsamples:0; - return evs; -} - -void Test::post() -{ -} - -extern "C" { - void *create() - { - return new Test(); - } - - void destroy(void *h) - { - Test *test = (Test*)h; - delete test; - } - - bool init(void *h, int i, char *inames[]) - { - Test *test = (Test*)h; - return test->init(i, inames); - } - - void setparm(void *h, const char *parm, const char *value) - { - Test *test = (Test*)h; - test->setParm(parm, value); - } - - bool start(void *h) - { - Test *test = (Test*)h; - return test->start(); - } - - void stop(void *h) - { - Test *test = (Test*)h; - test->stop(); - } - - void pre(void *h) - { - Test *test = (Test*)h; - test->pre(); - } - - event_t *run(void *h, size_t pos, size_t len, size_t *nev) - { - Test *test = (Test*)h; - return test->run(pos, len, nev); - } - - void post(void *h) - { - Test *test = (Test*)h; - test->post(); - } -} - -#ifdef TEST_AUDIOINPUTENGINETEST -//Additional dependency files -//deps: -//Required cflags (autoconf vars may be used) -//cflags: -//Required link options (autoconf vars may be used) -//libs: -#include "test.h" - -TEST_BEGIN; - -// TODO: Put some testcode here (see test.h for usable macros). - -TEST_END; - -#endif/*TEST_AUDIOINPUTENGINETEST*/ |