MillicastSDK 2.0.0
Loading...
Searching...
No Matches
Instance Methods | Properties | List of all members
MCAudioFrame Class Reference

#import <frames.h>

Inheritance diagram for MCAudioFrame:
Inheritance graph
[legend]
Collaboration diagram for MCAudioFrame:
Collaboration graph
[legend]

Instance Methods

 cppFrame
 
 initWithCppFrame:
 

Properties

const void * data
 The audio data containing raw audio samples.
 
int bitsPerSample
 The number of bits per audio sample.
 
int sampleRate
 The sample rate of the audio data, which is either 48kHz or 44.1kHz.
 
size_t channelNumber
 The number of audio channels defining whether the audio is mono, stereo, or has more complex channel configurations.
 
size_t frameNumber
 The number of frames in the data array. The number of frames is dependent on the sample rate and chunk time.
 

Detailed Description

Audio frame that contains audio data. Used with MCCustomAudioSource/onAudioFrame: to feed custom audio frames into source used by a MCPublisher.

var frame: MCAudioFrame = MCAudioFrame()
var source: MCCustomAudioSourceBuilder().build()
frame.bitsPerSample = 32; // We are using Float32 as an example
frame.channelNumber = numChannels
frame.sampleRate = Int32(sampleRate)
frame.frameNumber = Int(sampleRate * chunkTime / 1000);
// Imagine audioData is a pointer to some data
frame.data = UnsafeRawPointer(audioData)
source.onAudioFrame(frame)
Definition frames.h:68
int bitsPerSample
The number of bits per audio sample.
Definition frames.h:73
size_t frameNumber
The number of frames in the data array. The number of frames is dependent on the sample rate and chun...
Definition frames.h:82
const void * data
The audio data containing raw audio samples.
Definition frames.h:70
size_t channelNumber
The number of audio channels defining whether the audio is mono, stereo, or has more complex channel ...
Definition frames.h:79
int sampleRate
The sample rate of the audio data, which is either 48kHz or 44.1kHz.
Definition frames.h:76
Responsible for building MCCustomAudioSource.
Definition source.h:255

Property Documentation

◆ bitsPerSample

- (int) bitsPerSample
readwriteatomic

The number of bits per audio sample.

◆ channelNumber

- (size_t) channelNumber
readwriteatomic

The number of audio channels defining whether the audio is mono, stereo, or has more complex channel configurations.

◆ data

- (const void*) data
readwriteatomic

The audio data containing raw audio samples.

◆ frameNumber

- (size_t) frameNumber
readwriteatomic

The number of frames in the data array. The number of frames is dependent on the sample rate and chunk time.

◆ sampleRate

- (int) sampleRate
readwriteatomic

The sample rate of the audio data, which is either 48kHz or 44.1kHz.


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