- Home /
audioclip stream has delay
Hi, I have set up a audiosource playing a streamed audioclip which is being set using the PCMReaderCallback. It is playing the audio correctly except from it having a 1 second delay. I have it being created with the following parameters UnityEngine.AudioClip.Create("NAME",11025,1,11025,true,OnReaderCallback);
I have tried increasing and decreasing the "lenghtSamples" but it seams to have had no effect.
I am setting the data to values stored in a buffer which are used as soon as they are available in OnReaderCallback.
Can someone please tell me if I am missing something which is causing the delay or if it is just the buffer is a second behind the source?
I'm pretty sure that's just a standard drawback of using strea$$anonymous$$g audio.
You mean you have a delay the first time you play the audio then it is smooth? or between every call back there is a blank of 1 second?
Could be helpful to see the operations you do in your callback.
Edit : I already used the strea$$anonymous$$g for a research project I don't remember having any delay. The maximum delay should be the length of the sample you generate every call back.
Answer by rmadatqm · Jun 09, 2016 at 02:37 PM
The lag is introduced during the start, then everything will be 1 second delay, but the sound is smooth
Is there any alternative for strea$$anonymous$$g playback without 1 sec delay?
Your answer
Follow this Question
Related Questions
Endless Audio streaming (Radio)?! 3 Answers
Decode H.264 stream and display in Unity 0 Answers
Sound Manipulation Effect Radio Tuner 0 Answers
Why WWW.audioClip in unity 3.5 is take much more time to load in comparison with unity 3? 0 Answers
Help Audio streaming from microphone to online url. Uploading only 4kb chunk at a time. 1 Answer