Twitch SDK (Internal)
Public Member Functions | List of all members
ttv::broadcast::IAudioCapture Class Referenceabstract

#include <iaudiocapture.h>

Inheritance diagram for ttv::broadcast::IAudioCapture:
ttv::broadcast::AudioCaptureBase ttv::broadcast::AppleAudioCapture ttv::broadcast::PassThroughAudioCapture ttv::broadcast::WinAudioCapture

Public Member Functions

virtual ~IAudioCapture ()
 
virtual void SetAudioMixer (const std::shared_ptr< IAudioMixer > &mixer)=0
 
virtual std::string GetName () const =0
 
virtual uint32_t GetNumChannels () const =0
 
virtual bool GetMuted () const =0
 
virtual void SetMuted (bool muted)=0
 
virtual void SetAudioLayer (AudioLayerId layer)=0
 
virtual AudioLayerId GetAudioLayer () const =0
 
virtual TTV_ErrorCode Initialize ()=0
 
virtual TTV_ErrorCode Shutdown ()=0
 
virtual TTV_ErrorCode Start ()=0
 
virtual TTV_ErrorCode Process (const std::shared_ptr< IAudioMixer > &mixer, uint64_t &lastSampleTime)=0
 
virtual void SetInitialTime (uint64_t initialTime)=0
 
virtual TTV_ErrorCode Stop ()=0
 

Detailed Description

Interface for capturing and supplying audio.

The following methods should be called by the client. Initialize() should be called by the client prior to adding it to the system. Shutdown() should be called after removing from the system.

The following methods will be called by the system during use. SetAudioMixer() will be called prior to starting capture. Start() and Stop() will be called by the system when capture is to be started and stopped.

Constructor & Destructor Documentation

◆ ~IAudioCapture()

virtual ttv::broadcast::IAudioCapture::~IAudioCapture ( )
virtual

Member Function Documentation

◆ GetAudioLayer()

virtual AudioLayerId ttv::broadcast::IAudioCapture::GetAudioLayer ( ) const
pure virtual

◆ GetMuted()

virtual bool ttv::broadcast::IAudioCapture::GetMuted ( ) const
pure virtual

Retrieves the current muted state.

Implemented in ttv::broadcast::AudioCaptureBase.

◆ GetName()

virtual std::string ttv::broadcast::IAudioCapture::GetName ( ) const
pure virtual

◆ GetNumChannels()

virtual uint32_t ttv::broadcast::IAudioCapture::GetNumChannels ( ) const
pure virtual

Retrieves the number of channels captured.

Implemented in ttv::broadcast::WinAudioCapture, ttv::broadcast::PassThroughAudioCapture, and ttv::broadcast::AppleAudioCapture.

◆ Initialize()

virtual TTV_ErrorCode ttv::broadcast::IAudioCapture::Initialize ( )
pure virtual

◆ Process()

virtual TTV_ErrorCode ttv::broadcast::IAudioCapture::Process ( const std::shared_ptr< IAudioMixer > &  mixer,
uint64_t &  lastSampleTime 
)
pure virtual

◆ SetAudioLayer()

virtual void ttv::broadcast::IAudioCapture::SetAudioLayer ( AudioLayerId  layer)
pure virtual

◆ SetAudioMixer()

virtual void ttv::broadcast::IAudioCapture::SetAudioMixer ( const std::shared_ptr< IAudioMixer > &  mixer)
pure virtual

◆ SetInitialTime()

virtual void ttv::broadcast::IAudioCapture::SetInitialTime ( uint64_t  initialTime)
pure virtual

This is call once upon starting capture so there is a relative timestamp to work off of. This is used to pace the capture.

Implemented in ttv::broadcast::AppleAudioCapture, and ttv::broadcast::AudioCaptureBase.

◆ SetMuted()

virtual void ttv::broadcast::IAudioCapture::SetMuted ( bool  muted)
pure virtual

Sets the current muted state. The capturer should track this flag so it can be returned from GetMuted() but it can also optionally pause capturing when muted if desired. Silence should still be written as if there were real audio available.

Implemented in ttv::broadcast::AudioCaptureBase.

◆ Shutdown()

virtual TTV_ErrorCode ttv::broadcast::IAudioCapture::Shutdown ( )
pure virtual

◆ Start()

virtual TTV_ErrorCode ttv::broadcast::IAudioCapture::Start ( )
pure virtual

◆ Stop()

virtual TTV_ErrorCode ttv::broadcast::IAudioCapture::Stop ( )
pure virtual

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