Audio sample rate conversion.
This section describes media port abstraction for Resampling Algorithm.
Option flags that can be specified when creating resample port.
Do not use high quality resampling algorithm, but use linear algorithm instead.
Use small filter workspace when high quality resampling is used.
Do not destroy downstream port when resample port is destroyed.
Create a resample port. This creates a bidirectional resample session, which will resample frames when the port's get_frame() and put_frame() is called.
When the resample port's get_frame() is called, this port will get a frame from the downstream port and resample the frame to the target clock rate before returning it to the caller.
When the resample port's put_frame() is called, this port will resample the frame to the downstream port's clock rate before giving the frame to the downstream port.
|pool||Pool to allocate the structure and buffers. |
|dn_port||The downstream port, which clock rate is to be converted to the target clock rate. |
|clock_rate||Target clock rate. |
|options||Flags from pjmedia_resample_port_options. When this flag is zero, the default behavior is to use high quality resampling with large filter, and to destroy downstream port when resample port is destroyed. |
|p_port||Pointer to receive the resample port instance.|
- PJ_SUCCESS on success.