aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm_convert.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2012-03-27audio_format: remove SAMPLE_FORMAT_DSD_OVER_USBMax Kellermann1-36/+0
DSD-over-USB should not be a MPD core format, because it is not a "natural" format; it is just a temnporary over-the-wire format. This format has been implemented in pcm_export, and does not need to be supported by pcm_convert.
2012-03-22pcm_dsd: implement DSD to 24 bit USB conversionMax Kellermann1-0/+35
Implements the dCS suggested standard: http://www.dcsltd.co.uk/page/assets/DSDoverUSB.pdf
2012-03-22audio_format: remove the packed S24 formatMax Kellermann1-48/+0
For simplicity, the MPD core should not have to deal with packing. It is rarely used, and those plugins that need it should use the pcm_export library instead.
2012-03-21audio_format: remove the reverse_endian attributeMax Kellermann1-40/+1
Eliminate support for reverse endian samples from the MPD core. This moves a lot of complexity to the plugins that really need it (only ALSA and CDIO currently).
2012-03-21audio_format: remove the format SAMPLE_FORMAT_DSD_LSBFIRSTMax Kellermann1-6/+2
This format is unused since the DSDIFF decoder plugin now reverses the bit order.
2012-03-19audio_format: basic support for DSD-over-USBMax Kellermann1-0/+1
2012-03-01pcm_convert: support the DSD formatMax Kellermann1-0/+27
2012-03-01audio_format: add DSD sample formatMax Kellermann1-0/+2
Basic support for Direct Stream Digital. No conversion yet, and no decoder/output plugin support.
2012-03-01pcm_convert: add method _reset()Max Kellermann1-0/+6
Resets the libsamplerate state. Not being used yet.
2011-10-20pcm_format: implement conversion to floatMax Kellermann1-1/+68
2011-10-20pcm_convert: add function pcm_convert_channels()Max Kellermann1-0/+50
For future internal use.
2011-10-10pcm_pack: pass an "end" pointer instead of a sample countMax Kellermann1-1/+2
2011-10-10pcm_convert: support reverse endian inputMax Kellermann1-0/+14
2011-10-08pcm_convert: fix typo in error messageMax Kellermann1-1/+1
2011-01-29copyright year 2011Max Kellermann1-1/+1
2010-01-16audio_format: support packed 24 bit samplesMax Kellermann1-0/+48
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
2009-12-02audio_format: changed "bits" to "enum sample_format"Max Kellermann1-18/+18
This patch prepares support for floating point samples (and probably other formats). It changes the meaning of the "bits" attribute from a bit count to a symbolic value.
2009-11-12include config.h in all sourcesMax Kellermann1-0/+1
After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
2009-07-23pcm_convert: use GError for error handlingMax Kellermann1-32/+77
Don't abort the whole MPD process when the conversion fails. This has been a denial-of-service attack vector for years.
2009-07-22pcm_byteswap: converted NULL checks to assertionsMax Kellermann1-6/+3
It is illegal to pass a NULL buffer to pcm_byteswap_X(). The result of this is that pcm_byteswap_X() never returns NULL.
2009-07-22pcm_convert: added pcm_convert_state.byteswap_bufferMax Kellermann1-3/+5
Currently, byteswapping is performed on the format_buffer. This can go wrong when this buffer is used twice during one run. Add a separate buffer for swapping the byte order.
2009-07-19Add reverse_endian field to struct audio_format and handle conversionDavid Woodhouse1-0/+19
2009-03-14pcm_convert: return NULL on failureMax Kellermann1-1/+1
Changed "0" to "NULL".
2009-03-13all: Update copyright header.Avuton Olrich1-3/+4
This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
2009-03-02pcm_convert: added 32 bit supportMax Kellermann1-0/+42
All PCM sub libraries have 32 bit support now. Add support to the glue function pcm_convert().
2009-02-17pcm_convert: removed pcm_convert_size()Max Kellermann1-17/+0
The function is unused, since we added the pcm_buffer library.
2009-01-17pcm_convert: return PCM buffer from pcm_convert()Max Kellermann1-29/+27
Removed yet another superfluous buffer layer: return the PCM buffer from pcm_convert() instead of copying PCM data into the caller-supplied buffer.
2009-01-15log, pcm_convert: added return statements after g_error()Max Kellermann1-0/+1
gcc doesn't know that g_error() never returns. Work around the gcc warning.
2009-01-15pcm_convert: removed unused variable "dest_size"Max Kellermann1-4/+2
dest_size is only used in an assertion. Remove its declaration and move the formula into the assertion.
2009-01-08pcm_resample: use pcm_buffer (1/2)Max Kellermann1-16/+14
Return a temporary buffer from pcm_resample_*() and pcm_convert().
2009-01-07pcm_channels: use pcm_bufferMax Kellermann1-2/+6
Replace a "static" buffer with the PCM buffer library.
2009-01-07pcm_format: use the pcm_buffer libraryMax Kellermann1-3/+8
Replace a "static" buffer with the PCM buffer library.
2009-01-07pcm: added pcm_convert_deinit(), pcm_resample_deinit()Max Kellermann1-0/+5
Free memory allocated by libsamplerate when the output or the decoder is closed.
2009-01-07pcm: pass void pointers to PCM functionsMax Kellermann1-5/+4
In generic PCM functions allowing all sample formats, pass a void pointer instead of a char pointer.
2009-01-07pcm_utils: moved conversion code to pcm_convert.cMax Kellermann1-5/+4
All what's left in pcm_utils.h is the pcm_range() utility function, which is only used internally by pcm_volume and pcm_mix.
2009-01-07pcm_format: pass struct pcm_dither_24 to pcm_convert_to_16()Max Kellermann1-1/+1
The function does not need the full pcm_convert_state struct.
2009-01-07pcm_utils: moved code to pcm_format.cMax Kellermann1-126/+1
Moved all code which converts the sample format to a separate library.
2009-01-07pcm_utils: moved code to pcm_mix.cMax Kellermann1-89/+0
Moved the software mixing code (used by crossfading) to a separate library.
2009-01-07pcm_utils: moved code to pcm_volume.cMax Kellermann1-86/+1
Moved the software volume code to a separate library.
2009-01-07pcm_utils: export pcm_range()Max Kellermann1-14/+0
We are going to split the pcm_utils.c library, and pcm_range() will be useful for several sub libraries.
2009-01-03pcm: use GLib instead of utils.hMax Kellermann1-9/+8
2009-01-03pcm_utils: use the custom PRNG for volume ditheringMax Kellermann1-1/+7
Don't use libc's rand() function, because it is slow. Our own trivial linear congruential generator is good enough for dithering.
2008-12-29pcm: use GLib loggingMax Kellermann1-7/+9
2008-12-24pcm_utils: check pcm_convert()==0Max Kellermann1-4/+0
It is illegal to pass an empty audio buffer around. pcm_resample() sometimes seems to result in 0 samples, maybe related to libsamplerate. To work around that problem, add special checks after both pcm_convert() invocations. Removed the pcm_resample()==0 checks from pcm_convert().
2008-12-08pcm_utils: always round up resampling buffer sizeMax Kellermann1-1/+1
libsamplerate produces cracks in the sound output when the destination buffer is too small. This is the case when pcm_convert_size() rounds down. Use ceil(x) instead of floor(0.5+x) there to prevent a buffer overrun.
2008-12-02replaced mpd_likely/mpd_unlikely by G_LIKELY/G_UNLIKELYThomas Jansen1-2/+3
We want to remove gcc.h eventually. This takes care of all the G_LIKELY/G_UNLIKELY macros.
2008-11-11pcm_utils: allow volume levels greater than 100% in pcm_volume()Max Kellermann1-1/+1
Allow pcm_volume() to increase volume.
2008-11-11pcm_volume: added constant PCM_VOLUME_1Max Kellermann1-10/+13
It may be desirable to change the range of integer volume levels (e.g. to 1024, which may utilize shifts instead of expensive integer divisions). Introduce the constant PCM_VOLUME_1 which describes the integer value for "100% volume". This is currently 1000.
2008-10-23pcm_utils: added 24 bit conversion functionsMax Kellermann1-0/+108
24 bit output is as important as 16 bit output. Provide a pcm_convert() implementation which can convert to 24 bit with as little quality loss as possible.