Skip to main content

dfsdm.getsampleratehz()

Returns the imp’s effective sample rate

Availability

Device
Only available on the imp004m (impOS 38+) and imp006 (impOS 42+)

Returns

Float — the dfsdm sample rate in Hertz

Description

This method calculates the effective sample rate of the dfsdm from the filter parameters and the time taken to obtain the most recent sample. If no samples have yet been obtained, the method will return 0, so to obtain a meaningful value from this method, dfsdm must have been both configured, started and at least one sample collected.