-
Notifications
You must be signed in to change notification settings - Fork 316
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
Clic-noise for first playback after class initialization #626
Comments
It is possible that there is still (or random) data in the DMA buffer after the audio object has been created. i2s_zero_dma_buffer() should always be called. Hope this helps. |
Hi Wolle, Thank you very much! |
I can confirm that the click-noise when changing the file position has been fixed with the latest commit. |
Thanks a lot for your fast response! I tried both, replacing my work-a-round by a It looks like others had similar issues, confer earlephilhower/ESP8266Audio#406 Line 209 in 961b320
|
update: I did a naiive try by just setting |
After few hours of digging last evening I've found that m_filterBuff is not initialized with zeroes, which means that it will contain random content after Audio object initialization. The filter will be correctly populated after first sample, which is why you've noise/buzz at first playback. The solution is to fill this buffer with zeroes from the constructor or maybe even better from the stopSong method |
@drtrigon It looks like my PR has been merged, please update your library and check if the issue has been resolved |
@cziter15: I updated to master and while I did no extensive testing it seems to work now as expected (without the work-a-round mentioned). Thanks a lot for your effort and for pinging me! |
I am working on a small project https://github.com/drtrigon/singsang. Thanks a lot for your library as it is very useful and usually working well!
As I implemented recording I need to change I2S config during runtime. ESP32-audioI2S does all the I2S config in the constructor thus I have to destroy and re-create the class.
In the beginning of the first playback I always get a quite strong clic-noise. As I figured out this is most probably related to setting the volume to some non-zero value. I found a work-a-round, as can be seen in drtrigon/singsang@38f5952#diff-10c39dd978ada90e0d090a045c4ae5f51dad010f3b754679e15894c9b93d254bR109
basically what it does is; setting the volume to zero, play any track for some time (100 loop() iterations), stop and the finally set the desired volume:
While this works as expected it feels very much like a work-a-round for some fundamental issue in the library.
I see two possible answers to this issue;
Thanks and regards
The text was updated successfully, but these errors were encountered: