Skip to content

Conversation

@illuusio
Copy link
Collaborator

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

Copy link
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
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
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
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
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
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
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
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
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
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
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
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
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 and others added 10 commits November 26, 2025 15:28
…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 f62186b to a4e2d5d Compare November 26, 2025 13:28
@RossBencina
Copy link
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.

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