From c7fbd98dc9c102c6e329e356dce5f1df5d7be2ae Mon Sep 17 00:00:00 2001 From: Silvano Seva Date: Sun, 3 Apr 2022 18:17:09 +0200 Subject: [PATCH] Stub implementatio of output stream driver for GDx devices --- meson.build | 3 +- platform/drivers/audio/outputStream_GDx.c | 63 +++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 platform/drivers/audio/outputStream_GDx.c diff --git a/meson.build b/meson.build index acb9cd58..dcc1d29e 100644 --- a/meson.build +++ b/meson.build @@ -163,7 +163,8 @@ gdx_src = ['openrtx/src/core/xmodem.c', 'platform/drivers/display/UC1701_GDx.c', 'platform/drivers/keyboard/keyboard_GDx.c', 'platform/drivers/audio/audio_GDx.c', - 'platform/drivers/audio/inputStream_GDx.c'] + 'platform/drivers/audio/inputStream_GDx.c', + 'platform/drivers/audio/outputStream_GDx.c'] ## ## --------------------- MCU-dependent source files ---------------------------- diff --git a/platform/drivers/audio/outputStream_GDx.c b/platform/drivers/audio/outputStream_GDx.c new file mode 100644 index 00000000..2cc3c996 --- /dev/null +++ b/platform/drivers/audio/outputStream_GDx.c @@ -0,0 +1,63 @@ +/*************************************************************************** + * Copyright (C) 2021 - 2022 by Federico Amedeo Izzo IU2NUO, * + * Niccolò Izzo IU2KIN * + * Frederik Saraci IU2NRO * + * Silvano Seva IU2KWO * + * * + * 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 * + ***************************************************************************/ + +#include + +streamId outputStream_start(const enum AudioSink destination, + const enum AudioPriority prio, + stream_sample_t * const buf, + const size_t length, + const enum BufMode mode, + const uint32_t sampleRate) +{ + (void) destination; + (void) prio; + (void) buf; + (void) length; + (void) mode; + (void) sampleRate; + + return -1; +} + +stream_sample_t *outputStream_getIdleBuffer(const streamId id) +{ + (void) id; + + return NULL; +} + +bool outputStream_sync(const streamId id, const bool bufChanged) +{ + (void) id; + (void) bufChanged; + + return false; +} + +void outputStream_stop(const streamId id) +{ + (void) id; +} + +void outputStream_terminate(const streamId id) +{ + (void) id; +}