Remember Preferred Sound Card

If I run Renoise without my sound card connected, I get a message confirming this and it opens Direct Sound instead… all fine. But when I replug my external sound card and start Renoise it still opens using Direct Sound, and I have to go into preferences to enable it. Would be nice if the settings were restored automatically. Not a big deal, but maybe something for future releases.

This happened once on soundcheck before a gig, and it took a while before I realized why there was no sound. A bit stressful.

Renoise stores data of hardware that is currently present when it starts, there are various situations that can be the case here:
-The harddisk has been moved into a new system containing different hardware.
-The system has been updated or the hardware has been replaced (many people still use an onboard audio card and when the mainboard egts replaced, well so does the soundcard).
-The user preferences has been copied to another system with different hardware (because the user wants to run Renoise on multiple systems using the same preferences wherever possible).
So the behavior that Renoise does by picking the first available option works best in all these cases.

I can give you two advises, an ackward one and a more ideal advise:
The more ackward advise is to hack around this by bluntly kill the Renoise task so that it doesn’t get the chance to save the Direct sound choice as the preferred soundcard.
Then replugin your original soundcard and restart Renoise, the original soundcard should then still be in the preferences so Renoise starts with your soundcard plugged in.

The preferred advise however is create a copy of your preferences, containing the soundcard of preference. Then create a .cmd file which start to first copy the duplicated preference file back to the original one and then starts Renoise after it copied the copy back to the original one.

The advantage of the first one is that specific changes and preferences are always remembered when working with the preferred soundcard (in the second case you always overwrite your preferences file so you would have to make a new duplicate if you have made changes to the preferences), assuming you simply kill a Renoise process that you don’t do anything in since the preferred soundcard was not yet plugged in, in the other case.

The advantage of the second one is that you can close Renoise a little more gracefully without risking anything (like loosing changes).