-
-
Notifications
You must be signed in to change notification settings - Fork 1
FileEncoder
Melchor Garau Madrigal edited this page Nov 27, 2016
·
4 revisions
A stream.Writable class that converts some PCM input to flac output in a file.
You can pass all the options that can expect the Writable object, but also you can pass:
-
file: String
- File to the output file
- You must provide this value
-
isOggStream: Boolean
- Indicates if the output would be an ogg stream or a raw FLAC stream
- Defaults to false
-
channels: Number
- Indicates to the encoder the number of channels that will have the PCM stream
- Defaults to 2
-
bitsPerSample: Number
- Indicates to the encoder the bits per sample of the PCM stream
- Defaults to 16
-
samplerate: Number
- Indicates to the encoder the samplerate of the PCM stream
- Defaults to 44100
-
oggSerialNumber: Number
- Indicates the serial number of the ogg stream, if its an ogg stream
- No default value, you must provide this value if its an ogg stream
-
totalSamplesEstimate: Number
- An estimation of the total samples of the PCM stream
- Optional
-
compressionLevel: Number
- Sets the compression level for the decoder, changing the parameters below this one for you
- See what are the parameters changed
- Optional
-
doMidSideStereo: Boolean
- When
true, encodes stereo streams using mid-side encoding. - Optional
- When
-
looseMidSideStereo: Number
- When
trueanddoMidSideStereoset totrue, enables adaptative switching between mid-side and left-right encoding - Optional
- When
-
apodization: String
- See this link
- Optional
-
maxLpcOrder: Number
- Set the maximum LPC Order, or set to 0 to use fixed predictors
- Optional
-
qlpCoeffPrecision: Number
- Set the precision of the QLP coefficients, or 0 to let the encoder select it for you
- Optional
-
doQlpCoeffPrecSearch: Boolean
- See this link
- Optional
-
doExhaustiveModelSearch: Boolean
- See this link
- Optional
-
minResidualPartitionOrder: Number
- See this link
- Optional
-
maxResidualPartitionOrder: Number
- See this link
- Optional
-
riceParameterSearchDist: Number
- See this link
- Optional
Writes some PCM data to be encoded. The buffer must contain PCM with the bps passed in the constructor, that is, if you want a 16 bps, the buffer must contain 16bps PCM. It will transform for you to 32bit buffer, that is the kind of data accepted by FLAC library.