Re: [AD] Allegro's mixer

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Robert Jr Ohannessian wrote:

long long should be fine in interrupt context - as long as the data isn't modified both inside and outside the interrupt simultaneously. At this point, it would be possible for half the operation to break. As long as the operation result isn't committed to memory, there shouldn't be any problems though, as registers are saved across interrupts.


The only issue I have against using a 64-bit buffer, then, is speed implications. AFAIK, DOS doesn't touch the final buffer outside of the timer, since it writes first to the mix_buffer, which isn't touched outside of the mixer functions, and then to the driver-provided buffer, which would more than likely be the DMA buffer under DOS.

That said, there's no way to force the compiler to store intermediaries in registers, so unless we explicitly provide locks on the sample data, we should either: - Keep the code 386 compatible, for all 3 people on the planet who still use those.
- Make the behavior explicitly undefined.


I was under the impression that the sample data was locked? Unless you mean unwriteable. I was also under the impression those 64-bit warnings applied to the 386 and up, not just the 386. I personally would not object to requiring a 486 to use Allegro in interrupt driven OSs. If someone has a 386, I don't think they'd need anything more than Allegro 3.11 functionality anyway.

- Kitty Cat




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/