Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
PipeWire
pipewire
Commits
80e063c6
Commit
80e063c6
authored
Nov 14, 2020
by
Wim Taymans
Browse files
pulse-server: add duration to sample
parent
8f1eed6a
Pipeline
#228913
passed with stages
in 1 minute and 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/modules/module-protocol-pulse/pulse-server.c
View file @
80e063c6
...
...
@@ -3769,6 +3769,15 @@ error:
return
res
;
}
static
uint64_t
bytes_to_usec
(
uint64_t
length
,
const
struct
sample_spec
*
ss
)
{
uint64_t
u
;
u
=
length
/
sample_spec_frame_size
(
ss
);
u
*=
SPA_USEC_PER_SEC
;
u
/=
ss
->
rate
;
return
u
;
}
static
int
fill_sample_info
(
struct
client
*
client
,
struct
message
*
m
,
struct
sample
*
sample
)
{
...
...
@@ -3778,7 +3787,7 @@ static int fill_sample_info(struct client *client, struct message *m,
TAG_U32
,
sample
->
index
,
TAG_STRING
,
sample
->
name
,
TAG_CVOLUME
,
&
vol
,
TAG_USEC
,
0
,
/* length */
TAG_USEC
,
bytes_to_usec
(
sample
->
length
,
&
sample
->
ss
),
TAG_SAMPLE_SPEC
,
&
sample
->
ss
,
TAG_CHANNEL_MAP
,
&
sample
->
map
,
TAG_U32
,
sample
->
length
,
...
...
Edmund Wu
@eadwu
mentioned in issue
#379 (closed)
·
Nov 14, 2020
mentioned in issue
#379 (closed)
mentioned in issue #379
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment