Skip to content
Permalink
Browse files

playmus.c (Menu): added seek testing cases '0' ... '4':

0 seeks to 0, 1 seeks to 10 secs, and so on.  guarded by SEEK_TEST
ifdefs, not defined by default.
  • Loading branch information
sezero committed Dec 27, 2019
1 parent e0699ba commit 5e6d0953405cc6f8991e60fbc3fa9a3d03b402e1
Showing with 8 additions and 0 deletions.
  1. +8 −0 playmus.c
@@ -64,6 +64,7 @@ void Usage(char *argv0)
fprintf(stderr, "Usage: %s [-i] [-l] [-8] [-r rate] [-c channels] [-b buffers] [-v N] [-rwops] <musicfile>\n", argv0);
}

/*#define SEEK_TEST */
void Menu(void)
{
char buf[10];
@@ -72,6 +73,13 @@ void Menu(void)
fflush(stdin);
if (scanf("%s",buf) == 1) {
switch(buf[0]){
#if defined(SEEK_TEST)
case '0': Mix_SetMusicPosition(0); break;
case '1': Mix_SetMusicPosition(10);break;
case '2': Mix_SetMusicPosition(20);break;
case '3': Mix_SetMusicPosition(30);break;
case '4': Mix_SetMusicPosition(40);break;
#endif /* SEEK_TEST */
case 'p': case 'P':
Mix_PauseMusic();
break;

0 comments on commit 5e6d095

Please sign in to comment.