Skip to content

Commit 09a1ba8

Browse files
author
xianing
committed
update podfile
1 parent ba528d0 commit 09a1ba8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

iOS/APIExample/Examples/Advanced/CustomPcmAudioSource/CustomPcmAudioSource.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ extension CustomPcmAudioSourceMain: AgoraPcmSourcePushDelegate {
151151
func onAudioFrame(data: UnsafeMutablePointer<UInt8>, samples: UInt) {
152152
let frame = AgoraAudioFrame()
153153
frame.buffer = UnsafeMutableRawPointer(data)
154-
frame.samplesPerSec = 48000
155-
frame.channels = 2
156-
frame.bytesPerSample = 32 * 8
154+
frame.samplesPerSec = Int(sampleRate)
155+
frame.channels = Int(channel)
156+
frame.bytesPerSample = 2
157157
frame.samplesPerChannel = self.samples / 2
158158
let ret = agoraKit.pushExternalAudioFrameRawData(pushPos, frame: frame)
159159
print("push result: \(ret)")

0 commit comments

Comments
 (0)