On Fri, 2011-09-30 at 00:36 +0300, Maarten Bosmans wrote: > Warning bikeshed ahead. > > 2011/9/29 Tanu Kaskinen <tanu.kaskinen at digia.com>: > > --- > > src/pulsecore/sink.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ > > 1 files changed, 58 insertions(+), 0 deletions(-) > > > > diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c > > index a2642b4..53cab32 100644 > > --- a/src/pulsecore/sink.c > > +++ b/src/pulsecore/sink.c > > @@ -2403,6 +2403,46 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse > > pa_usec_t usec = 0; > > size_t sink_nbytes, total_nbytes; > > > > + /* The old sink probably has some audio from this > > + * stream in its buffer. We want to "take it back" as > > + * much as possible and play it to the new sink. We > > + * don't know at this point how much the old sink can > > + * rewind. We have to pick something, and that > > + * something is the full latency of the old sink here. > > + * So we rewind the stream buffer by the sink latency > > + * amount, which may be more than what we should > > + * rewind. This can result in a chunk of audio being > > + * played both to the old sink and the new sink. > > I'd say that these comments can be a bit wider. Coding Style says > about 127 chars. That would be a bit much for a comment block IMHO, > but it would be good to conserve some vertical space here. I'm not against making the comments wider. What width would you be happy with? 100? I propose that something like the following is added to the CodingStyle document so that there won't be any bikeshedding in the future regarding this issue: "The recommended maximum line length of 128 is a bit much for comments. Comments should be wrapped at X characters. If you prefer, comments with only few lines can also use shorter line length, but in order to conserve vertical space, very long comments should always be wrapped at X characters." The latter sentence is there, because I think it reflects the current practice, but it would be ok to me if the second sentence would be dropped, and the recommendation would be to always wrap at X characters. What do others think? Is 100 the best number? Or 80? Or 89? -- Tanu