flutter_scene_fmod 0.1.0 copy "flutter_scene_fmod: ^0.1.0" to clipboard
flutter_scene_fmod: ^0.1.0 copied to clipboard

FMOD Studio audio backend for flutter_scene. Implements the abstract audio contract from flutter_scene over the fmod package, against a user-supplied FMOD Engine SDK.

example/example.dart

// Attach the FMOD backend to a scene and play a spatial clip.
//
// FMOD is proprietary; nothing here ships the SDK. Set FMOD_SDK_PATH (or
// FMOD_LIBRARY_PATH) to a downloaded FMOD Engine SDK before running. See the
// README for setup, and `FmodEventSource` for playing FMOD Studio events.
import 'package:flutter_scene/audio.dart';
import 'package:flutter_scene/scene.dart';
import 'package:flutter_scene_fmod/flutter_scene_fmod.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 = FmodAudioEngine();
  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),
    ),
  );
}
0
likes
0
points
158
downloads

Publisher

verified publisherbdero.dev

Weekly Downloads

FMOD Studio audio backend for flutter_scene. Implements the abstract audio contract from flutter_scene over the fmod package, against a user-supplied FMOD Engine SDK.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_scene, fmod, vector_math

More

Packages that depend on flutter_scene_fmod