CCMusicPlayer
CCMusicPlayer
CocosDenshionThis interface controls the media player on the device. For Microsoft mobile devices that play music, e.g. Zune and phone, you must not intefere with the background music unless the user has allowed it.
Inheritance: System.Object
Constructors
CCMusicPlayer()
CCMusicPlayer()()
Fields
s_mciError(System.UInt64)
Properties
SoundID(System.Int32)
Volume(System.Single)
Methods
Close()
Close()()
~CCMusicPlayer()
~CCMusicPlayer()()
IsPlaying()
System.Boolean IsPlaying()()
Returns true if any song is playing in the media player, even if it is not one of the songs in the game.
Returns:
System.Boolean
Example
IsPlayingMySong()
System.Boolean IsPlayingMySong()()
Returns true if one of the game songs is playing.
Returns:
System.Boolean
Example
Open(string, int)
Open(string, int)(System.String pFileName, System.Int32 uId)
Parameters:
pFileName
(System.String)uId
(System.Int32)Pause()
Pause()()
Pauses the current song being played.
Example
Play()
Play()()
Play(bool)
Play(bool)(System.Boolean bLoop)
Parameters:
bLoop
(System.Boolean)RestoreMediaState()
RestoreMediaState()()
Resume()
Resume()()
Resumes playback of the current song.
Example
Rewind()
Rewind()()
resets the playback of the current song to its beginning.
Example
SaveMediaState()
SaveMediaState()()
Stop()
Stop()()
Stops playback of the current song and resets the playback position to zero.
Example