aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm_utils.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2007-05-22Split pcm_convertAudioFormat into separate functions for bitrate, channel,J. Alexander Treuman1-168/+207
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-05-22Cleaning up/correcting some comments.J. Alexander Treuman1-10/+7
git-svn-id: https://svn.musicpd.org/mpd/trunk@6200 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-22ReindentingJ. Alexander Treuman1-10/+12
git-svn-id: https://svn.musicpd.org/mpd/trunk@6199 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
2007-02-19pcm_utils: fix libsamplerate compilation with non-C99 compilersEric Wong1-4/+12
Mixing code and declarations is ugly, anyways. We could probably get away with using alloca(), but I'm not sure how good compiler support is for that, either. It's probably more supported than mixed declarations and code. Nevertheless; we'll trigger memory checkers on exit because we don't free the buffers; but we won't actually leak because we reuse those buffers (just like the non-SRC code path). git-svn-id: https://svn.musicpd.org/mpd/trunk@5397 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-02-13Fixing some weird floating point comparison issue. Not exactly sure whyJ. Alexander Treuman1-2/+3
this fixes it though. git-svn-id: https://svn.musicpd.org/mpd/trunk@5338 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-02-02Add libsamplerate support, old resampling is still an option, but this ↵Avuton Olrich1-10/+99
sounds much better for those who need it and don't want to use pulseaudio. Reviewed by shank/avuton. git-svn-id: https://svn.musicpd.org/mpd/trunk@5316 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-01-14Don't initialize globals to zero (or NULL)Eric Wong1-4/+4
Some compilers and linkers aren't smart enough to optimize this, as global variables are implictly initialized to zero. As a result, binaries are a bit smaller as more goes in the .bss and less in the text section. git-svn-id: https://svn.musicpd.org/mpd/trunk@5254 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-26Replace strdup and {c,re,m}alloc with x* variants to check for OOM errorsEric Wong1-3/+4
I'm checking for zero-size allocations and assert()-ing them, so we can more easily get backtraces and debug problems, but we'll also allow -DNDEBUG people to live on the edge if they wish. We do not rely on errno when checking for OOM errors because some implementations of malloc do not set it, and malloc is commonly overridden by userspace wrappers. I've spent some time looking through the source and didn't find any obvious places where we would explicitly allocate 0 bytes, so we shouldn't trip any of those assertions. We also avoid allocating zero bytes because C libraries don't handle this consistently (some return NULL, some not); and it's dangerous either way. git-svn-id: https://svn.musicpd.org/mpd/trunk@4690 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-20Add mpd-indent.shAvuton Olrich1-115/+124
Indent the entire tree, hopefully we can keep it indented. git-svn-id: https://svn.musicpd.org/mpd/trunk@4410 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-14[CLEANUP] Remove unused functionAvuton Olrich1-39/+24
Cleanup whitespace->tabs git-svn-id: https://svn.musicpd.org/mpd/trunk@4338 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-14Change shank's email addressJ. Alexander Treuman1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@4333 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-13Huge header update, update the copyright and addAvuton Olrich1-1/+1
the GPL header where necessary git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-10-23wee found the audioFormatConversion bug, was actually a bug in shout pluginWarren Dukes1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@2311 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-10-23ok, resampling and converting to mono no worksWarren Dukes1-27/+41
git-svn-id: https://svn.musicpd.org/mpd/trunk@2309 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-10-23configure shout encoding quality and audio formatWarren Dukes1-26/+49
git-svn-id: https://svn.musicpd.org/mpd/trunk@2307 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-06todo updateWarren Dukes1-2/+0
git-svn-id: https://svn.musicpd.org/mpd/trunk@1352 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-10trash XMMS resampling, use ESD's instead, don't understand it, but it worksWarren Dukes1-34/+22
git-svn-id: https://svn.musicpd.org/mpd/trunk@979 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-10some debug codeWarren Dukes1-2/+9
git-svn-id: https://svn.musicpd.org/mpd/trunk@978 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-10???Warren Dukes1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@977 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-10fix a bug in channel conversionWarren Dukes1-2/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@975 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-10fix computation of conversion buffer sizeWarren Dukes1-7/+26
git-svn-id: https://svn.musicpd.org/mpd/trunk@974 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-10format conversion for 8->16 bis and mono->stereoWarren Dukes1-12/+75
git-svn-id: https://svn.musicpd.org/mpd/trunk@973 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-10resampling code blatantly ripped from xmms, needs testing and need toWarren Dukes1-3/+55
right conversion routines for bit conversion and channel conversion git-svn-id: https://svn.musicpd.org/mpd/trunk@971 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-10more little bits of code in prep for resample/audioFormat conversion,Warren Dukes1-1/+18
now to just write the actual audioFormat conversion code! git-svn-id: https://svn.musicpd.org/mpd/trunk@970 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-14add vim shiznit to end of all source filesWarren Dukes1-0/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@750 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-11adjust scaling of software volumeWarren Dukes1-8/+8
git-svn-id: https://svn.musicpd.org/mpd/trunk@681 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-02use EXIT_SUCCESS and EXIT_FAILUREWarren Dukes1-2/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@591 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-05obotomize mixing a bitWarren Dukes1-6/+8
git-svn-id: https://svn.musicpd.org/mpd/trunk@198 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-04git-svn-id: https://svn.musicpd.org/mpd/trunk@194 ↵Warren Dukes1-5/+3
09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-02-24add copyright notices to filesWarren Dukes1-0/+19
git-svn-id: https://svn.musicpd.org/mpd/trunk@34 09075e82-0dd4-0310-85a5-a0d7c8717e4f