1. 27 Mar, 2009 4 commits
    • Max Kellermann's avatar
      pulse_mixer: wait for get_volume() operation to complete · 8258457b
      Max Kellermann authored
      The pa_context_get_sink_input_info() function is asynchronous, and
      after it returns, libpulse does not guarantee that the operation has
      completed yet; in fact, it is not likely.  Explicitly wait for the
      operation to complete.
      
      The code for the new pulse_wait_for_operation() function was inspired
      by mplayer and xine code.
      8258457b
    • Max Kellermann's avatar
      mixer_control: don't lock the mutex twice in mixer_failed() · 1a411b1c
      Max Kellermann authored
      The function mixer_failed() expects the mixer mutex to be already
      locked, yet it calls mixer_close(), which attempts to lock the mutex
      again, deadlocking itself.
      1a411b1c
    • Romain Bignon's avatar
      renamed smartstop to single and changed behavior · e7519829
      Romain Bignon authored
      When single mode is enabled, after current song it stops playback,
      or it replay same song if repeat mode is activated.
      e7519829
    • Romain Bignon's avatar
      implements the smartstop feature · e46722b2
      Romain Bignon authored
      The smartstop feature is a way to tell mpd to stop playing after
      current song.
      This patche provides:
      - 'state' command returns 'smartstop' state (1 or 0)
      - 'smartstop' can activate or not the smartstop state
      - when song is terminated, mpd stops playing and smartstop is set to 0
      e46722b2
  2. 26 Mar, 2009 30 commits
  3. 25 Mar, 2009 5 commits
    • Max Kellermann's avatar
      player_thread: wait for decoder before seeking · 209c8a54
      Max Kellermann authored
      When the decoder initialization has not been completed yet, all calls
      to dc_seek() will fail, because dc.seekable is not initialized yet.
      Wait for the decoder to complete its initialization, i.e. until it has
      called decoder_initialized().
      209c8a54
    • Max Kellermann's avatar
      playlist_state: start playing after restore is complete · 1e9659bf
      Max Kellermann authored
      Don't start playback as soon as the "current" song is being loaded
      from the state file.  That is unclean, and leads to an obscure bug: in
      repeat mode, when the song is started (which is yet the last song in
      the list), the playlist code marked the very first song in the
      playlist as "next" song, because the end of the playlist was wrapped.
      
      It's easier to set up the playback after all songs have been loaded,
      and after the random/repeat mode has been set.
      1e9659bf
    • Max Kellermann's avatar
      output_all: synchronize playback with a notify object · 3be1cdf8
      Max Kellermann authored
      Use audio_output_client_notify instead of g_usleep(1ms) in
      audio_output_all_wait() to synchronize with the output_thread.  Signal
      the audio_output_client_notify object in ao_play().
      3be1cdf8
    • Max Kellermann's avatar
      output_all: moved code to audio_output_all_wait() · 933fcf42
      Max Kellermann authored
      Synchronization with the output thread will be implemented in
      output_all.c, not in player_thread.c.  Currently, that's just a simple
      g_usleep(1ms).
      933fcf42
    • Max Kellermann's avatar
      output: protect audio_output.open with the mutex · 4dbf73d8
      Max Kellermann authored
      There was a deadlock between the output thread and the player thread:
      when the output thread failed (and closed itself) while the player
      thread worked with the audio_output object, MPD could crash.
      4dbf73d8
  4. 21 Mar, 2009 1 commit