bugfix
This commit is contained in:
parent
f4822d38b9
commit
0371c9c671
@ -18,9 +18,9 @@ def bytes_to_audio_frame(bytes_data, format='s16', layout='mono', sample_rate=16
|
||||
- sample_rate: 采样率。
|
||||
"""
|
||||
# 根据给定的参数创建AudioFrame
|
||||
frame = AudioFrame(format=format, layout=layout,
|
||||
samples=len(bytes_data) // 2,
|
||||
rate=sample_rate)
|
||||
frame = AudioFrame(format=format,
|
||||
layout=layout,
|
||||
samples=len(bytes_data) // 2)
|
||||
|
||||
# 将字节数据复制到AudioFrame中
|
||||
frame.planes[0].update(bytes_data)
|
||||
|
Loading…
Reference in New Issue
Block a user