1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: oct6100_playout_buf_pub.h
Copyright (c) 2001-2007 Octasic Inc.
Description:
File containing all defines, macros, and structures pertaining to the file
oct6100_playout_buf.c. All elements defined in this file are for public
usage of the API. All private elements are defined in the
oct6100_playout_buf_priv.h file.
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API 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 2 of the License, or (at your option) any later version.
The OCT6100 GPL API 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 the OCT6100 GPL API; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
$Octasic_Release: OCT612xAPI-01.00-PR49 $
$Octasic_Revision: 21 $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __OCT6100_PLAYOUT_BUF_PUB_H__
#define __OCT6100_PLAYOUT_BUF_PUB_H__
/***************************** INCLUDE FILES *******************************/
/***************************** DEFINES *************************************/
/***************************** TYPES ***************************************/
typedef struct _OCT6100_BUFFER_LOAD_
{
PUINT32 pulBufferIndex; /* Index identifying the buffer. */
PUINT32 pulPlayoutFreeMemSize; /* Amount of free memory available for other buffers. */
PUINT8 pbyBufferPattern; /* A byte pointer pointing to a valid buffer to be loaded into the chip's external memory. */
UINT32 ulBufferSize; /* Size of the buffer loaded into external memory. */
UINT32 ulBufferPcmLaw; /* Buffer PCM law. */
} tOCT6100_BUFFER_LOAD, *tPOCT6100_BUFFER_LOAD;
typedef struct _OCT6100_BUFFER_LOAD_BLOCK_INIT_
{
PUINT32 pulBufferIndex; /* Index identifying the buffer. */
PUINT32 pulPlayoutFreeMemSize; /* Amount of free memory available for other buffers. */
UINT32 ulBufferSize; /* Size of the buffer to be loaded in memory. This space will be reserved. */
UINT32 ulBufferPcmLaw; /* Buffer PCM law. */
} tOCT6100_BUFFER_LOAD_BLOCK_INIT, *tPOCT6100_BUFFER_LOAD_BLOCK_INIT;
typedef struct _OCT6100_BUFFER_LOAD_BLOCK_
{
UINT32 ulBufferIndex; /* Index identifying the buffer. */
/* Offset, in bytes, of the first byte in the block to be loaded. */
/* This offset is with respect to the beginning of the buffer. */
/* This value must be modulo 2 */
UINT32 ulBlockOffset;
/* Size of the block to be loaded into external memory. */
/* This value must be modulo 2. */
UINT32 ulBlockLength;
/* A pointer pointing to a valid buffer block to be loaded */
/* into the chip's external memory. This is a pointer to the entire */
/* buffer. The API uses the ulBlockOffset and ulBlockLength to index */
/* within this buffer and obtain the block to be loaded. */
PUINT8 pbyBufferPattern;
} tOCT6100_BUFFER_LOAD_BLOCK, *tPOCT6100_BUFFER_LOAD_BLOCK;
typedef struct _OCT6100_BUFFER_UNLOAD_
{
UINT32 ulBufferIndex; /* Index identifying the buffer. */
} tOCT6100_BUFFER_UNLOAD, *tPOCT6100_BUFFER_UNLOAD;
typedef struct _OCT6100_BUFFER_PLAYOUT_ADD_
{
UINT32 ulChannelHndl; /* Echo cancelling channel on which to play the buffer. */
UINT32 ulBufferIndex; /* Index identifying the buffer. */
UINT32 ulPlayoutPort; /* Selected channel port where to play to tone. */
UINT32 ulMixingMode; /* Weither or not the voice stream will be muted while playing the buffer. */
INT32 lGainDb; /* Gain applied to the buffer that will be played on the specified port. */
BOOL fRepeat; /* Use ulRepeatCount variable. */
UINT32 ulRepeatCount; /* Number of times to repeat playing the selected buffer. */
UINT32 ulDuration; /* Duration in millisecond that this buffer should play. Setting this overrides fRepeat. */
UINT32 ulBufferLength; /* Length of the buffer to play (starting at the beginning), AUTO_SELECT for all. */
} tOCT6100_BUFFER_PLAYOUT_ADD, *tPOCT6100_BUFFER_PLAYOUT_ADD;
typedef struct _OCT6100_BUFFER_PLAYOUT_START_
{
UINT32 ulChannelHndl; /* Echo cancelling channel on which to play the buffer. */
UINT32 ulPlayoutPort; /* Selected channel port where to play to tone. */
BOOL fNotifyOnPlayoutStop; /* Check if the buffers have finished playing on this channel/port. */
/* The events are queued in a soft buffer that the user must empty regularly. */
UINT32 ulUserEventId; /* Returned to the user when the playout is finished and the user has set the fNotifyOnPlayoutStop flag. */
BOOL fAllowStartWhileActive; /* Use this to add buffers to something that is already playing on the channel/port. */
} tOCT6100_BUFFER_PLAYOUT_START, *tPOCT6100_BUFFER_PLAYOUT_START;
typedef struct _OCT6100_BUFFER_PLAYOUT_STOP_
{
UINT32 ulChannelHndl; /* Echo cancelling channel on which to play the buffer. */
UINT32 ulPlayoutPort; /* Selected channel port where to play to tone. */
BOOL fStopCleanly; /* Whether or not the skip will be clean. */
PBOOL pfAlreadyStopped; /* Whether playout was already stopped or not. */
PBOOL pfNotifyOnPlayoutStop; /* Whether the user chosed to receive an event on playout stop. */
} tOCT6100_BUFFER_PLAYOUT_STOP, *tPOCT6100_BUFFER_PLAYOUT_STOP;
/************************** FUNCTION PROTOTYPES *****************************/
UINT32 Oct6100BufferPlayoutLoadDef(
OUT tPOCT6100_BUFFER_LOAD f_pBufferLoad );
UINT32 Oct6100BufferPlayoutLoad(
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
IN OUT tPOCT6100_BUFFER_LOAD f_pBufferLoad );
UINT32 Oct6100BufferPlayoutLoadBlockInitDef(
OUT tPOCT6100_BUFFER_LOAD_BLOCK_INIT f_pBufferLoadBlockInit );
UINT32 Oct6100BufferPlayoutLoadBlockInit(
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
IN OUT tPOCT6100_BUFFER_LOAD_BLOCK_INIT f_pBufferLoadBlockInit );
UINT32 Oct6100BufferPlayoutLoadBlockDef(
OUT tPOCT6100_BUFFER_LOAD_BLOCK f_pBufferLoadBlock );
UINT32 Oct6100BufferPlayoutLoadBlock(
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
IN OUT tPOCT6100_BUFFER_LOAD_BLOCK f_pBufferLoadBlock );
UINT32 Oct6100BufferPlayoutUnloadDef(
OUT tPOCT6100_BUFFER_UNLOAD f_pBufferUnload );
UINT32 Oct6100BufferPlayoutUnload(
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
IN OUT tPOCT6100_BUFFER_UNLOAD f_pBufferUnload );
UINT32 Oct6100BufferPlayoutAddDef(
OUT tPOCT6100_BUFFER_PLAYOUT_ADD f_pBufferPlayoutAdd );
UINT32 Oct6100BufferPlayoutAdd(
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
IN OUT tPOCT6100_BUFFER_PLAYOUT_ADD f_pBufferPlayoutAdd );
UINT32 Oct6100BufferPlayoutStartDef(
OUT tPOCT6100_BUFFER_PLAYOUT_START f_pBufferPlayoutStart );
UINT32 Oct6100BufferPlayoutStart(
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
IN OUT tPOCT6100_BUFFER_PLAYOUT_START f_pBufferPlayoutStart );
UINT32 Oct6100BufferPlayoutStopDef(
OUT tPOCT6100_BUFFER_PLAYOUT_STOP f_pBufferPlayoutStop );
UINT32 Oct6100BufferPlayoutStop(
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
IN OUT tPOCT6100_BUFFER_PLAYOUT_STOP f_pBufferPlayoutStop );
#endif /* __OCT6100_PLAYOUT_BUF_PUB_H__ */
|