mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 23:55:42 +01:00
Here's a new batch of Debian patches, all from David B. Harris.
- add a "Press Escape to quit" string to alsamixer's title, some uses couldn't figure out how to exit the program (Debian Bug#178393). - hide the cursor, which was missplaced and wasn't goodlooking anyway (Debian Bug#81169). - remove trailing spaces from amixer's output (Debian Bug#177518). - don't ignore second -l/-L flags in aplay (Debian Bug#177521).
This commit is contained in:
parent
1bfb694bf0
commit
53fb81e39b
3 changed files with 52 additions and 41 deletions
|
@ -1029,7 +1029,7 @@ mixer_draw_frame (void)
|
|||
|
||||
/* program title
|
||||
*/
|
||||
sprintf (string, "%s %s", PRGNAME_UPPER, VERSION);
|
||||
sprintf (string, "%s %s (Press Escape to quit)", PRGNAME_UPPER, VERSION);
|
||||
max_len = strlen (string);
|
||||
if (mixer_max_x >= max_len + 4)
|
||||
{
|
||||
|
@ -1567,6 +1567,7 @@ mixer_init_window (void)
|
|||
/* initialize ncurses
|
||||
*/
|
||||
mixer_window = initscr ();
|
||||
curs_set (0); /* hide the cursor */
|
||||
|
||||
mixer_no_lrcorner = tigetflag ("xenl") != 1 && tigetflag ("am") != 1;
|
||||
|
||||
|
|
|
@ -320,6 +320,7 @@ int main(int argc, char *argv[])
|
|||
};
|
||||
char *pcm_name = "default";
|
||||
int tmp, err, c;
|
||||
int do_device_list = 0, do_pcm_list = 0;
|
||||
snd_pcm_info_t *info;
|
||||
|
||||
err = snd_output_stdio_attach(&log, stderr, 0);
|
||||
|
@ -354,11 +355,11 @@ int main(int argc, char *argv[])
|
|||
version();
|
||||
return 0;
|
||||
case 'l':
|
||||
device_list();
|
||||
return 0;
|
||||
do_device_list = 1;
|
||||
break;
|
||||
case 'L':
|
||||
pcm_list();
|
||||
return 0;
|
||||
do_pcm_list = 1;
|
||||
break;
|
||||
case 'D':
|
||||
pcm_name = optarg;
|
||||
break;
|
||||
|
@ -464,6 +465,15 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
if (do_device_list) {
|
||||
if (do_pcm_list) pcm_list();
|
||||
device_list();
|
||||
return 0;
|
||||
} else if (do_pcm_list) {
|
||||
pcm_list();
|
||||
return 0;
|
||||
}
|
||||
|
||||
err = snd_pcm_open(&handle, pcm_name, stream, open_mode);
|
||||
if (err < 0) {
|
||||
error("audio open error: %s", snd_strerror(err));
|
||||
|
|
Loading…
Reference in a new issue