Sound Output
DarkNet includes a set of commands for sending data to sound output devices such as speakers. Multiple output devices can be used at the same time.
mnPlayData is used to send a packet containing data to be played. Such packets can be retrieved from an input device using DarkNet or can be created by other means e.g. from a file.
The sound format can be adjusted which changes the quality of output. The format can be set to 3 preset quality levels using mnSetOutputFormatLow, mnSetOutputFormatMedium or mnSetOutputFormatHigh. Alternatively precise format values can be specified using mnSetOutputFormat; the following values can be set: Channels, Samples per second (hertz) and Bits per sample.
Simple Server/Client
The below demo demonstrates how easy it is to create an application that facilitates voice communication over LAN and WAN.
The server acts as a relay and simply sends data received from a client to all other clients. There should be roughly 300ms worth of lag which exists to ensure smooth playback. The amount of lag can be decreased by fine tuning various DarkNet settings. Quality is set to medium (default) but can be changed.
Screenshot

Code
C++ - Client
C++ - Server
C# - Client
C# - Server
VB.NET - Client
VB.NET - Server
DarkBASIC Pro - Client
DarkBASIC Pro - Server
Executable
Client
Server
|