diff options
author | Chris Robinson <[email protected]> | 2009-12-24 15:41:45 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-12-24 15:41:45 -0800 |
commit | 7f0c6629b9ec1ec1cf11dfbd4a6bba43d3cce9e2 (patch) | |
tree | fa004acfd41122045544f621ab920ec0275d44ea /Alc | |
parent | f6ca39403d31b52a0ca10d402d0c0a9e87e1e667 (diff) |
Use a 64-bit value to scale potentially-large numbers
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALu.c | 11 | ||||
-rw-r--r-- | Alc/pulseaudio.c | 2 |
2 files changed, 1 insertions, 12 deletions
@@ -37,17 +37,6 @@ #include "alu.h" #include "bs2b.h" -#if defined(HAVE_STDINT_H) -#include <stdint.h> -typedef int64_t ALint64; -#elif defined(HAVE___INT64) -typedef __int64 ALint64; -#elif (SIZEOF_LONG == 8) -typedef long ALint64; -#elif (SIZEOF_LONG_LONG == 8) -typedef long long ALint64; -#endif - #define FRACTIONBITS 14 #define FRACTIONMASK ((1L<<FRACTIONBITS)-1) #define MAX_PITCH 65536 diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c index a40cfee7..0353dafd 100644 --- a/Alc/pulseaudio.c +++ b/Alc/pulseaudio.c @@ -581,7 +581,7 @@ static ALCboolean pulse_reset_playback(ALCdevice *device) //{{{ /* Server updated our playback rate, so modify the buffer attribs * accordingly. */ - data->attr.minreq = (data->attr.minreq/data->frame_size) * + data->attr.minreq = (ALuint64)(data->attr.minreq/data->frame_size) * data->spec.rate / device->Frequency * data->frame_size; data->attr.tlength = data->attr.minreq * device->NumUpdates; |