playmus.c
changeset 333 b5fd2f76ed9c
parent 321 a72a7f07c8f1
child 386 695494546b3c
     1.1 --- a/playmus.c	Thu Aug 10 15:06:40 2006 +0000
     1.2 +++ b/playmus.c	Sun Aug 20 23:25:46 2006 +0000
     1.3 @@ -65,7 +65,7 @@
     1.4  {
     1.5  	char buf[10];
     1.6  
     1.7 -	printf("Available commands: (p)ause (r)esume (h)alt > ");
     1.8 +	printf("Available commands: (p)ause (r)esume (h)alt volume(v#) > ");
     1.9  	fflush(stdin);
    1.10  	scanf("%s",buf);
    1.11  	switch(buf[0]){
    1.12 @@ -78,6 +78,9 @@
    1.13  	case 'h': case 'H':
    1.14  		Mix_HaltMusic();
    1.15  		break;
    1.16 +	case 'v': case 'V':
    1.17 +		Mix_VolumeMusic(atoi(buf+1));
    1.18 +		break;
    1.19  	}
    1.20  	printf("Music playing: %s Paused: %s\n", Mix_PlayingMusic() ? "yes" : "no", 
    1.21  		   Mix_PausedMusic() ? "yes" : "no");