mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
Fix bugs in Music, MusicPlayer
This commit is contained in:
parent
52918909e9
commit
cdddfc059e
|
@ -37,6 +37,11 @@ void Music::release()
|
||||||
_clear();
|
_clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MusicType Music::getType() const
|
||||||
|
{
|
||||||
|
return _internal::getMusicTypeFromMixMusicType(Mix_GetMusicType(_get()));
|
||||||
|
}
|
||||||
|
|
||||||
//static
|
//static
|
||||||
int MusicPlayer::GetDecoderNum()
|
int MusicPlayer::GetDecoderNum()
|
||||||
{
|
{
|
||||||
|
@ -75,6 +80,12 @@ int MusicPlayer::stop()
|
||||||
return Mix_HaltMusic();
|
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)
|
int MusicPlayer::fadeIn(int loops, int ms)
|
||||||
{
|
{
|
||||||
return Mix_FadeInMusic(m._get(), loops, ms);
|
return Mix_FadeInMusic(m._get(), loops, ms);
|
||||||
|
|
|
@ -42,6 +42,7 @@ public:
|
||||||
void rewind();
|
void rewind();
|
||||||
int setPosition(double second);
|
int setPosition(double second);
|
||||||
int stop();
|
int stop();
|
||||||
|
int fadeIn(Music music,int loops,int ms);
|
||||||
int fadeIn(int loops, int ms);
|
int fadeIn(int loops, int ms);
|
||||||
int fadeOut(int ms);
|
int fadeOut(int ms);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user