GCKRemoteDisplayAudioInput Class

GCKRemoteDisplayAudioInput Class Reference

Overview

Converts and enqueues audio samples to a Remote Display session.

This class allows submission of audio samples in any linear PCM format to a Remote Display session. The input will do any format conversion necessary, including up or down sampling, and submit the resulting samples to its owning session.

Inherits NSObject.

Instance Method Summary

(instancetype) - initWithSession:format:
 Creates a new audio input. More...
 
(void) - enqueueAudioBuffer:frames:pts:
 Enqueue an audio buffer for conversion and transmission. More...
 
(void) - reset
 Reset the input. More...
 
(instancetype) - NS_UNAVAILABLE
 

Properties

id< GCKRemoteDisplaySessionsession
 Remote Display session the input is bound to. More...
 
AVAudioFormat * format
 The input format. More...
 

Method Detail

- (instancetype) initWithSession: (id< GCKRemoteDisplaySession >)  session
format: (AVAudioFormat *)  format 

Creates a new audio input.

The format must be linear PCM.

- (void) enqueueAudioBuffer: (const AudioBufferList *)  abl
frames: (uint32_t)  frames
pts: (const struct AudioTimeStamp *)  pts 

Enqueue an audio buffer for conversion and transmission.

The audio samples are converted synchronously to the owning session's format and enqueued for encoding and transmission. The timestamp must have a valid mHostTime field.

The audio buffer must contain samples matching the converter's input format. If this is not the case, behavior is undefined (the app may crash, audio may be garbled, etc).

- (void) reset

Reset the input.

Flush all internal state and buffers. Should be called before discontinuities in the stream, such before and after inserted ads.

Property Documentation

- (id<GCKRemoteDisplaySession>) session
readnonatomicweak

Remote Display session the input is bound to.

- (AVAudioFormat*) format
readnonatomicassign

The input format.

Google Cast iOS Sender API Reference v 2.10.1 4691