output/wav: Initial module skeleton.
This commit is contained in:
parent
49224c2853
commit
afaa75b98c
|
@ -59,6 +59,7 @@ libsigrok_la_SOURCES += \
|
||||||
src/output/binary.c \
|
src/output/binary.c \
|
||||||
src/output/csv.c \
|
src/output/csv.c \
|
||||||
src/output/chronovu_la8.c \
|
src/output/chronovu_la8.c \
|
||||||
|
src/output/wav.c \
|
||||||
src/output/gnuplot.c \
|
src/output/gnuplot.c \
|
||||||
src/output/hex.c \
|
src/output/hex.c \
|
||||||
src/output/ols.c \
|
src/output/ols.c \
|
||||||
|
|
|
@ -60,6 +60,7 @@ extern SR_PRIV struct sr_output_module output_gnuplot;
|
||||||
extern SR_PRIV struct sr_output_module output_chronovu_la8;
|
extern SR_PRIV struct sr_output_module output_chronovu_la8;
|
||||||
extern SR_PRIV struct sr_output_module output_csv;
|
extern SR_PRIV struct sr_output_module output_csv;
|
||||||
extern SR_PRIV struct sr_output_module output_analog;
|
extern SR_PRIV struct sr_output_module output_analog;
|
||||||
|
extern SR_PRIV struct sr_output_module output_wav;
|
||||||
/* @endcond */
|
/* @endcond */
|
||||||
|
|
||||||
static const struct sr_output_module *output_module_list[] = {
|
static const struct sr_output_module *output_module_list[] = {
|
||||||
|
@ -73,6 +74,7 @@ static const struct sr_output_module *output_module_list[] = {
|
||||||
&output_vcd,
|
&output_vcd,
|
||||||
&output_chronovu_la8,
|
&output_chronovu_la8,
|
||||||
&output_analog,
|
&output_analog,
|
||||||
|
&output_wav,
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
/*
|
||||||
|
* This file is part of the libsigrok project.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2014 Bert Vermeulen <bert@biot.com>
|
||||||
|
*
|
||||||
|
* This program 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.
|
||||||
|
*
|
||||||
|
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "libsigrok.h"
|
||||||
|
#include "libsigrok-internal.h"
|
||||||
|
|
||||||
|
#define LOG_PREFIX "output/wav"
|
||||||
|
|
||||||
|
static int init(struct sr_output *o, GHashTable *options)
|
||||||
|
{
|
||||||
|
(void)o;
|
||||||
|
(void)options;
|
||||||
|
|
||||||
|
return SR_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int receive(const struct sr_output *o, const struct sr_datafeed_packet *packet,
|
||||||
|
GString **out)
|
||||||
|
{
|
||||||
|
(void)o;
|
||||||
|
(void)packet;
|
||||||
|
(void)out;
|
||||||
|
|
||||||
|
return SR_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int cleanup(struct sr_output *o)
|
||||||
|
{
|
||||||
|
(void)o;
|
||||||
|
|
||||||
|
return SR_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
SR_PRIV struct sr_output_module output_wav = {
|
||||||
|
.id = "wav",
|
||||||
|
.name = "WAV",
|
||||||
|
.desc = "WAVE PCM sound module",
|
||||||
|
.init = init,
|
||||||
|
.receive = receive,
|
||||||
|
.cleanup = cleanup,
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue