-
-
Notifications
You must be signed in to change notification settings - Fork 836
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
audio: Add G.711 decoder #16570
base: master
Are you sure you want to change the base?
audio: Add G.711 decoder #16570
Conversation
is there content that this is used for? |
(or at least a crafted example so we can test with, please!) |
I don't think it should be added to the |
@Lord-McSweeney Same in 409a713#diff-00d1b36fa29c1b47759997928f850c8ff051e7bcbe201ab073f0f855f1d3ecdeR1029 |
At least I personally have changed my mind since then. Now I think it's fine. After all, we have also added H264 as VideoCodec... |
Okay, this definitely needed more testing (see #16614) |
FFmpeg commands for flv encoding |
0423463
to
ac46cfb
Compare
I'm still unable to make a passing test for this. This is what FP plays the tone as: And this is what this PR currently plays it as: Maybe the FLV parser doesn't feed the decoder enough data...? Could the same thing be causing the fairly common "MP3 decoder buffer underrun" errors? I've also noticed that a decoder is being recreated for each "packet", which is probably not optimal...? Pinging @kmeisthax. |
Based on the one for the AAC decoder.
During some quick and dirty debugging, I noticed that the part that does the lookup table lookuping, is invoked by two different threads... Which is sus. Either it should be the main thread, or the one that handles the callback from the audio device... no? 🤔 And BTW the length of non-silent parts compared to how far apart they are (see the second screenshot above), hints at the possibility that maybe we are reading 16-bit stereo samples at 44.1kHz from a data source that is 8-bit mono at 8kHz...? As in the ratio of 2x2x44100 = 176400, vs. 1x1x8000 = 8000 (22.05) is suspiciously close to the 559 vs. 23 pixels (ratio of 24.3, close enough given the accuracy of measurement). But it might also be just a coincidence of course. |
https://en.wikipedia.org/wiki/G.711
Both a-law and mu-law implemented as lookup tables