getIM()->togglePlayPause();
}
+void MainInputManager::play()
+{
+ /* No input, play */
+ if( !p_input )
+ playlist_Play( THEPL );
+ else
+ {
+ if( PLAYING_S != var_GetInteger( p_input, "state" ) )
+ {
+ getIM()->togglePlayPause();
+ }
+ }
+}
+
+void MainInputManager::pause()
+{
+ if(p_input && PLAYING_S == var_GetInteger( p_input, "state" ) )
+ {
+ getIM()->togglePlayPause();
+ }
+}
+
void MainInputManager::toggleRandom()
{
var_ToggleBool( THEPL, "random" );
CONNECT( this, playPauseSignal(), THEMIM, togglePlayPause() );
CONNECT( this, prevSignal(), THEMIM, prev() );
CONNECT( this, nextSignal(), THEMIM, next() );
- CONNECT( this, play(), ActionsManager::getInstance( p_intf ), play() );
+ CONNECT( this, play(), THEMIM, play() );
+ CONNECT( this, pause(), THEMIM, pause() );
CONNECT( this, mute(), ActionsManager::getInstance( p_intf ), toggleMuteAudio() );
CONNECT( this, volumeUp(), ActionsManager::getInstance( p_intf ), AudioUp() );
CONNECT( this, volumeDown(), ActionsManager::getInstance( p_intf ), AudioDown() );
break;
case WM_APPCOMMAND:
cmd = GET_APPCOMMAND_LPARAM(msg->lParam);
- msg_Err( p_intf, "button pressed = %d", cmd);
switch(cmd)
{
case APPCOMMAND_MEDIA_PLAY_PAUSE: