- Timestamp:
- Feb 21, 2009 2:21:59 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/aps-direct/pjmedia/include/pjmedia/sound_port.h
r2438 r2468 25 25 * @brief Media port connection abstraction to sound device. 26 26 */ 27 #include <pjmedia /sound.h>27 #include <pjmedia-audiodev/audiodev.h> 28 28 #include <pjmedia/port.h> 29 29 … … 163 163 164 164 /** 165 * Create unidirectional or bidirectional sound port. This also allows 166 * creating sound port with extended settings, e.g: audio format, see 167 * #pjmedia_snd_setting. 168 * 169 * @param pool Pool to allocate sound port structure. 170 * @param dir Sound device direction. 171 * @param rec_id Device index for recorder/capture stream, or 172 * -1 to use the first capable device. 173 * @param play_id Device index for playback stream, or -1 to use 174 * the first capable device. 175 * @param clock_rate Sound device's clock rate to set. 176 * @param channel_count Set number of channels, 1 for mono, or 2 for 177 * stereo. The channel count determines the format 178 * of the frame. 179 * @param samples_per_frame Number of samples per frame. 180 * @param bits_per_sample Set the number of bits per sample. The normal 181 * value for this parameter is 16 bits per sample. 182 * @param setting Sound device extended settings, see 183 * #pjmedia_snd_setting. 165 * Create sound device port according to the specified parameters. 166 * 167 * @param pool Pool to allocate sound port structure. 168 * @param prm Sound device settings. 184 169 * @param p_port Pointer to receive the sound device port instance. 185 170 * … … 188 173 */ 189 174 PJ_DECL(pj_status_t) pjmedia_snd_port_create2(pj_pool_t *pool, 190 pjmedia_dir dir, 191 int rec_id, 192 int play_id, 193 unsigned clock_rate, 194 unsigned channel_count, 195 unsigned samples_per_frame, 196 unsigned bits_per_sample, 197 const pjmedia_snd_setting *setting, 175 const pjmedia_aud_param *prm, 198 176 pjmedia_snd_port **p_port); 199 177 … … 217 195 * @return The sound stream instance. 218 196 */ 219 PJ_DECL(pjmedia_ snd_stream*) pjmedia_snd_port_get_snd_stream(197 PJ_DECL(pjmedia_aud_stream*) pjmedia_snd_port_get_snd_stream( 220 198 pjmedia_snd_port *snd_port); 221 199 222 200 223 201 /** 224 * Configure the echo cancellation tail length. By default, echo canceller 225 * is enabled in the sound device with the default tail length. After the 226 * sound port is created, application can query the current echo canceller 227 * tail length by calling #pjmedia_snd_port_get_ec_tail. 228 * 229 * Note that you should only change the EC settings when the sound port 230 * is not connected to any downstream ports, otherwise race condition may 231 * occur. 202 * Change the echo cancellation settings. The echo cancellation settings 203 * should have been specified when this sound port was created, by setting 204 * the appropriate fields in the pjmedia_aud_param, because not all sound 205 * device implementation supports changing the EC setting once the device 206 * has been opened. 207 * 208 * The behavior of this function depends on whether device or software AEC 209 * is being used. If the device supports AEC, this function will forward 210 * the change request to the device and it will be up to the device whether 211 * to support the request. If software AEC is being used (the software EC 212 * will be used if the device does not support AEC), this function will 213 * change the software EC settings. 232 214 * 233 215 * @param snd_port The sound device port. … … 237 219 * be disabled. 238 220 * @param options The options to be passed to #pjmedia_echo_create(). 221 * This is only used if software EC is being used. 239 222 * 240 223 * @return PJ_SUCCESS on success.
Note: See TracChangeset
for help on using the changeset viewer.