Open kered59 opened 1 year ago
Is each packet encoded as a separate buffer? I am not sure if there is a specific thing that must change in the QOA format to enable seamless streaming. Do you have a simple test case that I could try? Unsure at this point whether it's my implementation or a limitation of QOA itself.
Thank you for reaching out, each packet is encoded as a separate buffer, the intention was to see if QOA could be used for very specific live audio transmission. I saw a few references in the base QOA that could have been alluring to being possible solutions, one in particular with sine waves and weights associated with it's compression located at this issue: https://github.com/phoboslab/qoa/issues/25 Very busy with work this week but I will try to get a simple test case assembled for use ASAP to hopefully help diagnose.
Utilizing this to encode PCM audio straight from user input i.e. microphone audio, results in a clicking noise present in audio in between packets which is clearly audible when when played back through an Audio Worklet Node which is most noticeable when maintaining a note while singing.
This persists even if a large section of packets are encoded, decoded and then added to a buffer lasting a few seconds prior to being sent for playback through the Audio Node.
I have tested with a bufferSize being posted out of an AudioWorkletProcessor from the low end of 640 to the upper end of a full second of 44100 / 48000 with the result being the same, a clicking noise present in between packets only after encoding the individual Float32Array's that are provided, and promptly decoding them for audio playback.
Alternative Encoder methods did not present this clicking when feeding to the Audio Worklet for playback so I am hesitant to say that the code for playback is the culprit.
Any guidance or input on a possible resolution would be greatly and deeply appreciated, thank you.