Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
pulseaudio
pulseaudio
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 804
    • Issues 804
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 55
    • Merge Requests 55
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PulseAudio
  • pulseaudiopulseaudio
  • Issues
  • #1039

Closed
Open
Created Nov 13, 2020 by Chris Cannam@cannam

Documentation does not specify unit for timeout in pa_mainloop_prepare

The API documentation for pa_mainloop_prepare says that the timeout argument specifies a timeout, but doesn't say what unit it is (ms, µs etc). See the online API docs for this function.

This is particularly unfortunate since the meaning of the timeout actually changed in commit:6b1719d0. Previously the value was (apparently mistakenly) treated as µs; since this commit it has been treated as ms. This breaking change might have been unwise, but now it's out there, the proper behaviour should at least be documented.

Here's a possible patch:

--- /usr/include/pulse/mainloop.h	2020-10-31 13:10:54.000000000 +0000
+++ ./mainloop.h	2020-11-13 09:59:36.468544981 +0000
@@ -84,8 +84,8 @@
 void pa_mainloop_free(pa_mainloop* m);
 
 /** Prepare for a single iteration of the main loop. Returns a negative value
-on error or exit request. timeout specifies a maximum timeout for the subsequent
-poll, or -1 for blocking behaviour. .*/
+on error or exit request. timeout specifies a maximum timeout in milliseconds
+for the subsequent poll, or -1 for blocking behaviour. .*/
 int pa_mainloop_prepare(pa_mainloop *m, int timeout);
 
 /** Execute the previously prepared poll. Returns a negative value on error.*/
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
14.0
Milestone
14.0
Assign milestone
Time tracking
None
Due date
None