mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
add pa_ulog2()
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2424 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
103ceaa944
commit
689528045e
1 changed files with 11 additions and 0 deletions
|
|
@ -155,6 +155,17 @@ static inline unsigned pa_make_power_of_two(unsigned n) {
|
|||
return n + 1;
|
||||
}
|
||||
|
||||
static inline unsigned pa_ulog2(unsigned n) {
|
||||
unsigned r = 0;
|
||||
|
||||
while (n) {
|
||||
r++;
|
||||
n = n >> 1;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
void pa_close_pipe(int fds[2]);
|
||||
|
||||
char *pa_readlink(const char *p);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue