aboutsummaryrefslogtreecommitdiffstats
path: root/src/outputBuffer.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup #includes of standard system headers and put them in one placeEric Wong2008-01-031-3/+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
* Make pcm_convertAudioFormat return the buffer size. This is necessaryJ. Alexander Treuman2007-05-261-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
* Reverting to the full lsr API. Turns out the simple API needs all of theJ. Alexander Treuman2007-05-241-1/+2
| | | | | | | | 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
* Split pcm_convertAudioFormat into separate functions for bitrate, channel,J. Alexander Treuman2007-05-221-7/+2
| | | | | | 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
* The massive copyright updateAvuton Olrich2007-04-051-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* #1) fix a few potential deadlock conditons in decode.c when crossfading is ↵Warren Dukes2007-02-111-4/+3
| | | | | | | enabled #2) fix a deadlock condition when attempting to seek if the decoder quit and returned to playerInit() git-svn-id: https://svn.musicpd.org/mpd/trunk@5325 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Don't initialize globals to zero (or NULL)Eric Wong2007-01-141-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
* outputBuffer: avoid out-of-bounds-error in clearOutputBuffer()Eric Wong2006-09-211-3/+3
| | | | | | | I'm still not entirely certain why we index cb->metaChunkSet[] with currentChunk (and not currentMetaChunk), but shank told me that currentChunk is correct... git-svn-id: https://svn.musicpd.org/mpd/trunk@4814 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Replace strdup and {c,re,m}alloc with x* variants to check for OOM errorsEric Wong2006-08-261-1/+1
| | | | | | | | | | | | | | | | | | | 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
* Use AudioCompress for volume normalizationJ. Alexander Treuman2006-07-271-19/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4474 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Do normalization if there's replaygain data but replaygain is offJ. Alexander Treuman2006-07-241-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4445 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Adding on the fly volume normalization support. Code originally from ↵J. Alexander Treuman2006-07-221-0/+20
| | | | | mplayer, ported by syscrash, cleaned up by avuton, and further cleaned up by me (jat). git-svn-id: https://svn.musicpd.org/mpd/trunk@4424 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Add mpd-indent.shAvuton Olrich2006-07-201-77/+84
| | | | | | 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
* Remove useless buffer signedness warnings, useAvuton Olrich2006-07-191-1/+1
| | | | | void * rather than "x char *" git-svn-id: https://svn.musicpd.org/mpd/trunk@4408 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Change shank's email addressJ. Alexander Treuman2006-07-141-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4333 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Huge header update, update the copyright and addAvuton Olrich2006-07-131-1/+1
| | | | | the GPL header where necessary git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Don't rely on memcmp() for structs, padding bits are randomEric Wong2006-04-051-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4016 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* src/outputBuffer.c: bugfix: freeMpdTag(), not just free()Eric Wong2006-03-191-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@3930 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* print out bits in debug message output for OSS and ALSAWarren Dukes2005-03-191-1/+3
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@3104 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* rewrite replaygain code, needs testingWarren Dukes2004-11-021-1/+4
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2482 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* configure shout encoding quality and audio formatWarren Dukes2004-10-231-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2307 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* very minor tweak to clearMetabufferChunksWarren Dukes2004-06-241-5/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1650 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* uber minor tweaksWarren Dukes2004-06-191-3/+4
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1563 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix some streaming metadata issuesWarren Dukes2004-06-091-1/+10
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1416 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* remove "wrap" from buffering control, its not needed, and could potentiallyWarren Dukes2004-06-081-4/+5
| | | | | | create a race condition (but hasn't happened in the last 10 months since this code was written) git-svn-id: https://svn.musicpd.org/mpd/trunk@1397 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* remove metadata debugging codeWarren Dukes2004-06-071-7/+0
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1378 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* bug fix for metadata again, had an extra "!" in mpdTagsAreEqual()Warren Dukes2004-06-071-4/+8
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1371 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* some fixes to metadata stuffWarren Dukes2004-06-071-0/+11
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1370 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* potential bugfixes for handling metadata in player/decoderWarren Dukes2004-06-071-5/+10
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1369 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* harden metadatabufferWarren Dukes2004-06-061-3/+26
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1362 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* spelling fix for avutonWarren Dukes2004-06-061-2/+4
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1361 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* mechanism for updating metadata while decodingWarren Dukes2004-06-061-27/+21
| | | | | | | vorbis comments are updated on the fly for streams need to decode icy metadata buffering of metadata needs to be hardened, to ensure that player has already read a particular metachunk or passed over it git-svn-id: https://svn.musicpd.org/mpd/trunk@1358 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* todo updateWarren Dukes2004-06-061-1/+30
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1352 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fixed seek, its now blocking againWarren Dukes2004-05-301-3/+6
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1237 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix TIcho's seeking while paused bugWarren Dukes2004-05-291-2/+8
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1225 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* undo last changesWarren Dukes2004-05-281-3/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1217 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix seeking more than once when paused, by returning immediatly on dc->seekWarren Dukes2004-05-281-1/+3
| | | | | in sendToOutputBuffer git-svn-id: https://svn.musicpd.org/mpd/trunk@1216 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* do input buffering in while sleeping loop of sending stuff to output bufferWarren Dukes2004-05-211-3/+8
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1125 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* another bug fix for non-blocking seekWarren Dukes2004-05-201-2/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1103 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* non-blocking seeking, needs some testing! (this is not just for streamsWarren Dukes2004-05-191-3/+1
| | | | | but new code for files seeking as well) git-svn-id: https://svn.musicpd.org/mpd/trunk@1099 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* yes! rudimentary stream playing for mp3's!Warren Dukes2004-05-181-0/+6
| | | | | be gentle git-svn-id: https://svn.musicpd.org/mpd/trunk@1051 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* more little bits of code in prep for resample/audioFormat conversion,Warren Dukes2004-05-101-1/+23
| | | | | now to just write the actual audioFormat conversion code! git-svn-id: https://svn.musicpd.org/mpd/trunk@970 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* rewrite outputBuffer'ing abstraction a bit to be more effecient and easierWarren Dukes2004-05-071-24/+42
| | | | | to interface. Also, use outputBuffer abstraction for ogg git-svn-id: https://svn.musicpd.org/mpd/trunk@941 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* new OutputBuffer abstraction stuff, implemented for mp3, now need toWarren Dukes2004-05-071-7/+3
| | | | | implement in other decoders git-svn-id: https://svn.musicpd.org/mpd/trunk@940 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* some begging code of abstracting out some simple buffer routine(s) for decodersWarren Dukes2004-05-071-0/+66
git-svn-id: https://svn.musicpd.org/mpd/trunk@928 09075e82-0dd4-0310-85a5-a0d7c8717e4f