-
Notifications
You must be signed in to change notification settings - Fork 57
Switch to PortAudio #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
You should explain the motivation and benefit for the migration of PortAudio. |
6d42303
to
6e00d27
Compare
Build failure:
|
Thanks for the reminder! |
f26f174
to
e331ed7
Compare
e331ed7
to
e7184f0
Compare
e7184f0
to
a73d91d
Compare
c270822
to
856807d
Compare
04ea592
to
9023def
Compare
Prepare the instructions l for testing the PortAudio-based virtio-snd backend, including preparation of the Linux kernel image and root filesystem. The goal is to deliver the preliminary work that can be shared with and potentially expanded by additional contributors. |
d989a67
to
18178b5
Compare
I have added the test procedures in "Testing" section located in the first comment. |
Switch to PortAudio for cross-platform and cross backend compatibility. Yet, there are two known limitations for current sound playback implementation: 1. The sound may produce stutter effect. 2. You cannot play sound twice or the device will crash thus whole emulator crashes.
18178b5
to
8451a5c
Compare
Have you resolved this issue? |
I haven't resolve this issue, yet. Should we resolve the issue in this PR? |
Yes, let's determine the root cause and resolve the issue causing crash. |
Get re-sending frames effect with the following errors: [ 35.875955] virtio_snd virtio3: virtsnd-tx:id 0 is not a head! [ 36.892059] virtio_snd virtio3: SID 0: failed to flush I/O queue
#define CNFA_IMPLEMENTATION | ||
#include "CNFA_sf.h" | ||
|
||
#include "portaudio.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use <portaudio.h>
instead.
|
||
#define VSND_GEN_TX_QUEUE_HANDLER(NAME_SUFFIX, WRITE) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move the common part into an inline function?
@Cuda-Chen, Why did you enable Enable hrtimer in ALSA configurations? |
To make sure whether the hrtimer resolve the stuttering and sending invalid stream ID issues. |
Hi @jserv , I would like to summarize the current progress:
|
Switch to PortAudio for cross-platform and cross backend compatibility.
Yet, there are two known limitations for current sound playback implementation:
whole emulator crashes.
Testing
Preparation
make build-image
to build Linux Kernel image and root filesystem.Test Cases
play white noise
test procedures
speaker-test
in emulator shell.expected results
play sequence sound
test procedures
aplay /usr/share/sounds/alsa/Front_Center.wav
in emulator.aplay /usr/share/sounds/alsa/Front_Center.wav
in emulator.expected results
Summary by Bito
This pull request integrates PortAudio to enhance cross-platform audio playback, replacing the previous CNFA submodule. It updates the Makefile for better build configurations, addresses issues like sound loss and system crashes, and improves PCM stream handling and compatibility, while also updating documentation.Unit tests added: False
Estimated effort to review (1-5, lower is better): 2