Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

tracktion_DeviceManager does not save changed audio setup properly

Open
#27 0 comments 0 reactions 0 assignees View on GitHub

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

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Tracktion/tracktion_engine

All issues in Tracktion/tracktion_engine

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.