aboutsummaryrefslogtreecommitdiffstats
path: root/src/crossfade.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* crossfade: copy chunk.audio_format in !NDEBUGMax Kellermann2009-03-121-0/+10
| | | | | | | | When the destination chunk was empty in cross_fade_apply(), it had no audio_format attached (an attribute which is only used for assertion in the debug build). cross_fade_apply() should assign it the audio_format of the second chunk (if available), otherwise MPD will crash.
* music_pipe: moved struct music_chunk to chunk.hMax Kellermann2009-03-031-1/+1
|
* crossfade: don't use isCurrentAudioFormat()Max Kellermann2009-02-101-2/+3
| | | | | | The crossfading code shouldn't depend on the audio output code. Pass the current audio format to cross_fade_calc() and let it compare directly, instead of using isCurrentAudioFormat().
* pcm_utils: moved code to pcm_mix.cMax Kellermann2009-01-071-1/+1
| | | | | Moved the software mixing code (used by crossfading) to a separate library.
* crossfade: copy tagMax Kellermann2008-11-021-0/+5
| | | | | | If the source chunk has a tag, merge it into the destination chunk. The source chunk gets deleted after that, and this is our last chance to grab the tag.
* music_pipe: no CamelCaseMax Kellermann2008-11-021-8/+8
| | | | Rename all variables and struct members.
* decoder: replaced music_pipe.audioFormat with dc.out_audio_formatMax Kellermann2008-11-021-0/+1
| | | | | | | .. and rename dc.audioFormat to dc.in_audio_format. The music pipe does not need to know the audio format, and its former "audioFormat" property indicated the format of the most recently added chunk, which might be confusing when you are reading the oldest chunks.
* music_pipe: renamed struct output_buffer to struct music_pipeMax Kellermann2008-11-021-1/+2
| | | | .. and rename ob_chunk to struct music_chunk.
* audio_format: renamed sampleRate to sample_rateMax Kellermann2008-10-101-1/+1
| | | | | The last bit of CamelCase in audio_format.h. Additionally, rename a bunch of local variables.
* don't include os_compat.hMax Kellermann2008-10-081-0/+3
| | | | | When there are standardized headers, use these instead of the bloated os_compat.h.
* pcm_utils: pass only one buffer size to pcm_mix()Max Kellermann2008-09-291-3/+17
| | | | | | | | | 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().
* audio_format: converted typedef AudioFormat to struct audio_formatMax Kellermann2008-09-071-2/+2
| | | | | Get rid of CamelCase, and don't use a typedef, so we can forward-declare it, and unclutter the include dependencies.
* moved code to crossfade.cMax Kellermann2008-08-261-0/+62
decode.c should be a lot smaller; start by moving all code which handles cross-fading to crossfade.c. Also includes camelCase conversion.