EchoEffect: Wrong calculation of samples for delay

Bug #1465269 reported by Uwe Klotz
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Undecided
Unassigned

Bug Description

The calculated number of samples based on the delay time is wrong. The actual delay time is only half as long as expected, e.g. setValue(1.0) results in a delay of 500 ms intead of 1000 ms. I noticed this when I tried to implement a bpm-synchronized echo out loop effect for my controller.

EchoEffect::getDelaySamples(): delay_time * sampleRate is the number of sample frames for the delay, but not the total number of samples for a stereo signal. The correct number of samples assuming 2 (= stereo) channels is 2 * delay_time * sampleRate. The following check (delay_samples % 2 == 1) becomes obsolete.

The new SoundSource API explicitly distinguishes between channel-dependent samples and channel-independent (sample) frames. If the rest of the processing pipeline adopts this naming (and drops the implicit assumption of stereo channels) then hopefully we will see fewer of those errors in the future.

Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :
Changed in mixxx:
assignee: nobody → Uwe Klotz (uklotzde)
status: New → In Progress
Changed in mixxx:
status: In Progress → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
RJ Skerry-Ryan (rryan)
Changed in mixxx:
milestone: none → 2.0.0
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/8101

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.