Add a macro to help make a 64-bit value

This commit is contained in:
Chris Robinson 2012-08-19 22:31:55 -07:00
parent 37924887e8
commit f5e0500df4
3 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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

View File

@ -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