ref: 93161739a1130209af623dae66943e1c5c95f183
parent: 541eafb43dafe0cb4808de402a04e91dd59f0093
author: Paul Brossier <piem@piem.org>
date: Thu Jul 12 21:23:39 EDT 2012
added boilerplate for media source and sink
--- /dev/null
+++ b/src/io/sink.c
@@ -1,0 +1,41 @@
+/*
+ Copyright (C) 2012 Paul Brossier <piem@aubio.org>
+
+ This file is part of aubio.
+
+ aubio 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.
+
+ aubio 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 aubio. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#include "config.h"
+#include "aubio_priv.h"
+#include "fvec.h"
+#include "io/sink.h"
+
+struct _aubio_sink_t {
+ uint_t hopsize;
+ uint_t samplerate;
+};
+
+aubio_sink_t * new_aubio_sink(char_t * uri, uint_t hop_size, uint_t samplerate) {
+ return NULL;
+}
+
+uint_t aubio_sink_do(aubio_sink_t * s, fvec_t * write_data) {
+ return 0;
+}
+
+void del_aubio_sink(aubio_sink_t * s) {
+ return;
+}
--- /dev/null
+++ b/src/io/sink.h
@@ -1,0 +1,43 @@
+/*
+ Copyright (C) 2012 Paul Brossier <piem@aubio.org>
+
+ This file is part of aubio.
+
+ aubio 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.
+
+ aubio 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 aubio. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef _AUBIO_SINK_H
+#define _AUBIO_SINK_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** \file
+
+ Media sink
+
+*/
+
+typedef struct _aubio_sink_t aubio_sink_t;
+aubio_sink_t * new_aubio_sink(char_t * uri, uint_t hop_size, uint_t samplerate);
+uint_t aubio_sink_do(aubio_sink_t * s, fvec_t * write_data);
+void del_aubio_sink(aubio_sink_t * s);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _AUBIO_SINK_H */
--- /dev/null
+++ b/src/io/source.c
@@ -1,0 +1,42 @@
+/*
+ Copyright (C) 2012 Paul Brossier <piem@aubio.org>
+
+ This file is part of aubio.
+
+ aubio 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.
+
+ aubio 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 aubio. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#include "config.h"
+#include "aubio_priv.h"
+#include "fvec.h"
+#include "io/source.h"
+
+struct _aubio_source_t {
+ uint_t hopsize;
+ uint_t samplerate;
+};
+
+aubio_source_t * new_aubio_source(char_t * uri, uint_t hop_size, uint_t samplerate) {
+ return NULL;
+}
+
+fvec_t * aubio_source_do(aubio_source_t * s, fvec_t * write_data) {
+ return NULL;
+}
+
+void del_aubio_source(aubio_source_t * s) {
+ return;
+}
+
--- /dev/null
+++ b/src/io/source.h
@@ -1,0 +1,43 @@
+/*
+ Copyright (C) 2012 Paul Brossier <piem@aubio.org>
+
+ This file is part of aubio.
+
+ aubio 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.
+
+ aubio 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 aubio. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef _AUBIO_SOURCE_H
+#define _AUBIO_SOURCE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** \file
+
+ Media source
+
+*/
+
+typedef struct _aubio_source_t aubio_source_t;
+aubio_source_t * new_aubio_source(char_t * uri, uint_t hop_size, uint_t samplerate);
+fvec_t * aubio_source_do(aubio_source_t * s);
+void del_aubio_source(aubio_source_t * s);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _AUBIO_SOURCE_H */