IVSMixedAudioDeviceSource

Objective-C


@interface IVSMixedAudioDeviceSource : NSObject

Swift

class IVSMixedAudioDeviceSource : NSObject

A source for an IVSMixedAudioDevice.

  • The audio device for this source. This can be changed at runtime and the mixed device will immediately apply the new device to the source, having it adopt the source’s configuration. This can also be set to nil.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) id<IVSAudioDevice> device;

    Swift

    var device: (any IVSAudioDevice)? { get set }
  • The configuration for this source. To update this, provide a new IVSMixedAudioDeviceSourceConfiguration to the transition API.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) IVSMixedAudioDeviceSourceConfiguration *_Nonnull configuration;

    Swift

    var configuration: IVSMixedAudioDeviceSourceConfiguration { get }
  • Unavailable

    Do not create instances of this class directly

    Declaration

    Objective-C

    IVS_INIT_UNAVAILABLE
  • Unavailable

    Do not create instances of this class directly

    Declaration

    Objective-C

    IVS_INIT_UNAVAILABLE
  • Creates a new IVSMixedAudioDeviceSource with a required configuration and optional device.

    Declaration

    Objective-C

    - (nonnull instancetype)
        initWithConfiguration:
            (nonnull IVSMixedAudioDeviceSourceConfiguration *)configuration
                       device:(nullable id<IVSAudioDevice>)device;

    Swift

    init(configuration: IVSMixedAudioDeviceSourceConfiguration, device: (any IVSAudioDevice)?)
  • Transitions this source to a new configuration.

    Multiple concurrent transitions are not supported on the same source. If you initiate a second transition before the first is finished, the transition will start over from the original state and transition to the new state as if the first transition had never been made.

    If there are no devices attached to this source, the duration parameter will be ignored and the slot will be updated immediately.

    Declaration

    Objective-C

    - (void)transitionToConfiguration:
                (nonnull IVSMixedAudioDeviceSourceConfiguration *)nextConfiguration
                             duration:(NSTimeInterval)duration
                           onComplete:(nullable void (^)(BOOL))onComplete;

    Swift

    func transition(to nextConfiguration: IVSMixedAudioDeviceSourceConfiguration, duration: TimeInterval, onComplete: ((Bool) -> Void)? = nil)

    Parameters

    nextConfiguration

    The new configuration for this source

    duration

    The amount of time to animate the transition for

    onComplete

    An optional callback that will be called when the animation has completed. The boolean provided will be true if the transition finished, or false if it was interrupted.