mirror of
https://github.com/alsa-project/alsa-tools.git
synced 2026-02-27 01:40:17 -05:00
hdspmixer: Save preset before switching cards
When running with more than one card, switching cards would lose any changes made to the current card. To avoid this inconvenience, save the current settings to the virtual 9th preset and restore them when switching back. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
0b018d9a23
commit
7a865ce040
5 changed files with 47 additions and 1 deletions
|
|
@ -48,9 +48,11 @@ void HDSPMixerCardSelector::draw()
|
|||
void HDSPMixerCardSelector::ActivateCard (int i)
|
||||
{
|
||||
card = i + 1;
|
||||
basew->stashPreset(); /* save current mixer state */
|
||||
basew->current_card = i;
|
||||
basew->cards[i]->setMode (basew->cards[i]->getSpeed ());
|
||||
basew->setTitleWithFilename();
|
||||
basew->unstashPreset(); /* restore previous mixer state */
|
||||
redraw ();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue