Struct libaudioverse::server::Server [] [src]

pub struct Server { /* fields omitted */ }

Represents a server, the main entry point to Libaudioverse. All libaudioverse nodes must be passed a server at creation time as the first argument to their constructor and cannot migrate between them. Furthermore, it is an error to try to connect objects from different servers. By default, Libaudioverse will use one thread per core on the current system for audio mixing. This may be changed via Lav_serverSetThreads. For full details of this class, see the Libaudioverse manual.

Methods

impl Server
[src]

[src]

Creates a new server with a default sampling rate of 44,100 and a block size of 1024. This is sufficient and performant for most applications.

[src]

create a new server with the specified sampling rate and block size. The block size is the number of samples to process at once, and must be a multiple of 4.

[src]

Set the output of the server to the system's default audio device with 2 channels and 2 mixahead.

[src]

Set the output device of the server. Use the literal string "default" for the default audio device. Note that it is possible to change the output device of a server even after it has been set. After the output device has been set, calls to Lav_serverGetBlock will error.