[PATCH v7] pipe-source: implement autosuspend option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20.02.2018 13:11, Georg Chini wrote:
> On 19.02.2018 16:01, Raman Shyshniou wrote:
>> Currently the pipe-source will remain running even if no
>> writer is connected and therefore no data is produced.
>> This patch adds the autosuspend=<bool> option to prevent this.
>> Source will stay suspended if no writer is connected.
>> This option is enabled by default.
>> ---
>> +
>> +    pa_memchunk_reset(&chunk);
>> +    chunk.memblock = pa_memblock_new(u->core->mempool, u->pipe_size);
>
> Further down, you might put some data in the memchunk before the
> read if the previous data was not frame aligned, therefore the memblock
> size must be u->pipe_size + fs.
Looking twice, I see you subtract the index from the read size. 
Nevertheless I
guess it would be simpler to increase the memblock size by one frame.


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux