[RFC][icedtea6-pulse-audio]: Start recording corked.

Omair Majid omajid at redhat.com
Fri Jun 17 12:48:33 PDT 2011

On 06/17/2011 03:41 PM, Denis Lila wrote:
>> We now have two sets of constants for different purposes. Have you
>> thought about prefixing them to indicate if they are stream flags or
>> stream states?
> Good idea. Done. I had to add an argument to the macro that does
> all the work though, to allow java names to have their own
> prefixes.
>>>        const char* dev = NULL;
>>>        if (device != NULL) {
>>>            dev = (*env)->GetStringUTFChars(env, device, NULL);
>>> @@ -468,10 +482,9 @@
>>>                return -1; // oome thrown
>>>            }
>>>        }
>>> - /* Set flags to 0 to fix problem with draining before calling
>>> start, might need to
>>> - be changed back to PA_STREAM_START_CORKED in the future, if we'll
>>> be able to implement
>>> - synchronization*/
>> Ah, so someone had set flags to 0 instead of PA_STREAM_START_CORKED
>> explicitly. Did you test if this is still a problem?
> That comment was from connect_playback, not connect_record.
> connect_playback did (and still does) start streams in
> a corked state. The comment suggests that it used to start the
> stream with NOFLAGS and that this should be changed once proper
> synchronization was implemented. Since the flag was CORKED
> what must have happened was that the author did implement
> proper synchronization but just forgot to remove the comment
> (and also forgot to start recording streams in the corked state).
> Anyway, I didn't test this case, because I didn't change any of
> the playback logic, and because it's pretty clear that if drain()
> is called before start() it will just return almost immediately.
> The same is true of TDL.drain().
> I attached the updated patch.

Thanks for the explanation. Th patch itself looks good to me. Okay for HEAD.


More information about the distro-pkg-dev mailing list