libavresample/resample.h File Reference

#include "avresample.h"
#include "audio_data.h"

Go to the source code of this file.

Typedefs

typedef struct ResampleContext ResampleContext

Functions

ResampleContextff_audio_resample_init (AVAudioResampleContext *avr)
 Allocate and initialize a ResampleContext.
void ff_audio_resample_free (ResampleContext **c)
 Free a ResampleContext.
int ff_audio_resample (ResampleContext *c, AudioData *dst, AudioData *src, int *consumed)
 Resample audio data.


Typedef Documentation

Definition at line 27 of file resample.h.


Function Documentation

int ff_audio_resample ( ResampleContext c,
AudioData dst,
AudioData src,
int consumed 
)

Resample audio data.

Changes the sample rate.

All samples in the source data may not be consumed depending on the resampling parameters and the size of the output buffer. The unconsumed samples are automatically added to the start of the source in the next call. If the destination data can be reallocated, that may be done in this function in order to fit all available output. If it cannot be reallocated, fewer input samples will be consumed in order to have the output fit in the destination data buffers.
Parameters:
c ResampleContext
dst destination audio data
src source audio data
consumed number of samples consumed from the source
Returns:
number of samples written to the destination

Definition at line 397 of file resample.c.

Referenced by avresample_convert().

void ff_audio_resample_free ( ResampleContext **  c  ) 

Free a ResampleContext.

Parameters:
c ResampleContext

Definition at line 237 of file resample.c.

Referenced by avresample_close().

ResampleContext* ff_audio_resample_init ( AVAudioResampleContext avr  ) 

Allocate and initialize a ResampleContext.

The parameters in the AVAudioResampleContext are used to initialize the ResampleContext.

Parameters:
avr AVAudioResampleContext
Returns:
newly-allocated ResampleContext

Definition at line 145 of file resample.c.

Referenced by avresample_open().


Generated on Fri Oct 26 02:50:12 2012 for FFmpeg by  doxygen 1.5.8