quiniouben / vban

VBAN protocol open-source implementation
GNU General Public License v3.0
450 stars 63 forks source link

Added file_backend feature, allowing to stream to stdout or a file. #13

Closed markusbuschhoff closed 6 years ago

markusbuschhoff commented 6 years ago

Enables "-b file" as backend, with stdout being the default (or writes to the file given in -o file). Tested and works here. Generally, it is slightly modified code from pipe_backend.c, but with a major fix (I believe pipe_backend does not work correctly): When using write() the number of bytes in the data buffer must be given, but pipe_backend sets the number of samples, which needs to be muliplied by the sample-width and number of channels to calculate bytes/sample (if there is not a more convenient way).

quiniouben commented 6 years ago

hi, thank you for your proposal. Let me take a quick look at it and I will be very happy to merge it.