Copyright (C) Kevin Larke 2009-2020

This file is part of libcm.

libcm 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.

libcm 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.

See the GNU General Public License distributed with the libcm package or look here: .


cmAudDspLocal : Implementation of the audio DSP interface for local, in-memory, communication.

This class instantiates an audio-DSP engine (cmAudDsp), an interface for communicating with it (cmAudDspIF), and message delivery functions for copying messages in both directions between cmAuDsp and cmAudDspIF.

Note that the underlying inteface which allows an application to control, and receive message from, cmAudDsp is provided by cmAudDspIF - which this class provides a handle to.



enum
{
  kOkAdlRC = cmOkRC,
  kAudDspIfFailAdlRC,
  kAudDspFailAdlRC,
  kFileSysFailAdlRC,
  kJsonFailAdlRC
};

typedef cmRC_t cmAdlRC_t;
typedef cmHandle_t cmAdlH_t;

extern cmAdlH_t cmAdlNullHandle;

cmAdlRC_t cmAudDspLocalAllocate( 
cmCtx_t*                ctx, 
cmAdlH_t*               hp, 
const cmAdIfDispatch_t* recd );

cmAdlRC_t cmAudDspLocalFree( cmAdlH_t* hp );

cmAdlRC_t cmAudDspLocalSendSetup( cmAdlH_t h );

bool      cmAudDspLocalIsValid( cmAdlH_t h );

cmAiH_t   cmAudDspLocalIF_Handle( cmAdlH_t h );