mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
extend pa_usec_t to 64 bit
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@192 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
a9ca9c4a3b
commit
f05a4ac806
19 changed files with 66 additions and 38 deletions
|
|
@ -59,10 +59,10 @@ size_t pa_bytes_per_second(const struct pa_sample_spec *spec) {
|
|||
return spec->rate*pa_frame_size(spec);
|
||||
}
|
||||
|
||||
uint32_t pa_bytes_to_usec(size_t length, const struct pa_sample_spec *spec) {
|
||||
pa_usec_t pa_bytes_to_usec(size_t length, const struct pa_sample_spec *spec) {
|
||||
assert(spec);
|
||||
|
||||
return (uint32_t) (((double) length/pa_frame_size(spec)*1000000)/spec->rate);
|
||||
return (pa_usec_t) (((double) length/pa_frame_size(spec)*1000000)/spec->rate);
|
||||
}
|
||||
|
||||
int pa_sample_spec_valid(const struct pa_sample_spec *spec) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue