paraslash Paraslash Audio Streaming
About   News   Download   Documentation   Development

Functions
write.c File Reference

Detailed Description

Paraslash's standalone wav/raw player.

This file contains the main function of para_write(1), which is conceptually similar to para_recv(1) in that it employs the scheduler and sets up a simple buffer tree. The tree combines the stdin buffer tree node with one of the paraslash writers.

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

The main function of para_write(1).

Parameters
argcOptions are defined in the write lopsub suite.
argvThe write_cmd suite file defines the various writers and their options. Each writer corresponds to a lopsub subcommand of this suite.

Set up the stdin task, the check_wav task and the writer task, and combine the corresponding buffer tree nodes to form a chain. The check wav task becomes active as soon as the first chunk of data is read from stdin. If the data looks like a wav header, the check_wav task parses the header, and passes through subsequent data, waiting for the writer task calling btr_exec_up() to query the number of channels, the sample rate and the sample format.

Returns
EXIT_SUCCESS or EXIT_FAILURE