hdspmixer: Show cardname in window title

When running with more than one card, it isn't obvious which card is
shown.

Store the ALSA cardname in the corresponding class and show it in the
window title upon switching cards.

Also, don't show "(null)" but "(unsaved)" in case the user hasn't
selected a preset file.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Adrian Knoth 2011-03-07 19:03:09 +01:00 committed by Takashi Iwai
parent 1669acbe34
commit 7416c3a83c
6 changed files with 52 additions and 27 deletions

View file

@ -24,6 +24,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string>
#include <alsa/asoundlib.h>
#include <alsa/sound/hdsp.h>
#include <alsa/sound/hdspm.h>
@ -42,7 +43,8 @@ private:
public:
HDSPMixerWindow *basew;
char name[6];
HDSPMixerCard(int cardtype, int id);
std::string cardname;
HDSPMixerCard(int cardtype, int id, char *shortname);
int channels_input, channels_playback, window_width, window_height, card_id;
int channels_output;
int type;