-
-
Notifications
You must be signed in to change notification settings - Fork 620
Moving from 1.6.0 APIs to 1.7.x
shogo4405 edited this page Nov 10, 2023
·
7 revisions
open class NetStream: NSObject {
public var loopback: Bool { get set }
public func appendSampleBuffer(_ sampleBuffer: CMSampleBuffer)
}
open class NetStream: NSObject {
public var isMonitoringEnabled: Bool { get set }
public func append(_ sampleBuffer: CMSampleBuffer)
}
stream.mixer.recorder.isRuning
stream.mixer.recorder.delegate = self
stream.startRecording(settings)
stream.isRecording
stream.startRecording(self, settings: settings)
/// The interface a NetStream uses to inform its delegate.
public protocol NetStreamDelegate: AnyObject {
/// Tells the receiver to video error occured.
func stream(_ stream: NetStream, videoErrorOccurred error: AudioCodec.Error)
/// Tells the receiver to audio error occured.
func stream(_ stream: NetStream, audioErrorOccurred error: VideoCodec.Error)
}
/// The interface a NetStream uses to inform its delegate.
public protocol NetStreamDelegate: AnyObject {
/// Tells the receiver to video error occured.
func stream(_ stream: NetStream, videoErrorOccurred error: IOVideoUnitError)
/// Tells the receiver to audio error occured.
func stream(_ stream: NetStream, audioErrorOccurred error: IOAudioUnitError)
}
/// An object that apply an audio effect.
open class AudioEffect: NSObject {
/// Executes to apply an audio effect.
open func execute(_ buffer: UnsafeMutableAudioBufferListPointer?, format: AudioStreamBasicDescription?) {
}
}
You can get PCM data, so please process it in this delegate.
/// The interface a NetStream uses to inform its delegate.
public protocol NetStreamDelegate: AnyObject {
/// Tells the receiver an audio packet incoming.
func stream(_ stream: NetStream, didOutput audio: AVAudioBuffer, when: AVAudioTime)
}
HaishinKit.swift | 🇬🇧 HaishinKit.kt | 🇯🇵 Zenn