Skip to content

Pulseaudio: Update pulseaudio comments#1046

Open
illuusio wants to merge 10 commits intoPortAudio:masterfrom
illuusio:update-pulseaudio-comments
Open

Pulseaudio: Update pulseaudio comments#1046
illuusio wants to merge 10 commits intoPortAudio:masterfrom
illuusio:update-pulseaudio-comments

Conversation

@illuusio
Copy link
Copy Markdown
Collaborator

This pull request addresses concerns regarding the comments in the file by updating several comments within the PulseAudio files.

Copy link
Copy Markdown
Collaborator

@philburk philburk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. These comments are more clear.

{
PaPulseAudio_Lock(stream->mainloop);
/* Pause stream so it stops faster */
/* The stream should be paused to facilitate a quicker cessation
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original comment was more concise and more clear. How were these comments generated?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly with GPT and then altered by hand

@illuusio
Copy link
Copy Markdown
Collaborator Author

illuusio commented Jul 7, 2025

I've made more small adjustments to comments. Now they should be more shorter and precises.

@RossBencina
Copy link
Copy Markdown
Collaborator

@illuusio I have pushed some edits (see my latest commit). Could you please review them? I have some additional remarks which I'll put into a review now.

Copy link
Copy Markdown
Collaborator

@RossBencina RossBencina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added specific review comments on the lines where I think that there are obvious remaining issues. I found a few more minor grammatical issues during review and I will commit those now.

There are still a few places wher ethe code comments which have unclear meaning.

There are a some cases where the code comments indicate half duplex input-only code paths, but the logic of the code seems to activate for both input-only and input+output code paths. I don't know whether the code has a bug or the comments are wrong. Please review the code and the logic and let me know whether you see what I mean. Otherwise I can explain further.

I might have found a bug: missing usleep() call in PaPulseAudio_ReleaseOperation

I fear than many of the GPT translations were hallucinated and not consistent with the intent of the code. I am concerned that you did not already pick this up. Before we finalise the PR please make sure that every comment in the final diff is consistent with your understanding of the code. If there are remaining cases where no one understands the meaning of a comment then the comments can only serve to confuse and we should delete them.

Also please let's work methodically through my review comments, plase don't make other unrelated changes as that will only confuse things further.

PaPulseAudio_UnLock( hostapi->mainloop );

waitOperation --;
wait --;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?BUG: if the earlier comment is correct, and the retry loop runs for seconds/milliseconds, shouldn't there be a call to usleep() here at the end of the loop body?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes there should. Good catch.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this one also

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each PR needs to address a specific issue. Changing code for an unrelated purpose is not appropriate in the current PR. Please factor all of the changes to PaPulseAudio_ReleaseOperation (including both the code and the comments) into a separate PR. The comments in this function may need to be clarified but we can discuss that in the new PR.

while( waitOperation > 0 )
/* Since the primary operations are conducted locally, a wait time
* of 1 to 3 seconds, followed by an additional 1000 milliseconds,
* is deemed sufficient to to detect successful completion or to detect an error.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"to to"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update this one.

@illuusio illuusio force-pushed the update-pulseaudio-comments branch from 0b26a76 to 1bc092c Compare October 25, 2025 07:30
@illuusio
Copy link
Copy Markdown
Collaborator Author

Is this ready to merge?

@illuusio illuusio force-pushed the update-pulseaudio-comments branch 2 times, most recently from 2152cb2 to f62186b Compare November 21, 2025 13:40
@illuusio illuusio force-pushed the update-pulseaudio-comments branch from f62186b to a4e2d5d Compare November 26, 2025 13:28
@RossBencina
Copy link
Copy Markdown
Collaborator

Thanks for the updates. I have deleted two comments that were low-quality and redundant.

Remaining issues:

  • Please factor code and comment changes to PaPulseAudio_ReleaseOperation () into a separate PR as detailed in my review comments today.

  • Please respond to my three unaddressed review comments (for lines 360 and 402). You may need to click the "X hidden conversations. Load more..." button to see them.

@illuusio illuusio force-pushed the update-pulseaudio-comments branch from eddf436 to 35551a7 Compare December 14, 2025 08:58
@illuusio
Copy link
Copy Markdown
Collaborator Author

Thanks for the updates. I have deleted two comments that were low-quality and redundant.

Remaining issues:

* Please factor code and comment changes to `PaPulseAudio_ReleaseOperation ()` into a separate PR as detailed in my review comments today.

* Please respond to my three unaddressed review comments (for lines 360 and 402). You may need to click the "X hidden conversations. Load more..." button to see them.

I've decided to remove comment 402 as it does belong there and it's not correct place to comment that. On line 360 I've updated commenting and I've formed new PR (actually 2 to also remove that missedBytes which is not used anywhere and should not be there anymore)

illuusio and others added 9 commits March 28, 2026 09:27
…d for clarity and specificity.

The comments in _PaPulseAudio_ProcessAudio required enhancement;
therefore, the comments have been revised to provide greater specificity
and improved clarity in the English language.
…ated.

The remaining comments in the PulseAudio callback file should be
updated to utilize passive voice and improved English for clarity.
Make more adjustments to pulseaudio cb comments.
As Ringbuffer it does not underrun but it does overrun data.

Co-authored-by: Ross Bencina <rossb@audiomulch.com>
Simplify comment about buffer  size calculation

Co-authored-by: Ross Bencina <rossb@audiomulch.com>
Update unlocking comment wording to more understandable

Co-authored-by: Ross Bencina <rossb@audiomulch.com>
@illuusio illuusio force-pushed the update-pulseaudio-comments branch from 35551a7 to 1fb706f Compare March 28, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants