minisound 1.0.3 copy "minisound: ^1.0.3" to clipboard
minisound: ^1.0.3 copied to clipboard

A high-level real-time audio playback library based on Miniaudio.

example/lib/main.dart

import "package:flutter/material.dart";
import "package:minisound/minisound.dart";

final engine = Engine();
late final Sound sound;

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await engine.init();

  sound = await engine.loadSoundAsset("assets/laser_shoot.wav");

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) => MaterialApp(
        title: "Minisound Example",
        theme: ThemeData(useMaterial3: true),
        home: Scaffold(
          appBar: AppBar(title: const Text("Minisound Example")),
          body: Center(
            child: ElevatedButton(
              child: const Text("LASER SHOOT"),
              onPressed: () async {
                await engine.start();
                sound.play();
              },
            ),
          ),
        ),
      );
}
9
likes
0
pub points
67%
popularity

Publisher

unverified uploader

A high-level real-time audio playback library based on Miniaudio.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, minisound_ffi, minisound_platform_interface, minisound_web

More

Packages that depend on minisound