Timeline problem about creatSound with MODE.CREATESTREAM

Hi, forums!
I use a url to play web audio. In order to reduce GC overhead, I use MODE.CREATESTREAM to CreateSound. However, when the sound starts playing, the Timelineposition is always offset backwards for a period of time.
Does anyone know the reason for this phenomenon? Thanks!

        public static bool CreateSound(string url, MODE mode, out Sound sound)
            sound = new Sound();
                var exinfo = new CREATESOUNDEXINFO();
                exinfo.cbsize = Marshal.SizeOf(exinfo);
                exinfo.suggestedsoundtype = SOUND_TYPE.OGGVORBIS;
                exinfo.ignoresetfilesystem = 1;

                var result = CoreSystem.createSound(url, mode, ref exinfo, out sound);
                if (result == RESULT.OK)
                    return true;
                throw new Exception($"{result}");
            catch (Exception e)
                GameLog.LogError($"FMOD CreateSound Error, {url}, {e.Message}");
                return false;


Unfortunately, I was not able to recreate this issue. However, a solution might be setting the playback position to the start of the audio track after the sound is played. Setting the playback position is explained under Core API | Channel.

Thank you for your reply!
However, it seems impossible to set timelineposition when a web sound is created as a stream,
I try to get the length of the sound, and it is 0.
Is there any way to solve it?

Hi, no worries and let’s try something else to solve the issue

Could I get the Url you are playing your sound from to test it on my end?

Also please clarify what you mean by “Timelineposition is always offset backwards a period of time”? Do you mean you are hearing silence for a couple of seconds?


First, I am sorry that I can’t give you the URL due to commercial confidentiality.
Here, I would like to answer your question about “Timelineposition is always offset backwards a period of time” in detail.
In fact, when I downloaded the sound resource from the URL via HTTP request and played it, the sound played without problems.( use the following function to createSound)

public RESULT createSound(byte[] data, MODE mode, ref CREATESOUNDEXINFO exinfo, out Sound sound)

Then, I try to make the sound played in stream mode, there’s a little bit of sound that’s not playing. For example, the original sound has a duration of 10 seconds. When the sound is played through a stream, the sound starts to be played from the second second.

Unfortunately, I am not able to replicate the issue using your code on files that are available to me. Is it possible to DM me the URL? Alternatively, could you test a public file and see if the issue persists?

I find some webaudio in github.
esp-adf/audio-samples.rst at master · espressif/esp-adf (github.com)
I tested this one: https://dl.espressif.com/dl/audio/gs-16b-2c-44100hz.ogg
However, when I createSound with Stream mode,FMOD Logs ERR_HTTP.

Apologies for the late reply!
Are the files that you can get working hosted locally or remotely? Depending on the delay between the request and playing the sound this might be causing the silence. In the meantime, I have passed this issue on to our development team to look into further

Thanmk you!