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


cmAudioPortFile : This is an audio device driver for cmAudioPort which supports reading and writing audio files as though they are real-time devices.

cmApRC_t      cmApFileAllocate( cmRpt_t* rpt );
cmApRC_t      cmApFileFree();

cmApRC_t      cmApFileInitialize( cmRpt_t* rpt, unsigned baseApDevIdx );
cmApRC_t      cmApFileFinalize();
bool          cmApFileIsValid();

unsigned      cmApFileDeviceCreate( 
const cmChar_t* devLabel,
const cmChar_t* iFn,
const cmChar_t* oFn,
unsigned        oBits,
unsigned        oChCnt );

cmApRC_t      cmApFileDeviceDestroy( unsigned devIdx ); 

unsigned      cmApFileDeviceCount();
const char*   cmApFileDeviceLabel(          unsigned devIdx );
unsigned      cmApFileDeviceChannelCount(   unsigned devIdx, bool inputFl );
double        cmApFileDeviceSampleRate(     unsigned devIdx );
unsigned      cmApFileDeviceFramesPerCycle( unsigned devIdx, bool inputFl );

cmApRC_t      cmApFileDeviceSetup(          
unsigned          devIdx, 
double            srate, 
unsigned          framesPerCycle, 
cmApCallbackPtr_t callbackPtr,
void*             userCbPtr );


cmApRC_t      cmApFileDeviceStart( unsigned devIdx );
cmApRC_t      cmApFileDeviceStop(  unsigned devIdx );
bool          cmApFileDeviceIsStarted( unsigned devIdx );
void          cmApFileReport( cmRpt_t* rpt );
void          cmApFileTest( cmRpt_t* rpt );