demo: support setting sample rate

This commit is contained in:
Bert Vermeulen 2011-02-04 06:28:49 +01:00
parent 904e0b589e
commit d81d29333e
1 changed files with 5 additions and 1 deletions

View File

@ -176,7 +176,11 @@ static int hw_set_configuration(int device_index, int capability, void *value)
device_index = device_index; device_index = device_index;
if (capability == SR_HWCAP_PROBECONFIG) { if (capability == SR_HWCAP_PROBECONFIG) {
/* Nothing to do. */ /* Nothing to do, but must be supported */
ret = SR_OK;
} else if (capability == SR_HWCAP_SAMPLERATE) {
tmp_u64 = value;
cur_samplerate = *tmp_u64;
ret = SR_OK; ret = SR_OK;
} else if (capability == SR_HWCAP_LIMIT_SAMPLES) { } else if (capability == SR_HWCAP_LIMIT_SAMPLES) {
tmp_u64 = value; tmp_u64 = value;