0 purchases
waapi client dart
Wwise Authoring API (Waapi) Client for Dart.
Features #
Waapi call function
Waapi subscribe topic
Waapi uri constants
TODO:
Typed Waapi objects
Wrapped functions
Usage #
Waapi call #
import 'package:waapi_client_dart/waapi_client_dart.dart';
void main() async {
final client = WaapiClient();
try {
await client.connect();
final object = await client.call(
WaapiUri.akWwiseCoreObjectGet,
args: {
'from': {
'path': ['\\Actor-Mixer Hierarchy\\Default Work Unit'],
}
},
options: {
'return': ['id', 'name', 'type', '@Inclusion'],
},
);
print('Object get: $object');
} finally {
await client.disconnect();
}
}
copied to clipboard
Waapi subscribe #
import 'package:waapi_client_dart/waapi_client_dart.dart';
void main() async {
final client = WaapiClient();
try {
await client.connect();
final objectDeleteStream = await client.subscribe(WaapiUri.akWwiseCoreObjectPostDeleted);
final objectDeleteSub = objectDeleteStream.listen((event) {
print('Object deleted: $event');
});
final objectCreateStream = await client.subscribe(WaapiUri.akWwiseCoreObjectCreated);
final objectCreateSub = objectCreateStream.listen((event) async {
print('Object created: $event');
await Future.delayed(const Duration(milliseconds: 200));
await client.call(WaapiUri.akWwiseCoreObjectDelete, args: {
'object': event?['object']['id'],
});
});
await client.call(
WaapiUri.akWwiseCoreObjectCreate,
args: {
'parent': '\\Actor-Mixer Hierarchy\\Default Work Unit',
'type': 'RandomSequenceContainer',
'name': 'RandomSequenceContainer',
'onNameConflict': 'rename',
},
);
await Future.delayed(const Duration(milliseconds: 300));
await objectDeleteSub.cancel();
await objectCreateSub.cancel();
} finally {
await client.disconnect();
}
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.