Closed atoktoto closed 3 years ago
Hey Andrjez, :) You're welcome.
I have heard a click at the end during certain circumstances. I got around this issue by inserting 4 samples of silence at the end of the wav file.
There is an improvement to make here - basically, when using interpolation, we need to read ahead at least 2 samples. so the audio is 2 samples behind. and when the wav file reaches the end, it doesn't play the remaining samples that are in the look ahead/interpolation buffer.
Would be interested to know if this solves your issue, adding extra silence at the end.... Otherwise you could send me the wave file and I will be happy to try to reproduce :) thanks
There is a feature still be implemented which will solve the "extra silence" at end of sample, which hopefully I can sort out soon..
Not sure if thats not an issue on my side but AudioPlaySdWavResmp seems to emit click at the end of a sample. I'm using generic piano samples that end with silence for testing.
Hey Andrjez,
I think this is fixed, can you give it a try?
Not sure if thats not an issue on my side but AudioPlaySdWavResmp seems to emit click at the end of a sample. I'm using generic piano samples that end with silence for testing.
Hey Andrjez,
I think this is fixed, can you give it a try?
I will need a day or two to get around to that but I will :)
I pulled the current master version, updated the usage to the new API but I'm still getting the click. I cannot attach the WAV file directly so I uploaded it here: https://filebin.net/ds1ul8fvaioo4zvg
Ok, cool. I suspect itβs something to do with tags. currently I export wav without any extra info. I think I know how to fix it. Iβll have a look when I get back from camping on Monday :)
Thanks for the feedback, really appreciate your testing, cheers.
That should be fixed now on this branch, feaure/wavheader_datasize - If you'd like to test it, and if it works okay, I'll merge to master branch.
I was able to reproduce the issue initially and after I use the data size from the wav header, the click at the end of the sample is gone, but I never managed to test on the teensy yet. Would be really appreciated if you could confirm, thanks. and thanks for reporting the issue.
I did a quick test on a teensy and the click seems to still be there. BUT, I did it in the context of a larger codebase. I'm using AudioPlayArrayResmp now and loading the files like this:
File file = SD.open(filename);
uint64_t size = file.size();
buf = extmem_malloc(size);
file.read(buf, size);
file.close();
playWav((unsigned int *)buf, size / 2);
Ok, I've applied that fix to the array reader now too, so that code above should hopefully not have a click at the end...
ππ π₯³ No click now π
Thats awesome! π Yay!!!
going to merge this branch to master, and delete the feature branch... :)
First of all thanks for sharing this! Not sure if thats not an issue on my side but AudioPlaySdWavResmp seems to emit click at the end of a sample. I'm using generic piano samples that end with silence for testing.