summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/play-memblockq.c
Commit message (Collapse)AuthorAgeFilesLines
* virtual-sink: Fix a crash when moving the sink to a new master right after ↵Tanu Kaskinen2011-02-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | setup. If the virtual sink is moved to a new master right after it has been created, then the virtual sink input's memblockq can be rewound to a negative read index. The data written prior to the move starts from index zero, so after the rewind there's a bit of silence. If the memblockq doesn't have a silence memchunk set, then pa_memblockq_peek() will return zero in such case, and the returned memchunk's memblock pointer will be NULL. That scenario wasn't taken into account in the implementation of sink_input_pop_cb. Setting a silence memchunk for the memblockq solves this problem, because pa_memblock_peek() will now return a valid memblock if the read index happens to point to a hole in the memblockq. I believe this isn't the best possible solution, though. It doesn't really make sense to rewind the sink input's memblockq beyond index 0 in the first place, because now when the stream starts to play to the new master sink, there's some unnecessary silence before the actual data starts. This is a small problem, though, and I don't grok the rewinding system well enough to know how to fix this issue properly. I went through all files that call pa_memblockq_peek() to see if there are more similar bugs. play-memblockq.c was the only one that looked to me like it might be broken in the same way. I didn't try reproducing the bug with play-memblockq.c, though, so I just added a FIXME comment there.
* scache: when playing a sample from the cache make sure not queue them up ↵Lennart Poettering2010-02-211-2/+5
| | | | | | | when the sink is suspended libcanberra already sets the appropriate flags for uncached sample streams, we now need to make sure to set them for cached samples too.
* core: move 'flags' field into 'pa_sink_input_new_data' structure so that ↵Lennart Poettering2009-08-281-1/+1
| | | | hooks can access it
* object: speed up type verification by not relying on strcmp()Lennart Poettering2009-08-211-2/+1
| | | | | | | | | | | | | Instead of using string contents for type identification use the address of a constant string array. This should speed up type verifications a little sind we only need to compare one machine word instead of a full string. Also, this saves a few strings. To make clear that types must be compared via address and not string contents 'type_name' is now called 'type_id'. This also simplifies the macros for declaring and defining public and private subclasses.
* Use LGPL 2.1 on all files previously using LGPL 2Colin Guthrie2009-03-031-1/+1
|
* remove soft volume from pa_sink_input_new_info since it should be handled ↵Lennart Poettering2009-02-041-1/+1
| | | | internally and automatically by the sink input
* make a couple of functions return proper error codesLennart Poettering2009-02-031-1/+1
|
* move flat volume logic into the core. while doing so add n_volume_steps ↵Lennart Poettering2009-01-271-1/+1
| | | | field to sinks/sources
* add new dont_rewind_render flag to allow quick starts of newly created streamsLennart Poettering2009-01-151-1/+1
|
* don't hit an assert if when process_rewind() is called with nbytes=0Lennart Poettering2008-08-041-1/+0
|
* get rid of svn $ keywordsLennart Poettering2008-06-181-2/+0
|
* never hand out more data from a sink input than requested. Otherwise the ↵Lennart Poettering2008-05-271-0/+1
| | | | | | resampler might run for too long and we get a heavy delay/underrun git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2490 fefdeb5f-60dc-0310-8127-8f9354f1896f
* merge glitch-free branch back into trunkLennart Poettering2008-05-151-37/+80
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2445 fefdeb5f-60dc-0310-8127-8f9354f1896f
* merge 'lennart' branch back into trunk.Lennart Poettering2007-10-281-43/+151
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1971 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Add copyright notices to all relevant files. (based on svn log)Pierre Ossman2007-02-131-0/+2
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1426 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Huge trailing whitespace cleanup. Let's keep the tree pure from here on,Pierre Ossman2007-01-041-9/+9
| | | | | | | mmmkay? git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1418 fefdeb5f-60dc-0310-8127-8f9354f1896f
* allow hooking into the process of creating playback streams. To implement ↵Lennart Poettering2006-08-131-9/+18
| | | | | | this I modified the pa_sink_input_new() signature to take a pa_sink_input_new_data structure instead of direct arguments. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1237 fefdeb5f-60dc-0310-8127-8f9354f1896f
* free the memblockq if we decide not to play itLennart Poettering2006-07-291-2/+6
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1167 fefdeb5f-60dc-0310-8127-8f9354f1896f
* introduce pa_play_memblockq() which creates a playback stream and passes the ↵Lennart Poettering2006-07-281-0/+113
data from the memblockq to it. after that is done, frees the memblockq git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1161 fefdeb5f-60dc-0310-8127-8f9354f1896f