filmstro_ffmpeg
 All Classes Files Functions Friends Macros
Public Member Functions | List of all members
OutputSourcePlayer Class Reference

This class provides an AudioSourcePlayer, which will adapt its resampler whenever the device changes the sampling rate. More...

#include <filmstro_audiohelpers_OutputSourcePlayer.h>

Inheritance diagram for OutputSourcePlayer:

Public Member Functions

 OutputSourcePlayer (double sampleRate, int channels=2)
 Constructs an OutputSourcePlayer. More...
 
void setSource (juce::AudioSource *newSource)
 Set or replace the source of the AudioSourcePlayer. More...
 
void audioDeviceIOCallback (const float **inputChannelData, int totalNumInputChannels, float **outputChannelData, int totalNumOutputChannels, int numSamples) override
 Callback from the AudioIODevice. More...
 
void audioDeviceAboutToStart (juce::AudioIODevice *device) override
 callback when the device wants to start using the AudioDeviceIOCallback More...
 
void audioDeviceStopped () override
 Callback when the AudioIODevice just stopped using the AudioDeviceIOCallback. More...
 

Detailed Description

This class provides an AudioSourcePlayer, which will adapt its resampler whenever the device changes the sampling rate.

Constructor & Destructor Documentation

OutputSourcePlayer::OutputSourcePlayer ( double  sampleRate,
int  channels = 2 
)
inline

Constructs an OutputSourcePlayer.

This makes the processing independent from the devices playback rate.

Parameters
sampleRateis the sample rate the playing AudioSource would expect
channelsis the number of channels for the resampler to provide. Defaults to 2 (stereo)

Member Function Documentation

void OutputSourcePlayer::audioDeviceAboutToStart ( juce::AudioIODevice *  device)
inlineoverride

callback when the device wants to start using the AudioDeviceIOCallback

void OutputSourcePlayer::audioDeviceIOCallback ( const float **  inputChannelData,
int  totalNumInputChannels,
float **  outputChannelData,
int  totalNumOutputChannels,
int  numSamples 
)
inlineoverride

Callback from the AudioIODevice.

This drives the playback of the AudioSource

void OutputSourcePlayer::audioDeviceStopped ( )
inlineoverride

Callback when the AudioIODevice just stopped using the AudioDeviceIOCallback.

void OutputSourcePlayer::setSource ( juce::AudioSource *  newSource)
inline

Set or replace the source of the AudioSourcePlayer.


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