[gmpi] Re: Reqs final draft

  • From: "Didier Dambrin" <didid@xxxxxxxxx>
  • To: <gmpi@xxxxxxxxxxxxx>
  • Date: Fri, 14 Jan 2005 03:48:24 +0100

Catching exceptions is great.. when you debug your code.

I was only making an example. My point is that the CPU state that GMPI chooses may not be the state I as an application developer choose. To put it another way, what if the GMPI state is not one that you the plugin developer like. Then the host is going to switch the state to the GMPI state, and then the plugin will change it again (possibly back), then restore it, followed by the host restoring it again.





Ok but let's be practical here - we're all involved in either hosts or plugins in this list - we should be able to tell if most hosts/plugins are using the same FPU flags or not.

Of course the best would be that plugins & hosts are responsible of their own FPU state, but in practice, it's a shared resource, and it costs CPU to change it all the time.




Note that the FPU precision can be critical in some cases. There are fast tricks to truncate floats, and if the precision is not what you expect, they will just not work. But ok, a plugin that uses them will probably set the precision itself for safety.


And more: restoring the FPU state is just a matter of setting it when you know it's a constant. When you don't know, you will first have to read it. Today's hosts render in smaller & smaller slices (considering the user always wants a shorter latency), playing with the FPU state all the time can waste a little CPU - won't be huge, but it's still wasted.

I agree - it is wasted time I want to avoid. I suggest that the host never have to change the state, and that plugins simply assume that the host wants the plugin to run in that state, even if it makes the plugin sound nasty.


Second, if you as the plugin developer really really don't want to run in the state provided by the host, you only have to test it once per processing run. If you don't like the state, then you can do the change and restore. Each subsequent process call you know the state to change to and the state to restore. No more testing, and lighter weight than the host version.


that's what I suggest we set a default FPU state for what most people would like it to be, and then the rest can switch it back & forth before their processing.




----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules:  Please stay on topic.  You are responsible for your own
words.  Please respect your fellow subscribers.  Please do not
redistribute anyone else's words without their permission.

Archive: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: