#playing #asynchronous #music #chain #pipe #sink

yanked adlib

Rust library for playing music asynchronously

1 unstable release

0.1.1 Apr 17, 2021
0.1.0 Apr 15, 2021

#58 in #playing

MIT license

5KB
84 lines

adlib

Rust library for playing music asynchronously.

Currently a WIP.

The plan is to allow the composition of asynchronous Streams that propegate audio data to an ultimate sink object that will implement cpal.

Pipes (i.e. a chain of Streams) can be created through composition such as the following example:

let sink = Sink::from(<cpal object>);
let pipe = Source(<uri>)
    .buffer(<size>)
    .decoder()
    .gain(<gain control>)
    .volume(<volume control>);

sink.send_all(pipe);

In the above case we should be able to specify any valid uri for the source object, thus both files and TCP streams should be possible.

New objects that implement Stream can be added to the library that monitor and/or alter the audio data.

Help

If you'd like to help then please contact me. I have limited time for coding and progress may be slow as a consequence.

Dependencies

~0.5–1MB
~21K SLoC