Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: 32 bit (floating-point) playback in foobar (Read 7029 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

32 bit (floating-point) playback in foobar

I was wondering if it was possible to implement the 32 bit (floating-point=unpacked) playback mode in foobar. In my case (I’m using EWX 24/96) it seems that this mode is better (consumes for example fewer resources) that the 24 bit mode; quote from the manual:
“….the drivers support another, special data transport format, called “32 Bit unpacked”.
For the curious: audio data streams are sent over the PCI bus to the main memory. The PCI bus operates on 32 “channels” (32 Bit). So a PC usually pays special attention that all of it’s resources get used for the task at hand, and so for the transport of 8 Bit audio files they are bundled into fours (4 x 8 = 32), with 16 Bit and 16 Bit data into bundles of two (2 x 16 = 32) so that they can be sent along.
With 24 bit audio material the situation becomes more complicated to process: all of a sudden there are “only” 24 harmonious bits there - then 8 are “missing” completely.
The “24 Bit packed” method solves this in the following way: the CPU (let’s say a
Pentium) splits the 24 Bit stream into multiples of 32 (diagram middle). That costs power and doesn’t have to be.
Using the “32 Bit unpacked” method the rest of the 24 data-bits are filled with zeros by the hardware and sent by the driver as an appropriate 32 Bit packet. Most of the software on the market today supports this resource saving method.”

Any suggestions are welcome….

32 bit (floating-point) playback in foobar

Reply #1
Quote
(floating-point=unpacked)

I'm not quite sure this is true.

For the rest, it seems you've got a solid point. Why have foobar convert to 24bit and then have the driver convert back to 32bit? Just sending the 32bit word saves some hassle.

Probably, the soundcard will however simply truncate the 32bit word. In theory, it would thus be better to let foobar do some dithering first, and then to send the dithered 24bit words with 8 zero's appended.

I don't know if this difference matters in practice. Basically, you probably started with 16bit CD-audio, so either truncating or dithering to 24bit, you won't loose any significant information. Not dithering could however cause distortion on some sounds.

Since I have not really been into the subject lately, better wait for some expert opinions...

32 bit (floating-point) playback in foobar

Reply #2
I highly doubt that 32 bit unpacked mode equates to float samples, but rather 32 bit integers.

32 bit (floating-point) playback in foobar

Reply #3
Yes, I think so too.

But then still, a 32bit float to 32bit integer conversion is simpler than the whole dithering process to 24bit. So if[/] it doesn't matter audibly (which statement I won't dare to make without further looking into it), one could just send 32bit integer words to the dac and have them truncated there.

32 bit (floating-point) playback in foobar

Reply #4
The 32bit mode of the TerraTec is simply 24bit with an extra zero byte appended (to the front or back, I can't rememember which), which makes it easier to send over the PCI bus. So it does have an advantage over standard 24bit, but it would not be easier on the software side (possibly even very slightly more complicated).

32 bit (floating-point) playback in foobar

Reply #5
Quote
The 32bit mode of the TerraTec is simply 24bit with an extra zero byte appended (to the front or back, I can't rememember which), which makes it easier to send over the PCI bus.


True, that's what bigahoona was saying.

Quote
So it does have an advantage over standard 24bit, but it would not be easier on the software side (possibly even very slightly more complicated).


I don't see how you conclude that to be so.
For most DACs, at least at chip-level, it doesn't matter if you throw longer words at them. You set the chip to read 24bit words, starting at every word clock pulse. When it has 24 bits in its registers it performs conversion, and totally misses the surplus 8 bits, be it zero's or valid data. If you could fit 40bit words into the same time interval, it would still read only 24 bits and drop the other 16.

Ofcourse, there could still be a problem at the receiver chip or driver level. But since Terratec says 32bit is a supported mode, things should be just fine. I quote from bigahoona's post: "Most of the software on the market today supports this resource saving method..." which implies that Terratec drivers work well together with software that passes 32bit audio to it.

Now, to foobar. If I have understood well, it does
[decompression: 32bit float] > [32bit int] > [dithering: 16/24bit int]

So stopping at 32bit int (not at float as bigahoona suggested) will save you some time theoretically.

Still leaving the question open if you would want to miss the dithering... With a 16bit soundcard you shouldn't, but since this is about an EWX... I'd think the distortions that occur when not dithering in the 24bit conversion are well below EWX noise floor. Anyone?

32 bit (floating-point) playback in foobar

Reply #6
Quote
I'd think the distortions that occur when not dithering in the 24bit conversion are well below EWX noise floor. Anyone?

I think so. I even believe that this would be true for the best DAC you could get.

32 bit (floating-point) playback in foobar

Reply #7
Quote
I highly doubt that 32 bit unpacked mode equates to float samples, but rather 32 bit integers.

I think I did a wrong assumption, so let’s try to clarify things: the WAV file format supports various 24 bit encodings - most common are the 32 bit variants 16.8 float and 0.24 normalized float, plus 24 bit integer (packed). For example: CoolEdit Pro performs best when saving as 16.8 float, its internal data representation. In general, it is wise to use the internal data format of the software or at any rate something that can be trivially converted. 24 bit packed is the worst possible scheme as the machine internal data representation of any value greater than 16 bits is 32 bits - i.e. the processor does not
have any instructions that could access a 24 bit aligned value in memory. Therefore, 24 bit files have to be converted to/from 32-bit at loading and saving, which makes performance optimizations like memory mapping of files and busmaster transfers impossible.
Transfer to the cards is quite another matter, and generally not under user control. Where 32 bit unpacked is possible, all sane software will choose to use it for the same reason as above - transferring 24 bit over the 32 bit bus involves packing three 24 bit values inside two 32 bit integers (and unpacking the same on the card), whereas 32 bit values can
be copied directly in a busmaster transfer. Further all variants of 32 floats can be used in EWX cards when the Envy24 PCI chip on the card always passes data in a 32-bit unpacked format.

So if it’s possible it will be a good idea implementing the 32 bit unpacked mode in foobar especially for EWX users.

32 bit (floating-point) playback in foobar

Reply #8
Quote
So if it’s possible it will be a good idea implementing the 32 bit unpacked mode in foobar especially for EWX users.


... and probably many others. Many more cards use Envy chips...