- if(sr_session_append(SigSession::_sr_session, _file_name.c_str(), data,
- unit_size, end_sample - start_sample) != SR_OK)
- {
+ size_t length = end_sample - start_sample;
+
+ try {
+ SigSession::_sr_session->append(data, length, unit_size);
+ } catch (Error error) {