From: Paul Brossier Date: Fri, 13 Jul 2012 07:23:39 +0000 (-0600) Subject: added boilerplate for media source and sink X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=93161739a1130209af623dae66943e1c5c95f183;p=aubio.git added boilerplate for media source and sink --- diff --git a/src/io/sink.c b/src/io/sink.c new file mode 100644 index 00000000..ddc5ca9f --- /dev/null +++ b/src/io/sink.c @@ -0,0 +1,41 @@ +/* + Copyright (C) 2012 Paul Brossier + + 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 . + +*/ + +#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; +} diff --git a/src/io/sink.h b/src/io/sink.h new file mode 100644 index 00000000..7449a9f9 --- /dev/null +++ b/src/io/sink.h @@ -0,0 +1,43 @@ +/* + Copyright (C) 2012 Paul Brossier + + 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 . + +*/ + +#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 */ diff --git a/src/io/source.c b/src/io/source.c new file mode 100644 index 00000000..9f0a40ea --- /dev/null +++ b/src/io/source.c @@ -0,0 +1,42 @@ +/* + Copyright (C) 2012 Paul Brossier + + 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 . + +*/ + +#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; +} + diff --git a/src/io/source.h b/src/io/source.h new file mode 100644 index 00000000..16cc839d --- /dev/null +++ b/src/io/source.h @@ -0,0 +1,43 @@ +/* + Copyright (C) 2012 Paul Brossier + + 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 . + +*/ + +#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 */