Skip to content
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

Initialize a duplex stream properly when using aggregate device #89

Open
ChunMinChang opened this issue May 5, 2020 · 1 comment
Open
Assignees

Comments

@ChunMinChang
Copy link
Member

A problem is found when investigating BMO 1631814.

The properties of a duplex stream are initialized with different devices when we use an internal aggregate device. The AudioUnit with out_dev_info but current_latency_frames and output_source_listener will be set via output_device. The output_device and out_dev_info are different values when we use an internal aggregate device for the duplex stream.

@ChunMinChang ChunMinChang self-assigned this May 5, 2020
@ChunMinChang
Copy link
Member Author

ChunMinChang commented May 12, 2020

I've tested this today. I replace all the devices that bind to the property-changed callbacks in install_device_changed_callback by the aggregate-device that is being used as the duplex device within the cubeb stream. The test I used is in PR #94.

However, after testing, I wonder if it's intended to use the output or input device directly rather than the aggregate device when registering those listeners.

@padenot: In the duplex stream case, do those listeners register with the output or input devices, instead of the aggregate device, on purpose?

The aggregate-device we use for the duplex stream has only one input and only one output. When the output or input is unplugged, we should fire the device-changed event to reinitialized the stream. However, this seems the same as what the current code does. I am not sure if install_device_changed_callback needs to make a change. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant