Skip to content

Commit

Permalink
removed unused write_() function
Browse files Browse the repository at this point in the history
  • Loading branch information
Hrick87 committed Dec 14, 2023
1 parent 47516c4 commit 8f9db68
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/internal_modules/roc_sndio/backend_dispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ ISource* BackendDispatcher::open_default_source(const Config& config) {
roc_panic_if_msg(device->type() != DeviceType_Source,
"backend dispatcher: unexpected non-source device");
}

return static_cast<ISource*>(device);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,15 +341,6 @@ bool SndfileSink::open_(const char* driver, const char* path) {
return true;
}

void SndfileSink::write_(const audio::sample_t* samples, size_t n_samples) {
if (n_samples > 0) {
if (sf_write_float(sndfile_output_, samples, (sf_count_t)n_samples)
!= (sf_count_t)n_samples) {
roc_log(LogError, "sndfile sink: failed to write output buffer");
}
}
}

void SndfileSink::close_() {
if (!sndfile_output_) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,13 @@ class SndfileSink : public ISink, public core::NonCopyable<> {
private:
bool setup_buffer_();
bool open_(const char* driver, const char* path);
void write_(const audio::sample_t* samples, size_t n_samples);
void close_();

SNDFILE* sndfile_output_;
SF_INFO sf_info_out_;

core::Array<audio::sample_t> buffer_;
size_t buffer_size_;
sf_count_t buffer_size_;
core::nanoseconds_t frame_length_;
audio::SampleSpec sample_spec_;

Expand Down

0 comments on commit 8f9db68

Please sign in to comment.