if (!device_)
return;
- cur_samplerate_ = device_->read_config<uint64_t>(ConfigKey::SAMPLERATE);
+ try {
+ cur_samplerate_ = device_->read_config<uint64_t>(ConfigKey::SAMPLERATE);
+ } catch (Error& e) {
+ cur_samplerate_ = 0;
+ }
out_of_memory_ = false;
}
if (!cur_samplerate_)
- cur_samplerate_ = device_->read_config<uint64_t>(ConfigKey::SAMPLERATE);
+ try {
+ cur_samplerate_ = device_->read_config<uint64_t>(ConfigKey::SAMPLERATE);
+ } catch (Error& e) {
+ // Do nothing
+ }
lock_guard<recursive_mutex> lock(data_mutex_);
}
if (!cur_samplerate_)
- cur_samplerate_ = device_->read_config<uint64_t>(ConfigKey::SAMPLERATE);
+ try {
+ cur_samplerate_ = device_->read_config<uint64_t>(ConfigKey::SAMPLERATE);
+ } catch (Error& e) {
+ // Do nothing
+ }
lock_guard<recursive_mutex> lock(data_mutex_);