1. 15 Jan, 2009 6 commits
  2. 01 Jan, 2009 1 commit
  3. 21 Nov, 2008 1 commit
  4. 11 Nov, 2008 2 commits
  5. 02 Nov, 2008 1 commit
  6. 26 Oct, 2008 2 commits
  7. 17 Oct, 2008 1 commit
  8. 10 Oct, 2008 1 commit
  9. 29 Sep, 2008 1 commit
  10. 23 Sep, 2008 7 commits
    • Max Kellermann's avatar
      flac: removed FlacData.chunk_length · d42959c5
      Max Kellermann authored
      chunk_length can be converted to a local variable, because it is
      always reset to 0 after it was used.
      d42959c5
    • Max Kellermann's avatar
      flac: merged flacSendChunk() into flac_common_write() · 0c934f9d
      Max Kellermann authored
      Since flacSendChunk() is a trivial function and is only used in one
      location, move the code there.  The advantage is that calling
      decoder_data() directly returns the decoder_command value, so we can
      eliminate one decoder_get_command() call.
      0c934f9d
    • Max Kellermann's avatar
      flac: removed generic sample size support · eeb30110
      Max Kellermann authored
      Support for bit rates except 16 bits (and 8 bits on little endian) has
      always been broken.  Since we added optimized functions for 8, 16,
      24/32 bits, we can remove the generic flac_convert() function.
      Instead of removing it, convert it to a wrapper function for
      flac_convert_*().
      eeb30110
    • Max Kellermann's avatar
      flac: added special functions for 8 and 32 bit · 19971be3
      Max Kellermann authored
      Same optimization for 8 and 32 bit files, like the previous patch for
      16 bit.  Along the way, this patch adds 24 bit FLAC support!
      19971be3
    • Max Kellermann's avatar
      flac: added optimized converter for 16 bit · 8c2bde70
      Max Kellermann authored
      flac_convert_16() runs a lot faster than the generic (and quite buggy)
      function flac_convert().  flac_convert_16() is only used for
      non-stereo files, since there is already flac_convert_stereo16().
      8c2bde70
    • Max Kellermann's avatar
      flac: use signed integers in flac_convert_stereo16() · 7486c150
      Max Kellermann authored
      By mistake, I casted the sample value to uint16_t, which is wrong.
      This patch simplifies the code by using a int16_t pointer instead of
      casting to int16_t* every time.
      7486c150
    • Max Kellermann's avatar
      flac: moved code from flacWrite() to _flac_common.c · 8bcbe90b
      Max Kellermann authored
      There is still a lot of duplicated code in flac_plugin.c and
      oggflac_plugin.c.  Move code from flac_plugin.c to _flac_common.c, and
      use the new function flac_common_write() also in oggflac_plugin.c,
      porting lots of optimizations over to it.
      8bcbe90b
  11. 29 Aug, 2008 2 commits
  12. 26 Aug, 2008 8 commits
    • Max Kellermann's avatar
      added decoder_get_command() · 817a68b2
      Max Kellermann authored
      Another big patch which hides internal mpd APIs from decoder plugins:
      decoder plugins regularly poll dc->command; expose it with a
      decoder_api.h function.
      817a68b2
    • Max Kellermann's avatar
      moved InputPlugin to decoder_api.h · 08bdb43b
      Max Kellermann authored
      InputPlugin is the API which is implemented by a decoder plugin.  This
      belongs to the public API/ABI, so move it to decoder_api.h.  It will
      later be renamed to something like "decoder_plugin".
      08bdb43b
    • Max Kellermann's avatar
      added parameter total_time to decoder_initialized() · 0d8b551c
      Max Kellermann authored
      Similar to the previous patch: pass total_time instead of manipulating
      dc->totalTime directly.
      0d8b551c
    • Max Kellermann's avatar
      added audio_format parameter to decoder_initialized() · 4590a98f
      Max Kellermann authored
      dc->audioFormat is set once by the decoder plugins before invoking
      decoder_initialized(); hide dc->audioFormat and let the decoder pass
      an AudioFormat pointer to decoder_initialized().
      4590a98f
    • Max Kellermann's avatar
      added struct decoder · 154aa496
      Max Kellermann authored
      The decoder struct should later be made opaque to the decoder plugin,
      because maintaining a stable struct ABI is quite difficult.  The ABI
      should only consist of a small number of stable functions.
      154aa496
    • Max Kellermann's avatar
      merged start, stop, seek into DecoderControl.command · 8d3942e0
      Max Kellermann authored
      Much of the existing code queries all three variables sequentially.
      Since only one of them can be set at a time, this can be optimized and
      unified by merging all of them into one enum variable.  Later, the
      "command" checks can be expressed in a "switch" statement.
      8d3942e0
    • Max Kellermann's avatar
      clean up CPP includes · b6909da7
      Max Kellermann authored
      Include only headers which are really required.  This speeds up
      compilation and helps detect cross-layer accesses.
      b6909da7
    • Max Kellermann's avatar
      enable -Wpointer-arith, -Wstrict-prototypes · a383f451
      Max Kellermann authored
      Also enable -Wunused-parameter - this forces us to add the gcc
      "unused" attribute to a lot of parameters (mostly library callback
      functions), but it's worth it during code refactorizations.
      a383f451
  13. 13 Apr, 2008 3 commits
  14. 26 Mar, 2008 1 commit
    • Max Kellermann's avatar
      explicitly downcast · 66fe5806
      Max Kellermann authored
      Tools like "sparse" check for missing downcasts, since implicit cast
      may be dangerous.  Although that does not change the compiler result,
      it may make the code more readable (IMHO), because you always see when
      there may be data cut off.
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7196 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      66fe5806
  15. 26 Jan, 2008 1 commit
  16. 03 Jan, 2008 1 commit
    • Eric Wong's avatar
      Cleanup #includes of standard system headers and put them in one place · cb8f1af3
      Eric Wong authored
      This will make refactoring features easier, especially now that
      pthreads support and larger refactorings are on the horizon.
      
      Hopefully, this will make porting to other platforms (even
      non-UNIX-like ones for masochists) easier, too.
      
      os_compat.h will house all the #includes for system headers
      considered to be the "core" of MPD.  Headers for optional
      features will be left to individual source files.
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7130 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      cb8f1af3
  17. 05 Apr, 2007 1 commit