pulseaudio 0.0.7 copy "pulseaudio: ^0.0.7" to clipboard
pulseaudio: ^0.0.7 copied to clipboard

PlatformLinux

This repository contains a Dart client library to interact with PulseAudio, a sound server that provides a sound system for POSIX systems.

example/example.dart

import 'package:pulseaudio/pulseaudio.dart';

void main() async {
  final client = PulseAudioClient();
  client.onServerInfoChanged.listen((event) {
    print(event);
  });
  client.onSinkChanged.listen((event) {
    print(event);
  });
  client.onSourceChanged.listen((event) {
    print(event);
  });
  await client.initialize();
  final serverInfo = await client.getServerInfo();
  print('Server Information:');
  print('Name: ${serverInfo.name}');
  print('Default Sink: ${serverInfo.defaultSinkName}');
  print('Default Source: ${serverInfo.defaultSourceName}');

  final sourceList = await client.getSourceList();
  print('\nAvailable Sources:');
  for (var source in sourceList) {
    print('Source Name: ${source.name}, Description: ${source.description}');
  }

  final sinkList = await client.getSinkList();
  print('\nAvailable Sinks:');
  for (var sink in sinkList) {
    print('Sink Name: ${sink.name}, Description: ${sink.description}');
  }

  await client.setSinkVolume(serverInfo.defaultSinkName, 0.5);

  client.dispose();
}
0
likes
140
points
71
downloads

Publisher

verified publisherfree-explorers.com

Weekly Downloads

This repository contains a Dart client library to interact with PulseAudio, a sound server that provides a sound system for POSIX systems.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

ffi, flutter, freezed_annotation

More

Packages that depend on pulseaudio