1. 26 Oct, 2008 1 commit
  2. 23 Oct, 2008 2 commits
    • Max Kellermann's avatar
      mp3: send 24 bit PCM data · 2cc2420f
      Max Kellermann authored
      libmad produces samples of more than 24 bit.  Rounding that down to 16
      bits using dithering makes those people lose quality who have a 24 bit
      capable sound device.  Send 24 bit PCM data, and let the receiver
      decide whether to apply 16 bit dithering.
      2cc2420f
    • Max Kellermann's avatar
      mp3: use sizeof(sample) instead of hard-coded "2" · bf5774ed
      Max Kellermann authored
      We are going to convert the code to 24 bit; don't hard-code a sample
      size of 2 bytes.
      bf5774ed
  3. 17 Oct, 2008 1 commit
  4. 10 Oct, 2008 3 commits
    • Max Kellermann's avatar
      mp3: dither an arbitrary number of channels · f41fe1e0
      Max Kellermann authored
      The mp3 plugin did not use the MAD_NCHANNELS() value correctly: when a
      stream was not stereo, it was assumed to be mono, although the correct
      number was passed to MPD.  libmad doesn't support more than 2
      channels, but this change allows gcc to optimize its inlining
      strategy.
      f41fe1e0
    • Max Kellermann's avatar
      mp3: hard-code dithering to 16 bits · bac13660
      Max Kellermann authored
      The dithering function audio_linear_dither() worked for signed 16 bits
      only anyway, having a variable "bits" just disables important gcc
      optimizations.
      bac13660
    • Max Kellermann's avatar
      audio_format: renamed sampleRate to sample_rate · de2cb3f3
      Max Kellermann authored
      The last bit of CamelCase in audio_format.h.  Additionally, rename a
      bunch of local variables.
      de2cb3f3
  5. 29 Sep, 2008 2 commits
    • Max Kellermann's avatar
      use C99 struct initializers · de7cda1d
      Max Kellermann authored
      The old struct initializers are error prone and don't allow moving
      elements around.  Since we are going to overhaul some of the APIs
      soon, it's easier to have all implementations use C99 initializers.
      de7cda1d
    • 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
  6. 23 Sep, 2008 2 commits
  7. 17 Sep, 2008 1 commit
    • Max Kellermann's avatar
      mp3: fix buffer overflow when max_frames is too large · 913028a7
      Max Kellermann authored
      The function decodeFirstFrame() allocates memory based on data from
      the mp3 header.  This can make the buffer size allocation overflow, or
      lead to a DoS attack with a very large buffer.  Cap this buffer at 8
      million frames, which should really be enough for reasonable files.
      913028a7
  8. 07 Sep, 2008 1 commit
  9. 29 Aug, 2008 2 commits
  10. 26 Aug, 2008 25 commits