Add a macro to help make a 64-bit value
This commit is contained in:
parent
37924887e8
commit
f5e0500df4
@ -1390,7 +1390,7 @@ static ALint64 pulse_get_latency(ALCdevice *device)
|
||||
{
|
||||
if(neg)
|
||||
latency = 0;
|
||||
return (ALint64)minu64(latency, (((ALuint64)0x7fffffff << 32)|0xffffffff)/1000) * 1000;
|
||||
return (ALint64)minu64(latency, MAKEU64(0x7fffffff,0xffffffff)/1000) * 1000;
|
||||
}
|
||||
ERR("Failed to get stream latency!\n");
|
||||
return 0;
|
||||
|
@ -74,6 +74,8 @@ typedef unsigned long long ALuint64;
|
||||
typedef ptrdiff_t ALintptrEXT;
|
||||
typedef ptrdiff_t ALsizeiptrEXT;
|
||||
|
||||
#define MAKEU64(x,y) (((ALuint64)(x)<<32)|(ALuint64)(y))
|
||||
|
||||
#ifdef HAVE_GCC_FORMAT
|
||||
#define PRINTF_STYLE(x, y) __attribute__((format(printf, (x), (y))))
|
||||
#else
|
||||
|
@ -1828,7 +1828,7 @@ static ALint64 GetSourceOffset(ALsource *Source)
|
||||
BufferList = BufferList->next;
|
||||
}
|
||||
|
||||
return (ALint64)minu64(readPos, ((ALuint64)0x7fffffff<<32)|0xffffffff);
|
||||
return (ALint64)minu64(readPos, MAKEU64(0x7fffffff,0xffffffff));
|
||||
}
|
||||
|
||||
/* GetSourceOffsets
|
||||
|
Loading…
x
Reference in New Issue
Block a user