Impossible to loop short sample !
Impossible to loop short sample "Synth Strings D6.wav" ,
the loop exist , but no sounds, very strange behavior...
here the files, please help .
Can you upload the sample data too (PM me if you don't want to do this publicly)?
It's rather hard to guess what's not working here
chris last edited by chris
Here a short Video demonstrate the problem i also add the SFZ.
Ah, yes it's a duplicate of this long time friend of mine:
Maybe this time I'll actually do something about it
ok thanks for this;)
Did this fix ever get merged?
Nope and now it starts to get embarrassing...
maybe @Cyberdyne387 could provide his fix from the referenced forum thread? I didn't see a github repo in the list of forks. I wondered if maybe its a simple enough fix to copy paste and describe the changes in the issues list or on this thread?
First of all, apologies for taking so long to read this: truth be told, I’ve been pretty swamped with other matters.
UPDATE: found the fixed C++ file. It should hopefully compile fine with the latest source code.
To specify what exactly I changed when it comes to this issue, Christoph wrote a conditional statement in the setPreloadSize function for the circumstance of if the entire length of the sample is too short for the internalPreloadSize, but looping is enabled. What I changed is I added an additional conditional statement checking to see if the loop end point is also smaller than the internalPreloadSize.
As for whether the loop plays at all under a given preloadSize, sadly, loops and loading the entire sample seem to not get along well at this time, so my final change was specifying that entireSampleLoaded be false if the preloadSize is larger than the loop end point. In addition, I also specified the loopChanged function to force-reload the preload buffer in the high chance that you wish to change the loop but not the preload buffer size at a given time.
Hopefully this helps people out.
@cyberdyne387 - thanks for the code. I have diffed it with the current state and it can be merged without problems. However I'd like to test these things a little bit before committing in the codebase - changing this code is like open heart surgery, so every line counts
@christoph-hart Not a problem when it comes to testing the code extensively before committing. I did realize I made a minor mistake in my fix, anyway: the force-reloading of the preload buffer I had only run when the looping is set to enabled, meaning it will play the duration of the sample as a loop even if the last loop change you did was disabling the loop. Fixed on my end now, with the same link.
Alright, I've pushed a fix to this problem.
I ended up rewriting the fix for myself, but at the end I did almost the same things as you
Thanks again for the input!
Just tested your version of the edits for myself, only to need to revert back to my version of StreamingSamplerSound. Both copies of the file work fine when there's no sample start offset, but it appears the one you committed causes the loop to play silence for the duration of the sample start offset
Just install this update Working Perfect, Thanks a lot.....