diff options
Diffstat (limited to 'examples/alstream.c')
-rw-r--r-- | examples/alstream.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/examples/alstream.c b/examples/alstream.c index 121cec00..8d36366d 100644 --- a/examples/alstream.c +++ b/examples/alstream.c @@ -315,10 +315,19 @@ int main(int argc, char **argv) /* Play each file listed on the command line */ for(i = 1;i < argc;i++) { + const char *namepart; + if(!OpenPlayerFile(player, argv[i])) continue; - printf("Playing %s (%s, %s, %dhz)\n", argv[i], + /* Get the name portion, without the path, for display. */ + namepart = strrchr(argv[i], '/'); + if(namepart || (namepart=strrchr(argv[i], '\\'))) + namepart++; + else + namepart = argv[i]; + + printf("Playing: %s (%s, %s, %dhz)\n", namepart, TypeName(player->type), ChannelsName(player->channels), player->rate); fflush(stdout); |