#NEWLINE# def play( loops = 0 , start = 0.0 ) : #NEWLINE# #INDENT# 'Start the playback of the music stream.\n\n    This will play the loaded music stream. If the music is already playing it\n    will be restarted.\n\n    The `loops` argument controls the number of repeats a music will play.\n    play(5) will cause the music to played once, then repeated five times, for\n    a total of six. If `loops` is -1 then the music will repeat until stopped.\n\n    The `start` argument controls where in the music the song starts playing.\n    The starting position is dependent on the format of music playing.\n    MP3 and OGG use the position as time (in seconds). MOD music it is the\n    pattern order number. Passing a value to `start` will raise a\n    NotImplementedError if it cannot set the start position\n\n    :Parameters:\n        `loops` : int\n            Number of times to repeat music after initial play through.\n        `start` : float\n            Starting time within music track to play from, in seconds.\n\n    ' #NEWLINE# global _frequency , _format , _channels #NEWLINE# mixer . _mixer_init_check ( ) #NEWLINE# if ( not _current_music ) : #NEWLINE# #INDENT# raise base . error ( 'music not loaded' ) #NEWLINE# #UNINDENT# Mix_HookMusicFinished ( _endmusic_callback ) #NEWLINE# Mix_SetPostMix ( _mixmusic_callback , None ) #NEWLINE# ( ready , _frequency , _format , _channels ) = Mix_QuerySpec ( ) #NEWLINE# if Mix_Linked_Version ( ) . is_since ( ( 1 , 2 , 3 ) ) : #NEWLINE# #INDENT# volume = Mix_VolumeMusic ( ( - 1 ) ) #NEWLINE# Mix_FadeInMusicPos ( _current_music , loops , 0 , start ) #NEWLINE# Mix_VolumeMusic ( volume ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if start : #NEWLINE# #INDENT# raise NotImplementedError ( 'music start position requires SDL_Mixer 1.2.3 or later' ) #NEWLINE# #UNINDENT# Mix_PlayMusic ( _current_music , loops )