1. 26 Mar, 2009 6 commits
    • Max Kellermann's avatar
      oss_mixer: make "device" and "control" const · aec4fe06
      Max Kellermann authored
      Use config_get_block_string() instead of config_dup_block_string().
      aec4fe06
    • Max Kellermann's avatar
      mixer: don't reopen failed mixer automatically · 69759b57
      Max Kellermann authored
      If a (global) mixer has been closed due to failure, don't reopen it
      with every volume get/set.  Leave it closed until it is explicitly
      opened.
      69759b57
    • Max Kellermann's avatar
      mixer_control: close mixer on failure · 1fcf09a8
      Max Kellermann authored
      When getting or setting the volume fails, the MPD core close the
      mixer.  Moved the duplicated code from the mixer plugins.
      1fcf09a8
    • Max Kellermann's avatar
      mixer: added flag "open" · 617a4fd2
      Max Kellermann authored
      Remember if a mixer object is open or closed.  Don't call open() again
      if it is already open.  This guarantees that the mixer plugin is
      always called in a consistent state, and we will be able to remove
      lots of checks from the implementations.
      
      To support mixers which are automatically opened even if the audio
      output is still closed (to set the volume before playback starts),
      this patch also adds the "global" flag to the mixer_plugin struct.
      Both ALSA and OSS set this flag, while PULSE does not.
      617a4fd2
    • Max Kellermann's avatar
      mixer_control: don't allow mixer==NULL · 7475ded9
      Max Kellermann authored
      As a side effect, the previous patch added the mixer==NULL checks.  It
      is now illegal to call mixer functions with a NULL argument.  Convert
      the runtime checks to assertions.
      7475ded9
    • Max Kellermann's avatar
      output_plugin: replaced output_plugin.get_mixer() with mixer_plugin · 66a2c566
      Max Kellermann authored
      The mixer core library is now responsible for creating and managing
      the mixer object.  This removes duplicated code from the output
      plugins.
      66a2c566
  2. 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
  3. 21 Mar, 2009 1 commit
  4. 20 Mar, 2009 2 commits
  5. 17 Mar, 2009 7 commits
  6. 16 Mar, 2009 8 commits
  7. 15 Mar, 2009 11 commits