music.c
changeset 176 fa3cf3b26af4
parent 173 0821a4ea0008
child 177 0108822670c8
equal deleted inserted replaced
175:ec13489b36ba 176:fa3cf3b26af4
   646 #endif
   646 #endif
   647 #ifdef MP3_MUSIC
   647 #ifdef MP3_MUSIC
   648 	    case MUS_MP3:
   648 	    case MUS_MP3:
   649 		SMPEG_enableaudio(music->data.mp3,1);
   649 		SMPEG_enableaudio(music->data.mp3,1);
   650 		SMPEG_enablevideo(music->data.mp3,0);
   650 		SMPEG_enablevideo(music->data.mp3,0);
       
   651 		SMPEG_rewind(music_playing->data.mp3);
   651 		SMPEG_play(music->data.mp3);
   652 		SMPEG_play(music->data.mp3);
   652 		break;
   653 		break;
   653 #endif
   654 #endif
   654 	    default:
   655 	    default:
   655 		Mix_SetError("Can't play unknown music type");
   656 		Mix_SetError("Can't play unknown music type");
   734 		OGG_jump_to_time(music_playing->data.ogg, position);
   735 		OGG_jump_to_time(music_playing->data.ogg, position);
   735 		break;
   736 		break;
   736 #endif
   737 #endif
   737 #ifdef MP3_MUSIC
   738 #ifdef MP3_MUSIC
   738 	    case MUS_MP3:
   739 	    case MUS_MP3:
   739 		if ( position == 0.0 ) {
   740 		if ( position > 0.0 ) {
   740 			SMPEG_rewind(music_playing->data.mp3);
       
   741 		} else {
       
   742 			SMPEG_skip(music_playing->data.mp3, position);
   741 			SMPEG_skip(music_playing->data.mp3, position);
   743 		}
   742 		}
   744 		break;
   743 		break;
   745 #endif
   744 #endif
   746 	    default:
   745 	    default: