aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm/PcmUtils.hxx (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-01-01Copyright year 2015Max Kellermann1-1/+1
2014-01-13copyright year 2014Max Kellermann1-1/+1
2014-01-07pcm/Utils: remove unused function pcm_end_pointer()Max Kellermann1-12/+0
2013-12-22pcm/Traits: add MIN and MAXMax Kellermann1-9/+6
Move from PcmClamp().
2013-12-02pcm/PcmUtils: use the SampleTraits libraryMax Kellermann1-5/+10
2013-12-02pcm/PcmUtils: remove unused function PcmClampN()Max Kellermann1-12/+0
2013-11-22PcmUtils: add function PcmClampN()Max Kellermann1-0/+12
2013-10-30*: update copyright year to 2013Max Kellermann1-1/+1
2013-10-15gcc.h: rename to Compiler.hMax Kellermann1-1/+1
2013-04-09pcm_*: move to src/pcm/Max Kellermann1-0/+0
2013-02-01PcmUtils: remove pcm_range(), use PcmClamp() insteadMax Kellermann1-24/+0
2013-02-01PcmUtils: make PcmClamp() 64-bit-safe, add missing castMax Kellermann1-2/+2
2013-02-01PcmUtils: remove unused clamp functionsMax Kellermann1-14/+0
2013-02-01PcmFormat: merge duplicate code with a templateMax Kellermann1-15/+24
2013-01-31pcm_*: convert to C++Max Kellermann1-3/+4
2013-01-30TagPool, ...: include cleanupMax Kellermann1-13/+13
2011-10-20audio_format: basic support for floating point samplesMax Kellermann1-0/+28
Support for conversion from float to 16, 24 and 32 bit integer samples.
2011-10-19pcm_utils: add function pcm_end_pointer()Max Kellermann1-0/+11
2011-01-29copyright year 2011Max Kellermann1-1/+1
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
2009-11-19pcm_volume: implemented 32 bit supportMax Kellermann1-0/+14
Support 32 bit samples with software mixer.
2009-03-13all: Update copyright header.Avuton Olrich1-6/+7
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-01-07pcm_utils: moved conversion code to pcm_convert.cMax Kellermann1-26/+0
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_utils: moved code to pcm_mix.cMax Kellermann1-3/+0
Moved the software mixing code (used by crossfading) to a separate library.
2009-01-07pcm_utils: moved code to pcm_volume.cMax Kellermann1-19/+0
Moved the software volume code to a separate library.
2009-01-07pcm_utils: export pcm_range()Max Kellermann1-0/+16
We are going to split the pcm_utils.c library, and pcm_range() will be useful for several sub libraries.
2008-11-11pcm_volume: added constant PCM_VOLUME_1Max Kellermann1-1/+6
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-11-11pcm_utils: added inline function pcm_float_to_volume()Max Kellermann1-0/+10
2008-10-31added prefix to header macrosMax Kellermann1-2/+2
"LOG_H" is a macro which is also used by ffmpeg/log.h. This is ffmpeg's fault, because short macros should be reserved for applications, but since it's always a good idea to choose prefixed macro names, even for applications, we are going to do that in MPD.
2008-10-23pcm_utils: moved code to pcm_resample.cMax Kellermann1-14/+2
Separate the resampling code from the rest of pcm_utils.c. Create two sub-libraries: pcm_resample_libsamplerate.c and pcm_resample_fallback.c.
2008-10-23pcm_dither: added generic 24 to 16 bit ditheringMax Kellermann1-0/+4
Copied and adapted code from the mp3 decoder plugin. This library now replaces the old and low-quality function pcm_convert_24_to_16().
2008-10-21pcm_utils: added pcm_convert_init()Max Kellermann1-0/+2
Instead of manually calling memset(0) on the pcm_convert_state struct, client code should use a library function from pcm_utils.c. This way, we can change the semantics of the struct easily.
2008-10-21pcm_utils: no CamelCaseMax Kellermann1-9/+11
Renamed all functions which were still in CamelCase.
2008-10-21pcm_utils: renamed ConvState to struct pcm_convert_stateMax Kellermann1-3/+4
No CamelCase, and a struct instead of a typedef.
2008-09-29pcm_utils: pass only one buffer size to pcm_mix()Max Kellermann1-2/+2
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().
2008-09-29assume stdint.h and stddef.h are availableMax Kellermann1-2/+2
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.
2008-09-29Switch to C99 types (retaining compat with old compilers)Eric Wong1-3/+3
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.
2008-09-07audio_format: converted typedef AudioFormat to struct audio_formatMax Kellermann1-7/+9
Get rid of CamelCase, and don't use a typedef, so we can forward-declare it, and unclutter the include dependencies.
2008-08-26moved struct AudioFormat to audio_format.hMax Kellermann1-1/+1
We want to expose the AudioFormat structure to plugins; remove some clutter by moving its declaration to a separate header file.
2008-04-15more const pointers in pcm_utils.[ch]Max Kellermann1-3/+4
git-svn-id: https://svn.musicpd.org/mpd/trunk@7360 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-04-12yet more unsigned integersMax Kellermann1-2/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@7287 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-04-12use constant pointers when possibleMax Kellermann1-5/+5
It is a good practice to constify pointers when their dereferenced data is not modified within the functions or its descendants. git-svn-id: https://svn.musicpd.org/mpd/trunk@7234 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-01-03Cleanup #includes of standard system headers and put them in one placeEric Wong1-2/+1
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
2007-11-21A better way to do the last patch (extremely minor patch)Avuton Olrich1-4/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@7042 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-11-21Fix Sun C 5.9 / C99 compatiblityAvuton Olrich1-0/+3
git-svn-id: https://svn.musicpd.org/mpd/trunk@7041 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-26Make pcm_convertAudioFormat return the buffer size. This is necessaryJ. Alexander Treuman1-3/+3
because lsr may return less than the input buffer size, and the rest of the audio code needs to know the new size. This fixes the clicking that was introduced with recent changes to the lsr code. A huge thanks to remiss for figuring this out. git-svn-id: https://svn.musicpd.org/mpd/trunk@6273 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-24Reverting to the full lsr API. Turns out the simple API needs all of theJ. Alexander Treuman1-2/+20
audio at once, so it won't work for us. The old full API code was still heavily broken, as each call to pcm_convertSampleRate() used the same state, even if it was processing two streams of audio. The new code keeps a separate state for each audio stream that's being converted. git-svn-id: https://svn.musicpd.org/mpd/trunk@6255 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-22Split pcm_convertAudioFormat into separate functions for bitrate, channel,J. Alexander Treuman1-6/+5
and samplerate conversion. This makes the code much easier to read, and fixes a few bugs that were previously there. git-svn-id: https://svn.musicpd.org/mpd/trunk@6224 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-05The massive copyright updateAvuton Olrich1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-26Typo fixAvuton Olrich1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@4470 09075e82-0dd4-0310-85a5-a0d7c8717e4f