From 553c8901a58b99de9eb78a36fb205721856fd336 Mon Sep 17 00:00:00 2001 From: Ben Wiley Date: Fri, 13 Oct 2023 17:41:44 -0400 Subject: [PATCH] Add function SyroVolcaSample_GetCurData() --- syro/korg_syro_volcasample.c | 14 ++++++++++++++ syro/korg_syro_volcasample.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/syro/korg_syro_volcasample.c b/syro/korg_syro_volcasample.c index c312afb..8c4836f 100644 --- a/syro/korg_syro_volcasample.c +++ b/syro/korg_syro_volcasample.c @@ -789,3 +789,17 @@ SyroStatus SyroVolcaSample_End(SyroHandle Handle) return Status_Success; } +/*====================================================================== + Syro Get Current Data Index + ======================================================================*/ +uint32_t SyroVolcaSample_GetCurData(SyroHandle Handle) +{ + SyroManage *psm; + + psm = (SyroManage *)Handle; + if (psm->Header != SYRO_MANAGE_HEADER) { + return Status_InvalidHandle; + } + + return (uint32_t)psm->CurData; +} diff --git a/syro/korg_syro_volcasample.h b/syro/korg_syro_volcasample.h index 461f735..1f23400 100644 --- a/syro/korg_syro_volcasample.h +++ b/syro/korg_syro_volcasample.h @@ -71,6 +71,8 @@ SyroStatus SyroVolcaSample_GetSample(SyroHandle Handle, int16_t *pLeft, int16_t SyroStatus SyroVolcaSample_End(SyroHandle Handle); +uint32_t SyroVolcaSample_GetCurData(SyroHandle Handle); + #ifdef __cplusplus } #endif