soundpool 0.5.3

soundpool #

A Flutter Sound Pool for playing short media files.

Sound Pool caches audio tracks in memory. This can be useful in following scenarios:

  • lower latency between play signal and actual playing of the sound (audio does not need to be read from disc/web),
  • the same sound may be used multiple times.

Inspired by Android SoundPool API.

Example:

    import 'package:soundpool/soundpool.dart';

    Soundpool pool = Soundpool(streamType: StreamType.notification);

    int soundId = await rootBundle.load("sounds/dices.m4a").then((ByteData soundData) {
                  return pool.load(soundData);
                });
    int streamId = await pool.play(soundId);

0.5.0 (20-03-2019) #

  • maxStreams parameter added to the constructor (Android only feature) (thanks to niusounds)

0.5.1 #

  • Gradle plugin upgraded
  • Kotlin upgraded
  • Dependency to Android Support library was removed
  • Swift version upgraded

0.5.2 (28-05-2019) #

  • Handle content:// schema on Android
  • Run callbacks on UI thread

0.5.3 (03-06-2019) #

  • Set Swift version in plugin's podspec

0.4.0 (04-03-2019) #

  • Methods for immediate playback after loading
  • Documentation update

0.4.1 (06-03-2019) #

  • Android bugs fixed

0.3.0 (11-12-2018) #

  • Upgrade Android Gradle plugin

0.2.0 (05-11-2018) #

  • New methods for controlling audio stream:
    • stop
    • pause
    • resume
  • Fixed iOS problem with repeat parameter not working on the first play() call
  • Stream handling wrapper API

0.1.1 (16-09-2018) #

0.1.0 (10-09-2018) #

  • Breaking change
    • Multiple soundpools support
    • Audio stream type may be defined for Soundpool to use (Android only)
      • Every sound loaded for the Soundpool is played on the audio stream Soundpool instace was created with
  • Fix Android app crashing when URI is not reachable

0.0.3 (19-06-2018) #

  • Load sound files from URI
  • Fix setVolume() and release() never finishing

0.0.1 (10-06-2018) #

  • Initial release.
    • Loading sound files from assets.
    • Playing, stopping and pausing streams.
    • Releasing resources.
  • Works on Android and iOS.

example/README.md

soundpool_example #

Demonstrates how to use the soundpool plugin.

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  soundpool: ^0.5.3

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:soundpool/soundpool.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
87
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
94
Learn more about scoring.

We analyzed this package on Jul 22, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.48.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8

Admin