Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text-mode UI: Nice display of sound card name #52

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions mpxplay/au_cards/au_cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ void AU_init(struct mpxplay_audioout_info_s *aui)
}else
#endif
{
if(!(aui->card_controlbits&AUINFOS_CARDCNTRLBIT_TESTCARD) && !(aui->card_controlbits&AUINFOS_CARDCNTRLBIT_SILENT)){
if(strcmp(cardselectname, "NUL")!=0 && !(aui->card_controlbits&AUINFOS_CARDCNTRLBIT_TESTCARD) && !(aui->card_controlbits&AUINFOS_CARDCNTRLBIT_SILENT)){
sprintf(sout,"Unknown soundcard (output module) name : %s",cardselectname);
pds_textdisplay_printf(sout);
}
Expand Down Expand Up @@ -349,18 +349,25 @@ void AU_init(struct mpxplay_audioout_info_s *aui)
goto err_out_auinit;
}
if(!aui->card_handler && !(aui->card_controlbits&AUINFOS_CARDCNTRLBIT_SILENT)){
pds_textdisplay_printf("No soundcard found!");
pds_textdisplay_printf("No supported soundcard found!");
goto err_out_auinit;
}
}

#ifdef SBEMU
if(!(aui->card_controlbits&AUINFOS_CARDCNTRLBIT_SILENT))
{
textcolor(LIGHTGRAY);
if(aui->card_select_index)
printf("Selected sound card %d: %s\n", aui->card_select_index, aui->card_handler->shortname);
cprintf("Sound card (index %d): ", aui->card_select_index);
else
printf("Found sound card: %s\n", aui->card_handler->shortname);
cprintf("Sound card: ");

textcolor(LIGHTBLUE);
cprintf("%s", aui->card_handler->shortname);

textcolor(LIGHTGRAY);
cprintf(".\r\n");
}
#endif

Expand Down