# SFToStream

Converts AIFF or AIFF-C files to chunked files.

### Synopsis

`sftostream [options] -i <infile> -o <outfile>`

### Description

`C`onverts standard AIFF and AIFF-C format sound files to a chunked stream filee. The following formats are supported by `SFToStream` and the AudioSubscriber:

By convention, the suffix for the output files generated by `SFToStream` is ".saudio". This is to distinguish them from the output files generated by the Weaver. In order to play an audio only stream correctly, the .saudio file MUST be processed by the Weaver.

### Arguments

-cs <size>
  Size of a stream data chunk in bytes.

-i <infile>
  Input file name.

-ia <amp>
  Initial amplitude. Can be changed with a control message as the stream is playing.

-ip <pan>
  Initial pan. Can be changed with a control message as the stream is playing.

-lc <chan>
  The Audio Subscriber supports up to eight logical channels per stream. Logical channels can be of different data formats. Each channel maintains its own amplitude and pan values. Generally one of these channels is considered the "clock channel" and the timestamps in its data chunks drive the stream clock. 0 is the default clock channel. The clock channel can be set while the stream is playing with an SAudioSubscriber control message.

-nb <num>
  Maximum number of data chunks that can be submitted to the audio folio at any one time. Any additional data messages are queued up separately and submitted to the folio as previously submitted buffers complete.

-o <outfile>
  Output file name.

### Examples

Here is a typical command line:

``

    sftostream -i soundfile.aiff -o test.saudio

`SfToStream` takes the input file soundfile.aiff, formats the data into chunked stream, and output the chunked stream in test.saudio.