soloud icon indicating copy to clipboard operation
soloud copied to clipboard

`Soloud->seek()` doesn't work and kills the sound

Open elpoeprod opened this issue 3 months ago • 3 comments

Hello, i'm developing my own "engine" and using SoLoud as an audio library. After many testings, Soloud->seek() function isn't working at all and kills the sound, at any formats. Code:

void audio::set_pos(GBAudio* snd, double pos)
    {
    	SAssert;
        snd->pos = pos;
        __mus_handle->setPause(snd->handle,true);
        __mus_handle->seek(snd->handle,pos);
        __mus_handle->setPause(snd->handle,false);
        return;
    }

__mus_handle -> new SoLoud::Soloud GBAudio -> struct {SoLoud::WavStream chunk; int handle; ...;}; snd->handle -> __mus_handle->play(snd->chunk,1);

elpoeprod avatar Aug 28 '25 22:08 elpoeprod

Hi @elpoeprod, I'm also using seek method and it works fine for me. Why do you pause and unpause? And also the value of "pos" is in seconds?

OriolCS2 avatar Sep 07 '25 10:09 OriolCS2

Hi @elpoeprod, I'm also using seek method and it works fine for me. Why do you pause and unpause? And also the value of "pos" is in seconds?

because pausing and unpausing was written in SoLoud documentation, but it also doesn't work with and without pausing/unpausing pos value is in seconds obviously. I didn't mention i use MiniAudio as a backend also, i am seeking LOOPED (__mus_handle->loop()) music position

elpoeprod avatar Sep 07 '25 10:09 elpoeprod

help pls i still have this issue

elpoeprod avatar Sep 28 '25 19:09 elpoeprod