1. 02 Dec, 2008 1 commit
  2. 11 Nov, 2008 2 commits
  3. 23 Oct, 2008 7 commits
  4. 21 Oct, 2008 3 commits
  5. 12 Oct, 2008 5 commits
  6. 10 Oct, 2008 2 commits
  7. 09 Oct, 2008 2 commits
  8. 08 Oct, 2008 1 commit
  9. 29 Sep, 2008 5 commits
    • Max Kellermann's avatar
      pcm_utils: 24 bit support · 6aec6163
      Max Kellermann authored
      Add support for 24 bit PCM samples to all functions.  Note that
      pcm_convertAudioFormat() converts 24 bit samples to 16 bit; to
      preserve full quality, support for "real" 24 bit conversion should be
      added.
      6aec6163
    • Max Kellermann's avatar
      pcm_utils: moved code to special 8/16 bit functions · ac6bc76c
      Max Kellermann authored
      Moved code into separate bit specific functions:
      - pcm_volumeChange() -> pcm_volume_change_X()
      - pcm_add() -> pcm_add_X()
      - pcm_convertTo16bit() -> pcm_convert_8_to_16()
      ac6bc76c
    • Max Kellermann's avatar
      pcm_utils: pass only one buffer size to pcm_mix() · c85b570a
      Max Kellermann authored
      pcm_mix() might overflow the destination buffer if it is smaller than
      the second buffer.  This is ok because the physical buffer size passed
      by cross_fade_apply() is always big enough, but clutters pcm_mix()
      with complicated length checks and contains a dangerous buffer
      overflow pitfall.  Simplify pcm_mix()/pcm_add() and pass only the
      smaller buffer size; let cross_fade_apply() do the memcpy().
      c85b570a
    • Max Kellermann's avatar
      assume stdint.h and stddef.h are available · a7651b9d
      Max Kellermann authored
      Since we use a C99 compiler now, we can assert that the C99 standard
      headers are available, no need for complicated compile time checks.
      Kill mpd_types.h.
      a7651b9d
    • Eric Wong's avatar
      Switch to C99 types (retaining compat with old compilers) · 0352766d
      Eric Wong authored
      Seeing the "mpd_" prefix _everywhere_ is mind-numbing as the
      mind needs to retrain itself to skip over the first 4 tokens of
      a type to get to its meaning.  So avoid having extra characters
      on my terminal to make it easier to follow code at 2:30 am in
      the morning.
      
      Please report any new issues you may come across on Free
      toolchains.  I realize how difficult it can be to build/maintain
      cross-compiling toolchains and I have no intention of forcing
      people to upgrade their toolchains to build mpd.
      
      Tested with gcc 2.95.4 and and gcc 4.3.1 on x86-32.
      0352766d
  10. 28 Sep, 2008 2 commits
    • Max Kellermann's avatar
      pcm_utils: added pcm_range() · 88aaa6b7
      Max Kellermann authored
      Make the code more readable by moving the range checks to pcm_range().
      gcc does quite a good job at optimizing it: the resulting binary is
      exactly the same, although it contains a parametrized shift instead of
      hard-coded boundaries.
      88aaa6b7
    • Max Kellermann's avatar
      pcm_utils: added inline function pcm_dither() · 5b5e46f5
      Max Kellermann authored
      Merge some code into an inline function, so we can optimize it later
      only once.
      5b5e46f5
  11. 07 Sep, 2008 2 commits
    • Max Kellermann's avatar
      audio_format: converted typedef AudioFormat to struct audio_format · f1dd9c20
      Max Kellermann authored
      Get rid of CamelCase, and don't use a typedef, so we can
      forward-declare it, and unclutter the include dependencies.
      f1dd9c20
    • Max Kellermann's avatar
      fix -Wcast-qual -Wwrite-strings warnings · 4dd9d4b2
      Max Kellermann authored
      The previous patch enabled these warnings.  In Eric's branch, they
      were worked around with a generic deconst_ptr() function.  There are
      several places where we can add "const" to pointers, and in others,
      libraries want non-const strings.  In the latter, convert string
      literals to "static char[]" variables - this takes the same space, and
      seems safer than deconsting a string literal.
      4dd9d4b2
  12. 26 Aug, 2008 1 commit
    • 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. 15 Apr, 2008 1 commit
  14. 12 Apr, 2008 4 commits
  15. 26 Mar, 2008 1 commit
    • Max Kellermann's avatar
      use size_t · 27f12c17
      Max Kellermann authored
      When dealing with in-memory lengths, the standard type "size_t" should
      be used.  Missing one can be quite dangerous, because an attacker
      could provoke an integer under-/overflow, which may provide an attack
      vector.
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7205 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      27f12c17
  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