Re: [Jack-Devel] JACK 1.9.10 to test (for 64/32 bits compatibility)

PrevNext  Index
DateMon, 07 Jan 2013 19:52:49 +0000
From John Emmas <[hidden] at tiscali dot co dot uk>
ToJACK List <[hidden] at lists dot jackaudio dot org>
In-Reply-ToAdrian Knoth Re: [Jack-Devel] JACK 1.9.10 to test (for 64/32 bits compatibility)
Follow-UpPaul Davis Re: [Jack-Devel] JACK 1.9.10 to test (for 64/32 bits compatibility)
On 7 Jan 2013, at 19:05, Adrian Knoth wrote:

> 
> Let's have a look:
> 
>    typedef JACK_ALIGNED_TYPE(double)   jack_double;
>    typedef JACK_ALIGNED_TYPE(int64_t)  jack_int64_t;
>    typedef JACK_ALIGNED_TYPE(uint64_t) jack_uint64_t;
> 
> So three types. We know how large (u)int64_t is. We can also pretend
> that double is 4 bytes wide. I know it's ugly, but we could hardcode
> these values to get rid of the sizeof() operator.
> 
> If nothing helps, we could leverage the build system for a compile-time
> check of sizeof(double) if somebody feels uneasy with simply harcoding
> "4".
> 

Interesting point.  I think that double is typically 80-bit precision so there's a good chance that it's going to be 10 or perhaps 12 bytes.  Maybe someone could check for GCC but I know that for MSVC, neither 10 nor 12 are valid alignment specifications (alignment values must be a power of 2).

I'll keep giving this some thought but at the moment, my feeling is that this ain't gonna work guys  :-(

John
PrevNext  Index

1357588380.29372_0.ltw:2,a <6F627FED-1103-44B1-8A90-C3765ABBAE57 at tiscali dot co dot uk>