Fix bugs in Music, MusicPlayer

This commit is contained in:
Kirigaya Kazuto 2017-07-04 22:48:44 +08:00
parent 52918909e9
commit cdddfc059e
2 changed files with 12 additions and 0 deletions

View File

@ -37,6 +37,11 @@ void Music::release()
_clear();
}
MusicType Music::getType() const
{
return _internal::getMusicTypeFromMixMusicType(Mix_GetMusicType(_get()));
}
//static
int MusicPlayer::GetDecoderNum()
{
@ -75,6 +80,12 @@ int MusicPlayer::stop()
return Mix_HaltMusic();
}
int MusicPlayer::fadeIn(Music music, int loops, int ms)
{
m=music;
return fadeIn(loops,ms);
}
int MusicPlayer::fadeIn(int loops, int ms)
{
return Mix_FadeInMusic(m._get(), loops, ms);

View File

@ -42,6 +42,7 @@ public:
void rewind();
int setPosition(double second);
int stop();
int fadeIn(Music music,int loops,int ms);
int fadeIn(int loops, int ms);
int fadeOut(int ms);