MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / sr_samplerate_string

Function sr_samplerate_string

libsigrok4DSL/strutil.c:146–149  ·  view source on GitHub ↗

* Convert a numeric samplerate value to its "natural" string representation. * * E.g. a value of 3000000 would be converted to "3 MHz", 20000 to "20 kHz", * 31500 would become "31.5 kHz". * * @param samplerate The samplerate in Hz. * * @return A malloc()ed string representation of the samplerate value, * or NULL upon errors. The caller is responsible to g_free() the * memo

Source from the content-addressed store, hash-verified

144 * memory.
145 */
146SR_API char *sr_samplerate_string(uint64_t samplerate)
147{
148 return sr_si_string_u64(samplerate, "Hz");
149}
150
151/**
152 * Convert a numeric samplecount value to its "natural" string representation.

Callers 8

meta_genMethod · 0.85
print_samplerateMethod · 0.85
create_archiveFunction · 0.85
gen_headerFunction · 0.85
gen_headerFunction · 0.85
gen_headerFunction · 0.85
test_samplerateFunction · 0.85

Calls 1

sr_si_string_u64Function · 0.85

Tested by 1

test_samplerateFunction · 0.68