Board index » delphi » Re: Mitov newbie - SORTED

Re: Mitov newbie - SORTED


2006-08-16 07:10:34 PM
delphi12
Boian's colleague Jonathan Benedicto has worked {*word*156} this and sorted out
the problem.
It was caused by my having the compiler Record Alignment set to 1, whereas
the Mitov components are compiled with the alignment set to 8.
For some reason this causes the build to fail with the error:
F2502 Unit ALAudioIn was compiled with a different version of OWPins.TOWPin
...which is misleading and unhelpful.
Note that Delphi defaults to a record alignment of 1, so if you experience
odd problems with the Mitov components try setting it to 8.
I've suggested to Boian that a note of this is added to the documentation
for the Mitov components.
My thanks to Jonathan Benedicto for identifying the problem, and to Boian
Mitov for a superb set of components.
Thack
 
 

Re: Mitov newbie - SORTED

My apologies. Delphi 2006, at least, defaults to a record alignment of 8,
not 1 as I stated.
Boian suspects that importing the project from D5 maybe caused the alignment
problem.
Anyway, my apologies to Boian and everyone else for my mistake on the record
alignment. Just for the record, leave it at the default 8 if you're using
Boian's components.
My thanks once again to Boian and Jonathan.
Thack
 

Re: Mitov newbie - SORTED

Quote


Note that for audio programming one should ALWAYS use at least an
alignment of 8 and even better 16 (MMX, SSE etc) because the generated
code will be - maybe unexpected for beginners! - much, much faster (more
twice as fast!) Most commercial code is already 8, often 16 byte
aligned. You can use fastmm to do that automatically for you by means of
a switch.
And by the way: Delphi defaults to 8!! out of the box. If yours doesn't
you have saved 1 as the default! yourself. A not so clever attempt to
save on codesize :) (Most variables are allocated on 4 byte (dword)
boundaries anyway, regardless the setting.