Micro RTSP Audio
Public Member Functions | Protected Attributes | List of all members
IAudioSource Class Referenceabstract

Interface for an audio source for an RTP stream. More...

#include <IAudioSource.h>

Public Member Functions

virtual RTSPFormatgetFormat ()
 Defines the format of the audio data. If nothing has been defined we use 2 byte PCM info with 16000 samples per second on 1 channel.
 
void setFormat (RTSPFormat *fmt)
 Defines the Format. More...
 
virtual int readBytes (void *dest, int maxSamples)=0
 
virtual void start ()
 
virtual void stop ()
 

Protected Attributes

RTSPFormatp_fmt =nullptr
 

Detailed Description

Interface for an audio source for an RTP stream.

Member Function Documentation

◆ readBytes()

virtual int IAudioSource::readBytes ( void *  dest,
int  maxSamples 
)
pure virtual

(Reads and) Copies up to maxSamples samples into the given buffer

Parameters
destBuffer into which the samples are to be copied
maxSamplesmaximum number of samples to be copied
Returns
actual number of samples that were copied

◆ setFormat()

void IAudioSource::setFormat ( RTSPFormat fmt)
inline

Defines the Format.

Parameters
fmt

◆ start()

virtual void IAudioSource::start ( )
inlinevirtual

Start preparing data in order to provide it for the stream

◆ stop()

virtual void IAudioSource::stop ( )
inlinevirtual

Stop preparing data as the stream has ended


The documentation for this class was generated from the following file: