Logo Search packages:      
Sourcecode: ultrastar-ng version File versions  Download package

void CAudio::togglePause ( void   ) 

This methods toggles pause. If paused, it starts playing normally. If it is playing, the music is paused

Definition at line 242 of file audio.cpp.

References isPaused(), and isPlaying().

                              {
      if (isPlaying()){
#ifdef USE_LIBXINE_AUDIO
            if (isPaused())
                  xine_set_param(stream,XINE_PARAM_SPEED,XINE_SPEED_NORMAL);
            else
                  xine_set_param(stream,XINE_PARAM_SPEED,XINE_SPEED_PAUSE);
#endif
#ifdef USE_GSTREAMER_AUDIO
            if (isPaused())
                  gst_element_set_state(music, GST_STATE_PLAYING);
            else
                  gst_element_set_state(music, GST_STATE_PAUSED);
#endif
      }
}


Generated by  Doxygen 1.6.0   Back to index