flutter_scene_soloud 0.1.1 copy "flutter_scene_soloud: ^0.1.1" to clipboard
flutter_scene_soloud: ^0.1.1 copied to clipboard

SoLoud audio backend for flutter_scene. Implements the abstract audio contract from flutter_scene over the SoLoud engine via flutter_soloud.

example/example.dart

// Attach the SoLoud backend to a scene and play a spatial clip.
import 'package:flutter_scene/audio.dart';
import 'package:flutter_scene/scene.dart';
import 'package:flutter_scene_soloud/flutter_scene_soloud.dart';

Future<void> main() async {
  final scene = Scene();

  // A backend audio engine drives the scene's audio contract. Attach it to
  // the scene root; the listener follows the active camera.
  final engine = SoloudAudioEngine();
  scene.root.addComponent(engine);

  // Load a clip and attach it to a node as a looping spatial source that
  // plays as soon as it mounts.
  final clip = await engine.loadClip('assets/sound.wav');
  scene.add(
    Node()..addComponent(
      ClipAudioSource(clip: clip, autoplay: true, looping: true),
    ),
  );
}
1
likes
160
points
189
downloads

Documentation

API reference

Publisher

verified publisherbdero.dev

Weekly Downloads

SoLoud audio backend for flutter_scene. Implements the abstract audio contract from flutter_scene over the SoLoud engine via flutter_soloud.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, flutter_scene, flutter_soloud, vector_math

More

Packages that depend on flutter_scene_soloud