-
Notifications
You must be signed in to change notification settings - Fork 78
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
not able to play pcm audio decoded by libopus. #6
Comments
You don't need to convert into Float32Array. You can feed Uint8Array data directly when you choose the Also, make sure you have set |
Now if don't convert the data to Float32Array then it is giving following error and still audio is not playing.
I have inialized pcm player as fallows.
I have |
I am not sure why you are getting an error. |
@samirkumardas I have checked the repository you have mentioned and it is working as well. My current player configuration is
Also could you please let me know why it is not working with direct |
Did you mean your provide Also, the conversation you are doing, PCMPlayer does it automatically depending on the encoding Line 64 in c00c230
As it plays with your converted data, it should play without your converting function if you provide correct encoding
|
Yes It is not playing if I give '16bitInt' as encoding. |
Have you updated your convertBlock code? Can you share new one? |
no I have not updated
But still has background noise. |
@kuldeepmore The noise you are hearing is likely due to your audio encoding. For example, I am using ffmpeg to create a stream of f32le (PCM 32-bit floating-point little-endian) bytes at 48000hz. These are my working PCMPlayer options:
I get various types of distortion and "white noise" if I use any of the other It seems that in its current form, PCMPlayer's |
@nickrobillard as it uses typed array which is the platform byte order by default. Most of the platforms byte order is little-endian nowadays. |
I have ported the libopus using emscripten and decoding opus to pcm.
Now I am sending this decoded pcm data to this pcm-player but it just playing noise and not the actual audio.
From libopus I am getting Uint8Array and I am converting the data to Float32Array before calling
feed
method of pcm-player but it not playing.Following code call back I have used to convert the data received from libopus to java script.
Please let me know what is going wrong in this implementation.
The text was updated successfully, but these errors were encountered: