Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garbage in audio when exporting tracks #5548

Closed
softrabbit opened this issue Jun 27, 2020 · 5 comments
Closed

Garbage in audio when exporting tracks #5548

softrabbit opened this issue Jun 27, 2020 · 5 comments
Labels

Comments

@softrabbit
Copy link
Member

softrabbit commented Jun 27, 2020

Bug Summary

Exporting tracks leaves a few samples of garbage at the start of the audio files. Might be some buffer that should be cleared after each render but isn't?

Steps to reproduce

Export tracks as 16-bit WAV @ 44100 Hz.

Expected behavior

No garbage at start of audio files.

Actual behavior

Garbage at start of audio files, except for the first one rendered.

Screenshot

Ardour showing a couple of imported tracks:
ardour-shot

Hachoir showing the data for one of the tracks, audio data highlighted in blue:
hachoir

Affected LMMS versions

Master pulled and compiled on 2020-06-27, i.e. LMMS 1.2.1.702 (Linux x86_64, Qt 5.12.4, GCC 9.2.1 20191008)
Libsndfile 1.0.28 could be relevant, too.

@softrabbit softrabbit added the bug label Jun 27, 2020
@thmueller64
Copy link
Contributor

I could not reproduce this behavior with the current master and libsndfile 1.0.28-7. Could you maybe share a project file?

@Spekular Spekular added the response required A response from OP is required or the issue is closed automatically within 14 days. label Jul 1, 2020
@softrabbit
Copy link
Member Author

issue-5548-shorter.mmpz.zip

A few more things I noticed:

  • the garbage seems identical between files from the same export.
  • looks like some degree of oversampling is needed for the bug to pop up, 1x seems to work fine.

Did a rebuild just in case something wasn't right, blowing away and recreating my build and target directories just to be sure before pulling and initing submodules and whatever the wiki says. Same bug still.

@no-response no-response bot removed the response required A response from OP is required or the issue is closed automatically within 14 days. label Jul 1, 2020
@thmueller64
Copy link
Contributor

I can reproduce the behavior now with oversampling > 1. From what I can tell, the issue is that libsamplerate sometimes generates less samples than lmms expects. Could you please try out the draft PR above and check if the problem persists?

@softrabbit
Copy link
Member Author

Cool! I'll check the PR tomorrow or possibly later today.

@softrabbit
Copy link
Member Author

Looks like closing time, the fix is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants