1
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
3
File: oct6100_playout_buf_pub.h
5
Copyright (c) 2001-2007 Octasic Inc.
9
File containing all defines, macros, and structures pertaining to the file
10
oct6100_playout_buf.c. All elements defined in this file are for public
11
usage of the API. All private elements are defined in the
12
oct6100_playout_buf_priv.h file.
14
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
15
free software; you can redistribute it and/or modify it under the terms of
16
the GNU General Public License as published by the Free Software Foundation;
17
either version 2 of the License, or (at your option) any later version.
19
The OCT6100 GPL API is distributed in the hope that it will be useful, but
20
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24
You should have received a copy of the GNU General Public License
25
along with the OCT6100 GPL API; if not, write to the Free Software
26
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
28
$Octasic_Release: OCT612xAPI-01.00-PR49 $
30
$Octasic_Revision: 21 $
32
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
34
#ifndef __OCT6100_PLAYOUT_BUF_PUB_H__
35
#define __OCT6100_PLAYOUT_BUF_PUB_H__
37
/***************************** INCLUDE FILES *******************************/
40
/***************************** DEFINES *************************************/
43
/***************************** TYPES ***************************************/
45
typedef struct _OCT6100_BUFFER_LOAD_
47
PUINT32 pulBufferIndex; /* Index identifying the buffer. */
48
PUINT32 pulPlayoutFreeMemSize; /* Amount of free memory available for other buffers. */
50
PUINT8 pbyBufferPattern; /* A byte pointer pointing to a valid buffer to be loaded into the chip's external memory. */
51
UINT32 ulBufferSize; /* Size of the buffer loaded into external memory. */
53
UINT32 ulBufferPcmLaw; /* Buffer PCM law. */
55
} tOCT6100_BUFFER_LOAD, *tPOCT6100_BUFFER_LOAD;
57
typedef struct _OCT6100_BUFFER_LOAD_BLOCK_INIT_
59
PUINT32 pulBufferIndex; /* Index identifying the buffer. */
60
PUINT32 pulPlayoutFreeMemSize; /* Amount of free memory available for other buffers. */
62
UINT32 ulBufferSize; /* Size of the buffer to be loaded in memory. This space will be reserved. */
64
UINT32 ulBufferPcmLaw; /* Buffer PCM law. */
66
} tOCT6100_BUFFER_LOAD_BLOCK_INIT, *tPOCT6100_BUFFER_LOAD_BLOCK_INIT;
68
typedef struct _OCT6100_BUFFER_LOAD_BLOCK_
70
UINT32 ulBufferIndex; /* Index identifying the buffer. */
72
/* Offset, in bytes, of the first byte in the block to be loaded. */
73
/* This offset is with respect to the beginning of the buffer. */
74
/* This value must be modulo 2 */
77
/* Size of the block to be loaded into external memory. */
78
/* This value must be modulo 2. */
81
/* A pointer pointing to a valid buffer block to be loaded */
82
/* into the chip's external memory. This is a pointer to the entire */
83
/* buffer. The API uses the ulBlockOffset and ulBlockLength to index */
84
/* within this buffer and obtain the block to be loaded. */
85
PUINT8 pbyBufferPattern;
87
} tOCT6100_BUFFER_LOAD_BLOCK, *tPOCT6100_BUFFER_LOAD_BLOCK;
89
typedef struct _OCT6100_BUFFER_UNLOAD_
91
UINT32 ulBufferIndex; /* Index identifying the buffer. */
93
} tOCT6100_BUFFER_UNLOAD, *tPOCT6100_BUFFER_UNLOAD;
95
typedef struct _OCT6100_BUFFER_PLAYOUT_ADD_
97
UINT32 ulChannelHndl; /* Echo cancelling channel on which to play the buffer. */
99
UINT32 ulBufferIndex; /* Index identifying the buffer. */
101
UINT32 ulPlayoutPort; /* Selected channel port where to play to tone. */
102
UINT32 ulMixingMode; /* Weither or not the voice stream will be muted while playing the buffer. */
104
INT32 lGainDb; /* Gain applied to the buffer that will be played on the specified port. */
106
BOOL fRepeat; /* Use ulRepeatCount variable. */
107
UINT32 ulRepeatCount; /* Number of times to repeat playing the selected buffer. */
109
UINT32 ulDuration; /* Duration in millisecond that this buffer should play. Setting this overrides fRepeat. */
111
UINT32 ulBufferLength; /* Length of the buffer to play (starting at the beginning), AUTO_SELECT for all. */
113
} tOCT6100_BUFFER_PLAYOUT_ADD, *tPOCT6100_BUFFER_PLAYOUT_ADD;
115
typedef struct _OCT6100_BUFFER_PLAYOUT_START_
117
UINT32 ulChannelHndl; /* Echo cancelling channel on which to play the buffer. */
118
UINT32 ulPlayoutPort; /* Selected channel port where to play to tone. */
120
BOOL fNotifyOnPlayoutStop; /* Check if the buffers have finished playing on this channel/port. */
121
/* The events are queued in a soft buffer that the user must empty regularly. */
122
UINT32 ulUserEventId; /* Returned to the user when the playout is finished and the user has set the fNotifyOnPlayoutStop flag. */
124
BOOL fAllowStartWhileActive; /* Use this to add buffers to something that is already playing on the channel/port. */
126
} tOCT6100_BUFFER_PLAYOUT_START, *tPOCT6100_BUFFER_PLAYOUT_START;
128
typedef struct _OCT6100_BUFFER_PLAYOUT_STOP_
130
UINT32 ulChannelHndl; /* Echo cancelling channel on which to play the buffer. */
131
UINT32 ulPlayoutPort; /* Selected channel port where to play to tone. */
132
BOOL fStopCleanly; /* Whether or not the skip will be clean. */
134
PBOOL pfAlreadyStopped; /* Whether playout was already stopped or not. */
135
PBOOL pfNotifyOnPlayoutStop; /* Whether the user chosed to receive an event on playout stop. */
137
} tOCT6100_BUFFER_PLAYOUT_STOP, *tPOCT6100_BUFFER_PLAYOUT_STOP;
139
/************************** FUNCTION PROTOTYPES *****************************/
141
UINT32 Oct6100BufferPlayoutLoadDef(
142
OUT tPOCT6100_BUFFER_LOAD f_pBufferLoad );
143
UINT32 Oct6100BufferPlayoutLoad(
144
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
145
IN OUT tPOCT6100_BUFFER_LOAD f_pBufferLoad );
147
UINT32 Oct6100BufferPlayoutLoadBlockInitDef(
148
OUT tPOCT6100_BUFFER_LOAD_BLOCK_INIT f_pBufferLoadBlockInit );
149
UINT32 Oct6100BufferPlayoutLoadBlockInit(
150
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
151
IN OUT tPOCT6100_BUFFER_LOAD_BLOCK_INIT f_pBufferLoadBlockInit );
153
UINT32 Oct6100BufferPlayoutLoadBlockDef(
154
OUT tPOCT6100_BUFFER_LOAD_BLOCK f_pBufferLoadBlock );
155
UINT32 Oct6100BufferPlayoutLoadBlock(
156
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
157
IN OUT tPOCT6100_BUFFER_LOAD_BLOCK f_pBufferLoadBlock );
159
UINT32 Oct6100BufferPlayoutUnloadDef(
160
OUT tPOCT6100_BUFFER_UNLOAD f_pBufferUnload );
161
UINT32 Oct6100BufferPlayoutUnload(
162
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
163
IN OUT tPOCT6100_BUFFER_UNLOAD f_pBufferUnload );
165
UINT32 Oct6100BufferPlayoutAddDef(
166
OUT tPOCT6100_BUFFER_PLAYOUT_ADD f_pBufferPlayoutAdd );
167
UINT32 Oct6100BufferPlayoutAdd(
168
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
169
IN OUT tPOCT6100_BUFFER_PLAYOUT_ADD f_pBufferPlayoutAdd );
171
UINT32 Oct6100BufferPlayoutStartDef(
172
OUT tPOCT6100_BUFFER_PLAYOUT_START f_pBufferPlayoutStart );
173
UINT32 Oct6100BufferPlayoutStart(
174
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
175
IN OUT tPOCT6100_BUFFER_PLAYOUT_START f_pBufferPlayoutStart );
177
UINT32 Oct6100BufferPlayoutStopDef(
178
OUT tPOCT6100_BUFFER_PLAYOUT_STOP f_pBufferPlayoutStop );
179
UINT32 Oct6100BufferPlayoutStop(
180
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
181
IN OUT tPOCT6100_BUFFER_PLAYOUT_STOP f_pBufferPlayoutStop );
183
#endif /* __OCT6100_PLAYOUT_BUF_PUB_H__ */