File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
src/internal_modules/roc_sndio/target_sndfile/roc_sndio Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -259,8 +259,8 @@ bool SndfileSink::has_clock() const {
259259
260260void SndfileSink::write (audio::Frame& frame) {
261261 roc_panic_if (!valid_);
262- const audio::sample_t * frame_data = frame.samples ();
263- size_t frame_size = frame.num_samples ();
262+ const audio::sample_t * frame_data = frame.raw_samples ();
263+ size_t frame_size = frame.num_raw_samples ();
264264 audio::sample_t buffer_data[BUFFER_SIZE];
265265 size_t buffer_pos = 0 ;
266266
Original file line number Diff line number Diff line change @@ -172,10 +172,10 @@ bool SndfileSource::read(audio::Frame& frame) {
172172 roc_panic (" sndfile source: read: non-open input file" );
173173 }
174174
175- audio::sample_t * frame_data = frame.samples ();
175+ audio::sample_t * frame_data = frame.raw_samples ();
176176 size_t num_channels = (size_t )file_info_.channels ;
177- sf_count_t frame_left = (sf_count_t )frame.num_samples ();
178- sf_count_t samples_per_ch = (sf_count_t )(frame.num_samples () / num_channels);
177+ sf_count_t frame_left = (sf_count_t )frame.num_raw_samples ();
178+ sf_count_t samples_per_ch = (sf_count_t )(frame.num_raw_samples () / num_channels);
179179
180180 sf_count_t n_samples = sf_read_float (file_, frame_data, frame_left);
181181 if (sf_error (file_) != 0 ){
@@ -188,7 +188,7 @@ bool SndfileSource::read(audio::Frame& frame) {
188188 }
189189
190190 if (n_samples < samples_per_ch) {
191- memset (frame.samples () + (unsigned long )n_samples * num_channels, 0 ,
191+ memset (frame.raw_samples () + (unsigned long )n_samples * num_channels, 0 ,
192192 (unsigned long )(samples_per_ch - n_samples) * num_channels * sizeof (audio::sample_t ));
193193 }
194194
You can’t perform that action at this time.
0 commit comments