Skip to content

stop() not working with loadAndPlayUri and loadAndPlayUint8List #119

@dvagala

Description

@dvagala

Hello, thank you for this great package!

I found an issue. The soundpool.stop() is not always working when loading from file. It occurred on iOS, I didn't test Android.

Here's minimal reproducible code:

        int _streamId;

        _streamId = await _soundpool.loadAndPlayUri(file.uri.toString());
        // stop not working
        await _soundpool.stop(_streamId);


        _streamId = await _soundpool.loadAndPlayUint8List(file.readAsBytesSync());
        // stop not working
        await _soundpool.stop(_streamId);


        _streamId = await _soundpool.play(
          await _soundpool.load(
            file.readAsBytesSync().buffer.asByteData(),
          ),
        );
        // stop working
        await _soundpool.stop(_streamId);

Soundpool 2.3.0
Flutter 3.10.5
iOS 16.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions