[LAD] [ANN] LV2 beta3

Steve Harris steve at plugin.org.uk
Thu May 10 14:58:25 UTC 2007


On 10 May 2007, at 08:35, Richard Spindler wrote:

> 2007/5/10, Dave Robillard <drobilla at connect.carleton.ca>:
>> Regarding the one sensible thing you /have/ said:  is sample rate  
>> as a
>> double sufficient, or is there a good reason for numerator/ 
>> denominator
>
> using a double as samplerate is highly undesirable, because for
> example someone might want to test for specific samplerates, like
>
> if ( samplerate == 44100) { ... }
>
> And this cannot be done with a float value with the necessary  
> "exactness". ;-)
>
> I do support the proposal to use two integer values.

I don't support it unless someone has a representation issue. You're  
not like to see if (fs == 44100) anyway, and if you did you'd want to  
hedge a bit: if (fs > 44090 && fs < 44110). If you have to write if  
(fs_num / fs_denom == 44100) then things are bit dodgy anyway.

Whew, a lot of ifs.

- Steve



More information about the Linux-audio-dev mailing list