X Tutup
Skip to content

IGModAudioChannel Stop() also deletes object #1497

@neico

Description

@neico

As of #278 Stop() simply kills the entire channel, this however should be up to __GC() to do.

the BASS instance can be destroyed but shouldn't affect the lua instance, since this behavior makes playing streams more complicated. (As you'd need to check for IsValid more often and then re-create the instance after each Stop() call)

If you use Pause() on a stream it'll just de-sync and will be behind for as long as it's paused, this is undesired behavior most of the time.

Solutions:

  1. Handle Stop() differently, keeping the lua instance until actually destroyed trough __GC(), so that Play recreates the BASS instance and plays again... (recommended)
  2. Make Pause() watch out for streams and give a hint to Play() to re-fetch the stream before playing again (as optional arument to keep both worlds happy)
  3. Restore Stop()'s old behavior and add a Kill() / Destroy() function to take over the new behavior (not recommended as this messes with people expecting above behavior from Stop() by now)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup