projects
/
profile
/
ivi
/
pulseaudio-panda.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b325e07
)
fix calculation of pa_usec_to_bytes, to make sure that it never returns fractions...
author
Lennart Poettering
<lennart@poettering.net>
Sat, 29 Jul 2006 15:02:53 +0000
(15:02 +0000)
committer
Lennart Poettering
<lennart@poettering.net>
Sat, 29 Jul 2006 15:02:53 +0000
(15:02 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1165
fefdeb5f
-60dc-0310-8127-
8f9354f1896f
src/pulse/sample.c
patch
|
blob
|
history
diff --git
a/src/pulse/sample.c
b/src/pulse/sample.c
index
2e055bf
..
87b2d7a
100644
(file)
--- a/
src/pulse/sample.c
+++ b/
src/pulse/sample.c
@@
-70,7
+70,7
@@
pa_usec_t pa_bytes_to_usec(uint64_t length, const pa_sample_spec *spec) {
size_t pa_usec_to_bytes(pa_usec_t t, const pa_sample_spec *spec) {
assert(spec);
- return (
(double) t * spec->rate / 1000000
)*pa_frame_size(spec);
+ return (
size_t) (((double) t * spec->rate / 1000000)
)*pa_frame_size(spec);
}
int pa_sample_spec_valid(const pa_sample_spec *spec) {