tracktion_DeviceManager does not save changed audio setup properly
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 40/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- audio-video-rtc
Research direction
Start in DeviceManager::saveSettings(), around the storage.setXmlProperty(SettingID::audio_device_setup, *audioXml) call the report points at line 704, and in updateOutputsComboBox(), which kicks off the async device start and calls saveSettings too early. Reproduce with MidiRecordingDemo on Windows: switch ASIO drivers, breakpoint saveSettings, and watch it fire before the combo box holds the new selection. Done means the freshly chosen driver is written to Settings.xml and restored on the next run.
Written by the indexing model from the issue text.
Description
Easily reproduceable with the MidiRecordingDemo on Windows with current develop branch:
Just use the audio setup setting and change the combox box to another asio driver -> the previous ASIO driver selection will get saved instead of the current freshly selected one, and never saved again ; resulting in improper driver selection saved and restored on next run in the Settings.xml file for the MidiRecordingDemo app (in C:\Users<user>\AppData\Roaming\MidiRecordingDemo)
This happens because the asynchronous call indirectly call the saving before the new configuration setup is set in combo box:
More precisely:
updateOutputsComboBox() calls indirectly saveSettings() too early when device is about to start, but not after changing the device, resulting in the saveSettings() call to call the the audio setup before the combo new item has changed to the new config.
In order to reproduce and see the stack easily and the problem just set a breakpoint in void DeviceManager::saveSettings()
line 704:
*storage.setXmlProperty (SettingID::audio_device_setup, audioXml);
It will be called 2 times: once at startup, then once after the combo box is changed but too early ....
Hope this helps
PS: I checked that the save/restore code for the device manager works fine on waveform pro 11.0.26 and also 11.1.0 , so the lib code seems to be different / not reusing traktion engine API to handle the DeviceManager? Surprised.
- Dominant language
- C++
- Stars
- 1.5k
- Forks
- 222
- Avg merge
- 15h 44m
- Merged PRs (30d)
- 33
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Tracktion/tracktion_engine
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Tracktion/tracktion_engine#475 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Tracktion/tracktion_engine#476 · 5 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 22/100
Tracktion/tracktion_engine#474 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Tracktion/tracktion_engine#473 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 56/100
Tracktion/tracktion_engine#460 ·
Maintainers usually reply within 1 day
All issues in Tracktion/tracktion_engine
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
eclipse-score/inc_someip_gateway#356 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarperFast/rocksdb-js#945 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day