On Sunday, 3 September 2017 at 23:30:43 UTC, EntangledQuanta
wrote:
On Sunday, 3 September 2017 at 04:01:34 UTC, Ilya Yaroshenko
wrote:
On Saturday, 2 September 2017 at 03:29:20 UTC, EntangledQuanta
wrote:
On Saturday, 2 September 2017 at 02:49:41 UTC, Ilya
Yaroshenko wrote:
[...]
Thanks. Se
create a 24-bit int? One that for all
practical purposes acts as such? This is for 24-bit stuff
like audio. It would respect endianness, allow for arrays
int24[] that work properly, etc.
Hi,
Probably you are looking for bitpack ndslice topology:
http://docs.algorithm.dlang.io/latest
On Friday, 1 September 2017 at 22:10:43 UTC, Biotronic wrote:
On Friday, 1 September 2017 at 19:39:14 UTC, EntangledQuanta
wrote:
Is there a way to create a 24-bit int? One that for all
practical purposes acts as such? This is for 24-bit stuff like
audio. It would respect endianness, allow for
On Saturday, 2 September 2017 at 03:29:20 UTC, EntangledQuanta
wrote:
On Saturday, 2 September 2017 at 02:49:41 UTC, Ilya Yaroshenko
wrote:
On Friday, 1 September 2017 at 19:39:14 UTC, EntangledQuanta
wrote:
Is there a way to create a 24-bit int? One that for all
practical purposes acts as
On Friday, 1 September 2017 at 19:39:14 UTC, EntangledQuanta
wrote:
Is there a way to create a 24-bit int? One that for all
practical purposes acts as such? This is for 24-bit stuff like
audio. It would respect endianness, allow for arrays int24[]
that work properly, etc.
If you need to
On Saturday, 2 September 2017 at 00:43:00 UTC, Nicholas Wilson
wrote:
On Friday, 1 September 2017 at 22:10:43 UTC, Biotronic wrote:
struct int24 {
ubyte[3] _payload;
this(int x) {
value = x;
}
...
}
You may also want to put an align(1) on it so that you dont
waste 25
On Saturday, 2 September 2017 at 07:20:07 UTC, kinke wrote:
struct int24 {
ubyte[3] _payload;
}
static assert(int24.sizeof == 3);
static assert(int24.alignof == 1);
Making absolute sense. ubytes don't need any specific alignment
to be read efficiently.
Yes, that does make sense. It does
On Saturday, 2 September 2017 at 02:37:08 UTC, Mike Parker wrote:
It's not a bug, but a feature. Data structure alignment is
important for efficient reads, so several languages (D, C, C++,
Ada, and more) will automatically pad structs so that they can
maintain specific byte alignments. On a 32-
On Saturday, 2 September 2017 at 02:37:08 UTC, Mike Parker wrote:
On Saturday, 2 September 2017 at 01:19:52 UTC, EntangledQuanta
wrote:
The whole point is so that there is no wasted space, so if it
requires that then it's not a waste of space but a bug.
Audio that is in24 is 3 bytes per samp
On Saturday, 2 September 2017 at 02:49:41 UTC, Ilya Yaroshenko
wrote:
On Friday, 1 September 2017 at 19:39:14 UTC, EntangledQuanta
wrote:
Is there a way to create a 24-bit int? One that for all
practical purposes acts as such? This is for 24-bit stuff like
audio. It would respect endianness
On Friday, 1 September 2017 at 19:39:14 UTC, EntangledQuanta
wrote:
Is there a way to create a 24-bit int? One that for all
practical purposes acts as such? This is for 24-bit stuff like
audio. It would respect endianness, allow for arrays int24[]
that work properly, etc.
Hi,
Probably you
On Saturday, 2 September 2017 at 01:19:52 UTC, EntangledQuanta
wrote:
The whole point is so that there is no wasted space, so if it
requires that then it's not a waste of space but a bug.
Audio that is in24 is 3 bytes per sample, not 4. Every 3 bytes
are a sample, not every 3 out of 4.
Bas
On Saturday, 2 September 2017 at 00:43:00 UTC, Nicholas Wilson
wrote:
On Friday, 1 September 2017 at 22:10:43 UTC, Biotronic wrote:
On Friday, 1 September 2017 at 19:39:14 UTC, EntangledQuanta
wrote:
Is there a way to create a 24-bit int? One that for all
practical purposes acts as such? This
On Friday, 1 September 2017 at 22:10:43 UTC, Biotronic wrote:
On Friday, 1 September 2017 at 19:39:14 UTC, EntangledQuanta
wrote:
Is there a way to create a 24-bit int? One that for all
practical purposes acts as such? This is for 24-bit stuff like
audio. It would respect endianness, allow for
On Friday, 1 September 2017 at 22:10:43 UTC, Biotronic wrote:
On Friday, 1 September 2017 at 19:39:14 UTC, EntangledQuanta
wrote:
[...]
I haven't looked at endianness beyond it working on my
computer. If you have special needs in that regard, consider
this a starting point:
[...]
Thanks,
On Friday, 1 September 2017 at 19:39:14 UTC, EntangledQuanta
wrote:
Is there a way to create a 24-bit int? One that for all
practical purposes acts as such? This is for 24-bit stuff like
audio. It would respect endianness, allow for arrays int24[]
that work properly, etc.
I haven't look
Is there a way to create a 24-bit int? One that for all practical
purposes acts as such? This is for 24-bit stuff like audio. It
would respect endianness, allow for arrays int24[] that work
properly, etc.
17 matches
Mail list logo