• Stars
    star
    4
  • Rank 3,204,272 (Top 65 %)
  • Language
    Ada
  • License
    Apache License 2.0
  • Created over 3 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ada 2012 bindings for libcanberra

Build status License Alire crate GitHub release IRC Gitter chat

canberra-ada

Ada 2012 bindings for libcanberra.

Usage

A minimal example to synchronously play an event sound:

with Canberra;

procedure Example is
   Context : Canberra.Context := Canberra.Create;
begin
   Context.Play ("bell");
end Example;

An example that shows how to play sounds asynchronously and cancel or wait for them to finish playing:

with Canberra;

procedure Example is
   Context : Canberra.Context := Canberra.Create
     (Name => "Ada",
      ID   => "ada.lovelace",
      Icon => "utilities-terminal");

   S1, S2 : Canberra.Sound;
begin
   Context.Set_Property ("canberra.xdg-theme.name", "ubuntu");

   Context.Play ("phone-outgoing-busy", S1);
   Context.Play ("desktop-login", S2, Canberra.Music, "Login");

   --  Stop playing the music sound
   delay 1.5;
   Context.Cancel (S2);

   --  But wait for the event sound to finish playing
   S1.Await_Finish_Playing;
end Example;

Dependencies

In order to build the bindings for libcanberra, you need to have:

  • An Ada 2012 compiler

  • Alire

To use libcanberra, you need to have some backend installed:

  • libcanberra-pulse for the PulseAudio backend

Contributing

Please read the contributing guidelines before opening issues or pull requests.

License

These bindings are licensed under the Apache License 2.0. The first line of each Ada file should contain an SPDX license identifier tag that refers to this license:

SPDX-License-Identifier: Apache-2.0

More Repositories

1

orka

The OpenGL 4.6 Rendering Kernel in Ada 2012
Ada
52
star
2

OpenRTI

Mirror of OpenRTI on SourceForge. Do not create PR's. Instead send patches or git pull commands to the mailing list on SF.
C++
51
star
3

json-ada

An Ada 2012 library for parsing JSON
Ada
35
star
4

inotify-ada

An Ada 2012 library for monitoring filesystem events using Linux' inotify API
Ada
8
star
5

emojis

An Ada 2012 library to replace names between colons with emojis
Ada
7
star
6

xoshiro

Ada/SPARK port of the xoshiro128++ and xoshiro256++ pseudo-random number generators
Ada
7
star
7

wayland-ada

Ada 2012 bindings for Wayland
Ada
6
star
8

dcf-ada

An Ada 2012 library for document container files
Ada
5
star
9

orka-demo

Demo project using Orka 3D engine
Ada
4
star
10

evdev-ada

An Ada 2012 library to read input events and use force-feedback using Linux' evdev API
Ada
4
star
11

awt

Ada Window Toolkit, a library for managing input devices and windows that can display 3D graphics
3
star
12

weechat-ada

Ada 2012 library for WeeChat plug-ins
Ada
3
star
13

vim-ada

Modified Vim script for Ada 2012
Vim Script
2
star
14

weechat-emoji

A WeeChat plug-in written in Ada 2012 πŸ₯° that displays emoji πŸ₯³
Ada
2
star
15

spoon

An Ada 2012 library for posix_spawn() to spawn processes without a fork().
Ada
2
star
16

opus-ada

Ada 2012 bindings for the Opus audio codec.
Ada
2
star
17

xdg-base-dir

Ada 2012 library implementing the XDG Base Directory Specification
Ada
1
star
18

goblin-terminal

A mutated clone of GNOME Terminal
Python
1
star
19

weechat-canberra

A WeeChat plug-in written in Ada 2012 that plays sounds using libcanberra
Ada
1
star