IVSMixedAudioDevice
Objective-C
@protocol IVSMixedAudioDevice <IVSAudioDevice, IVSMixedDevice>
Swift
protocol IVSMixedAudioDevice : IVSAudioDevice, IVSMixedDevice
A mixed audio device that can accept multiple audio sources to be mixed together to produce a final output. A mixed audio device with no input sources will still produce output, but the output will be silent.
Note
Multiple audio sources will have their audio added together. If there are too many loud sources sending samples at the same time, the output may be clipped. Turn down the gain on individual sources to compensate if necessary.This can be created through IVSDeviceDiscovery
.
-
Adds a source to this mixed device. If this
source
has already been added, this will be a no-op.Declaration
Objective-C
- (void)addSource:(nonnull IVSMixedAudioDeviceSource *)source;
Swift
func add(_ source: IVSMixedAudioDeviceSource)
-
Removes a source from the mixed device. If this
source
isn’t currently attached, this will be a no-op.Declaration
Objective-C
- (void)removeSource:(nonnull IVSMixedAudioDeviceSource *)source;
Swift
func remove(_ source: IVSMixedAudioDeviceSource)
-
Returns an array of the sources attached to this device.
Declaration
Objective-C
- (nonnull NSArray<IVSMixedAudioDeviceSource *> *)sources;
Swift
func sources() -> [IVSMixedAudioDeviceSource]