1. 08 Mar, 2009 2 commits
    • Max Kellermann's avatar
      alsa: determine buffer_time if not already known · ab656a52
      Max Kellermann authored
      This patch fixes a theoretical (but practically impossible) flaw: the
      variable "buffer_time" may be uninitialized when it is used.
      Initialize the variable with snd_pcm_hw_params_get_buffer_time().
      ab656a52
    • Max Kellermann's avatar
      alsa: better period_time default value for high sample rates · 554a34fb
      Max Kellermann authored
      The default values for buffer_time and period_time were both capped by
      the hardware limits on practically all chips.  The result was a
      period_time which was half as big as the buffer_time.  On some chips,
      this led to lots of underruns when using a high sample rate (192 kHz),
      because MPD had very little time to send new samples to ALSA.
      
      A period time which is one fourth of the buffer time turned out to be
      much better.  If no period_time is configured, see how much
      buffer_time the hardware accepts, and try to configure one fourth of
      it as period_time, instead of hard-coding the default period_time
      value.
      
      This is yet another attempt to provide a solution which is valid for
      all sound chips.  Using the SND_PCM_NONBLOCK flag also seemed to solve
      the underruns, but put a lot more CPU load to MPD.
      554a34fb
  2. 07 Mar, 2009 17 commits
  3. 06 Mar, 2009 18 commits
  4. 05 Mar, 2009 3 commits
    • Max Kellermann's avatar
      pipe: added music_buffer, rewrite music_pipe · 01cf7fea
      Max Kellermann authored
      Turn the music_pipe into a simple music_chunk queue.  The music_chunk
      allocation code is moved to music_buffer, and is now managed with a
      linked list instead of a ring buffer.  Two separate music_pipe objects
      are used by the decoder for the "current" and the "next" song, which
      greatly simplifies the cross-fading code.
      01cf7fea
    • Max Kellermann's avatar
      music_pipe: added music_pipe_push() · 000b2d4f
      Max Kellermann authored
      Added music_pipe_allocate(), music_pipe_push() and
      music_pipe_cancel().  Those functions allow the caller (decoder thread
      in this case) to do its own chunk management.  The functions
      music_pipe_flush() and music_pipe_tag() can now be removed.
      000b2d4f
    • Max Kellermann's avatar
      playlist_control: fix requeue after seek · 10be8a87
      Max Kellermann authored
      The queue update after a seek was wrong: the queued song is cleared by
      a successful seek.  This caused queue/cross-fading problems after a
      seek.
      10be8a87