node-av / lib / SoftwareResampleContext
Class: SoftwareResampleContext
Defined in: src/lib/software-resample-context.ts:62
Audio resampling and format conversion context.
Provides comprehensive audio format conversion including sample rate conversion, channel layout remapping, and sample format conversion. Essential for audio processing pipelines where format compatibility is required between components. Supports high-quality resampling algorithms with configurable parameters.
Direct mapping to FFmpeg's SwrContext.
Example
import { SoftwareResampleContext, Frame, FFmpegError } from 'node-av';
import { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_S16 } from 'node-av/constants';
// Create resampler
const resampler = new SoftwareResampleContext();
// Configure format conversion
const outLayout = { nbChannels: 2, order: 1, u: { mask: 3n } }; // Stereo
const inLayout = { nbChannels: 1, order: 1, u: { mask: 1n } }; // Mono
const ret = resampler.allocSetOpts2(
outLayout, AV_SAMPLE_FMT_S16, 48000, // Output: Stereo, 16-bit, 48kHz
inLayout, AV_SAMPLE_FMT_FLTP, 44100 // Input: Mono, float, 44.1kHz
);
FFmpegError.throwIfError(ret, 'allocSetOpts2');
const ret2 = resampler.init();
FFmpegError.throwIfError(ret2, 'init');
// Convert audio frame
const outFrame = new Frame();
outFrame.nbSamples = 1024;
outFrame.format = AV_SAMPLE_FMT_S16;
outFrame.channelLayout = outLayout;
outFrame.sampleRate = 48000;
outFrame.allocBuffer();
const ret3 = resampler.convertFrame(outFrame, inFrame);
FFmpegError.throwIfError(ret3, 'convertFrame');
// Get conversion delay
const delay = resampler.getDelay(48000n);
console.log(`Resampler delay: ${delay} samples`);
// Clean up
resampler.free();See
- SwrContext - FFmpeg Doxygen
- Frame For audio frame operations
Extends
Implements
DisposableNativeWrapper<NativeSoftwareResampleContext>
Constructors
Constructor
new SoftwareResampleContext():
SoftwareResampleContext
Defined in: src/lib/software-resample-context.ts:63
Returns
SoftwareResampleContext
Overrides
OptionMember<NativeSoftwareResampleContext>.constructor
Properties
native
protectednative:NativeSoftwareResampleContext
Defined in: src/lib/option.ts:1030
Inherited from
Methods
[dispose]()
[dispose]():
void
Defined in: src/lib/software-resample-context.ts:621
Dispose of the resampler context.
Implements the Disposable interface for automatic cleanup. Equivalent to calling free().
Returns
void
Example
{
using resampler = new SoftwareResampleContext();
resampler.allocSetOpts2(...);
resampler.init();
// Use resampler...
} // Automatically freed when leaving scopeImplementation of
Disposable.[dispose]
alloc()
alloc():
void
Defined in: src/lib/software-resample-context.ts:84
Allocate resample context.
Allocates memory for the resampler. Must be called before configuration.
Direct mapping to swr_alloc().
Returns
void
Example
const resampler = new SoftwareResampleContext();
resampler.alloc();
// Now configure with setOption() or allocSetOpts2()See
allocSetOpts2 For combined allocation and configuration
allocSetOpts2()
allocSetOpts2(
outChLayout,outSampleFmt,outSampleRate,inChLayout,inSampleFmt,inSampleRate):number
Defined in: src/lib/software-resample-context.ts:132
Allocate and configure resampler.
Combined allocation and configuration of the resampler with input and output format specifications.
Direct mapping to swr_alloc_set_opts2().
Parameters
outChLayout
Output channel layout
outSampleFmt
Output sample format
outSampleRate
number
Output sample rate in Hz
inChLayout
Input channel layout
inSampleFmt
Input sample format
inSampleRate
number
Input sample rate in Hz
Returns
number
0 on success, negative AVERROR on error:
- AVERROR_EINVAL: Invalid parameters
- AVERROR_ENOMEM: Memory allocation failure
Example
import { FFmpegError } from 'node-av';
import { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_S16 } from 'node-av/constants';
// Stereo layout
const stereo = { nbChannels: 2, order: 1, u: { mask: 3n } };
// 5.1 layout
const surround = { nbChannels: 6, order: 1, u: { mask: 63n } };
// Convert 5.1 float to stereo 16-bit
const ret = resampler.allocSetOpts2(
stereo, AV_SAMPLE_FMT_S16, 48000,
surround, AV_SAMPLE_FMT_FLTP, 48000
);
FFmpegError.throwIfError(ret, 'allocSetOpts2');See
init Must be called after configuration
close()
close():
void
Defined in: src/lib/software-resample-context.ts:207
Close resampler context.
Closes the resampler but keeps the context allocated. Can be reconfigured and reinitialized after closing.
Direct mapping to swr_close().
Returns
void
Example
resampler.close();
// Can now reconfigure and reinitSee
free For complete deallocation
configFrame()
configFrame(
outFrame,inFrame):number
Defined in: src/lib/software-resample-context.ts:369
Configure resampler from frames.
Configures the resampler using format information from frames. Alternative to allocSetOpts2() for frame-based setup.
Direct mapping to swr_config_frame().
Parameters
outFrame
Frame with output format
Frame | null
inFrame
Frame with input format
Frame | null
Returns
number
0 on success, negative AVERROR on error:
- AVERROR_EINVAL: Invalid parameters
Example
import { FFmpegError } from 'node-av';
// Configure from frames
const ret = resampler.configFrame(outFrame, inFrame);
FFmpegError.throwIfError(ret, 'configFrame');
const ret2 = resampler.init();
FFmpegError.throwIfError(ret2, 'init');See
allocSetOpts2 For manual configuration
convert()
convert(
outBuffer,outCount,inBuffer,inCount):Promise<number>
Defined in: src/lib/software-resample-context.ts:252
Convert audio samples.
Converts audio samples from input format to output format. Handles resampling, channel remapping, and format conversion.
Direct mapping to swr_convert().
Parameters
outBuffer
Output sample buffers (one per channel for planar)
Buffer<ArrayBufferLike>[] | null
outCount
number
Maximum output samples per channel
inBuffer
Input sample buffers (one per channel for planar)
Buffer<ArrayBufferLike>[] | null
inCount
number
Input samples per channel
Returns
Promise<number>
Number of output samples per channel, negative AVERROR on error:
- AVERROR_EINVAL: Invalid parameters
- AVERROR_INPUT_CHANGED: Input format changed
Example
import { FFmpegError } from 'node-av';
// Convert audio buffers
const outBuffers = [Buffer.alloc(4096), Buffer.alloc(4096)]; // Stereo
const inBuffers = [inputBuffer]; // Mono
const samples = await resampler.convert(
outBuffers, 1024,
inBuffers, inputSamples
);
if (samples < 0) {
FFmpegError.throwIfError(samples, 'convert');
}
console.log(`Converted ${samples} samples`);See
convertFrame For frame-based conversion
convertFrame()
convertFrame(
outFrame,inFrame):number
Defined in: src/lib/software-resample-context.ts:336
Convert audio frame.
Converts an entire audio frame to the output format. Simpler interface than convert() for frame-based processing.
Direct mapping to swr_convert_frame().
Parameters
outFrame
Output frame (null to drain)
Frame | null
inFrame
Input frame (null to flush)
Frame | null
Returns
number
0 on success, negative AVERROR on error:
- AVERROR_EINVAL: Invalid parameters
- AVERROR_ENOMEM: Memory allocation failure
- AVERROR_INPUT_CHANGED: Input format changed
Example
import { Frame, FFmpegError } from 'node-av';
// Convert frame
const outFrame = new Frame();
const ret = resampler.convertFrame(outFrame, inFrame);
FFmpegError.throwIfError(ret, 'convertFrame');
// Drain remaining samples
const drainFrame = new Frame();
const ret2 = resampler.convertFrame(drainFrame, null);
if (ret2 === 0) {
// Got drained samples
}See
- convert For buffer-based conversion
- configFrame To configure from frame
convertSync()
convertSync(
outBuffer,outCount,inBuffer,inCount):number
Defined in: src/lib/software-resample-context.ts:295
Convert audio samples synchronously. Synchronous version of convert.
Converts audio between formats, sample rates, and channel layouts. Can handle format conversion, resampling, and channel mixing.
Direct mapping to swr_convert().
Parameters
outBuffer
Output buffer array (one per channel, null to get delay)
Buffer<ArrayBufferLike>[] | null
outCount
number
Number of output samples space per channel
inBuffer
Input buffer array (one per channel, null to flush)
Buffer<ArrayBufferLike>[] | null
inCount
number
Number of input samples per channel
Returns
number
Number of samples output per channel, or negative AVERROR:
- AVERROR_EINVAL: Invalid parameters
- AVERROR_ENOMEM: Memory allocation failure
Example
import { FFmpegError } from 'node-av';
// Convert stereo float to mono s16
const inBuffers = [leftChannel, rightChannel];
const outBuffers = [monoOutput];
const samples = resampler.convertSync(
outBuffers, 1024, // Output: 1024 samples max
inBuffers, 1024 // Input: 1024 samples
);
FFmpegError.throwIfError(samples, 'convertSync');
console.log(`Converted ${samples} samples`);See
convert For async version
dropOutput()
dropOutput(
count):number
Defined in: src/lib/software-resample-context.ts:565
Drop output samples.
Drops the specified number of output samples. Used for synchronization adjustments.
Direct mapping to swr_drop_output().
Parameters
count
number
Number of samples to drop
Returns
number
0 on success, negative AVERROR on error
Example
// Drop 100 output samples
const ret = resampler.dropOutput(100);
if (ret >= 0) {
console.log(`Dropped ${ret} samples`);
}free()
free():
void
Defined in: src/lib/software-resample-context.ts:187
Free resampler context.
Releases all resources associated with the resampler. The context becomes invalid after calling this.
Direct mapping to swr_free().
Returns
void
Example
resampler.free();
// Resampler is now invalidSee
- close For closing without freeing
- Symbol.dispose For automatic cleanup
getDelay()
getDelay(
base):bigint
Defined in: src/lib/software-resample-context.ts:418
Get resampler delay.
Returns the number of samples currently buffered in the resampler. These samples will be output when flushing or with new input.
Direct mapping to swr_get_delay().
Parameters
base
bigint
Time base for the returned delay
Returns
bigint
Delay in samples at the given base rate
Example
// Get delay in output sample rate
const delay = resampler.getDelay(48000n);
console.log(`${delay} samples buffered`);
// Get delay in microseconds
const delayUs = resampler.getDelay(1000000n);
console.log(`${delayUs} microseconds delay`);getNative()
getNative():
NativeSoftwareResampleContext
Defined in: src/lib/software-resample-context.ts:601
Internal
Get the underlying native SoftwareResampleContext object.
Returns
The native SoftwareResampleContext binding object
Implementation of
getOption()
Get an option value from this object.
Uses the AVOption API to retrieve options.
Direct mapping to av_opt_get* functions.
Param
Option name
Param
Option type (defaults to AV_OPT_TYPE_STRING)
Param
Search flags (default: AV_OPT_SEARCH_CHILDREN)
Example
import { AV_OPT_TYPE_STRING, AV_OPT_TYPE_RATIONAL, AV_OPT_TYPE_PIXEL_FMT, AV_OPT_TYPE_INT64 } from 'node-av/constants';
// String options (default)
const preset = obj.getOption('preset');
const codec = obj.getOption('codec', AV_OPT_TYPE_STRING);
// Typed options
const framerate = obj.getOption('framerate', AV_OPT_TYPE_RATIONAL); // Returns {num, den}
const pixFmt = obj.getOption('pix_fmt', AV_OPT_TYPE_PIXEL_FMT); // Returns AVPixelFormat
const bitrate = obj.getOption('bitrate', AV_OPT_TYPE_INT64); // Returns bigintCall Signature
getOption(
name,type?,searchFlags?):string|null
Defined in: src/lib/option.ts:1259
Parameters
name
string
type?
searchFlags?
Returns
string | null
Inherited from
Call Signature
getOption(
name,type,searchFlags?):string|null
Defined in: src/lib/option.ts:1260
Parameters
name
string
type
searchFlags?
Returns
string | null
Inherited from
Call Signature
getOption(
name,type,searchFlags?):number|null
Defined in: src/lib/option.ts:1263
Parameters
name
string
type
searchFlags?
Returns
number | null
Inherited from
Call Signature
getOption(
name,type,searchFlags?):bigint|null
Defined in: src/lib/option.ts:1264
Parameters
name
string
type
searchFlags?
Returns
bigint | null
Inherited from
Call Signature
getOption(
name,type,searchFlags?):number|null
Defined in: src/lib/option.ts:1265
Parameters
name
string
type
searchFlags?
Returns
number | null
Inherited from
Call Signature
getOption(
name,type,searchFlags?):bigint|null
Defined in: src/lib/option.ts:1266
Parameters
name
string
type
searchFlags?
Returns
bigint | null
Inherited from
Call Signature
getOption(
name,type,searchFlags?):number|null
Defined in: src/lib/option.ts:1267
Parameters
name
string
type
searchFlags?
Returns
number | null
Inherited from
Call Signature
getOption(
name,type,searchFlags?):boolean|null
Defined in: src/lib/option.ts:1268
Parameters
name
string
type
searchFlags?
Returns
boolean | null
Inherited from
Call Signature
getOption(
name,type,searchFlags?):number|null
Defined in: src/lib/option.ts:1269
Parameters
name
string
type
searchFlags?
Returns
number | null
Inherited from
Call Signature
getOption(
name,type,searchFlags?):number|null
Defined in: src/lib/option.ts:1270
Parameters
name
string
type
searchFlags?
Returns
number | null
Inherited from
Call Signature
getOption(
name,type,searchFlags?):number|null
Defined in: src/lib/option.ts:1273
Parameters
name
string
type
searchFlags?
Returns
number | null
Inherited from
Call Signature
getOption(
name,type,searchFlags?):number|null
Defined in: src/lib/option.ts:1274
Parameters
name
string
type
searchFlags?
Returns
number | null
Inherited from
Call Signature
getOption(
name,type,searchFlags?):IRational|null
Defined in: src/lib/option.ts:1277
Parameters
name
string
type
searchFlags?
Returns
IRational | null
Inherited from
Call Signature
getOption(
name,type,searchFlags?):IRational|null
Defined in: src/lib/option.ts:1278
Parameters
name
string
type
searchFlags?
Returns
IRational | null
Inherited from
Call Signature
getOption(
name,type,searchFlags?):AVPixelFormat|null
Defined in: src/lib/option.ts:1279
Parameters
name
string
type
searchFlags?
Returns
AVPixelFormat | null
Inherited from
Call Signature
getOption(
name,type,searchFlags?):AVSampleFormat|null
Defined in: src/lib/option.ts:1280
Parameters
name
string
type
searchFlags?
Returns
AVSampleFormat | null
Inherited from
Call Signature
getOption(
name,type,searchFlags?):IDimension|null
Defined in: src/lib/option.ts:1281
Parameters
name
string
type
searchFlags?
Returns
IDimension | null
Inherited from
Call Signature
getOption(
name,type,searchFlags?):ChannelLayout|null
Defined in: src/lib/option.ts:1282
Parameters
name
string
type
searchFlags?
Returns
ChannelLayout | null
Inherited from
Call Signature
getOption(
name,type,searchFlags?):Dictionary|null
Defined in: src/lib/option.ts:1283
Parameters
name
string
type
searchFlags?
Returns
Dictionary | null
Inherited from
Call Signature
getOption(
name,type,searchFlags?):string|null
Defined in: src/lib/option.ts:1284
Parameters
name
string
type
searchFlags?
Returns
string | null
Inherited from
getOutSamples()
getOutSamples(
inSamples):number
Defined in: src/lib/software-resample-context.ts:440
Calculate output sample count.
Calculates how many output samples will be produced for a given number of input samples.
Direct mapping to swr_get_out_samples().
Parameters
inSamples
number
Number of input samples
Returns
number
Number of output samples
Example
const outSamples = resampler.getOutSamples(1024);
console.log(`1024 input samples -> ${outSamples} output samples`);init()
init():
number
Defined in: src/lib/software-resample-context.ts:166
Initialize resampler.
Initializes the resampler after configuration. Must be called before any conversion operations.
Direct mapping to swr_init().
Returns
number
0 on success, negative AVERROR on error:
- AVERROR_EINVAL: Invalid configuration
- AVERROR_ENOMEM: Memory allocation failure
Example
import { FFmpegError } from 'node-av';
const ret = resampler.init();
FFmpegError.throwIfError(ret, 'init');See
- allocSetOpts2 For configuration
- isInitialized To check initialization status
injectSilence()
injectSilence(
count):number
Defined in: src/lib/software-resample-context.ts:590
Inject silence.
Injects silent samples into the output. Used for padding or synchronization.
Direct mapping to swr_inject_silence().
Parameters
count
number
Number of silent samples to inject
Returns
number
0 on success, negative AVERROR on error
Example
// Inject 100 silent samples
const ret = resampler.injectSilence(100);
if (ret >= 0) {
console.log(`Injected ${ret} silent samples`);
}isInitialized()
isInitialized():
boolean
Defined in: src/lib/software-resample-context.ts:391
Check if initialized.
Returns whether the resampler has been initialized.
Direct mapping to swr_is_initialized().
Returns
boolean
True if initialized, false otherwise
Example
if (!resampler.isInitialized()) {
resampler.init();
}See
init To initialize
listOptions()
listOptions():
OptionInfo[]
Defined in: src/lib/option.ts:1400
List all available options for this object.
Uses the AVOption API to enumerate all options. Useful for discovering available settings and their types.
Direct mapping to av_opt_next() iteration.
Returns
Array of option information objects
Example
const options = obj.listOptions();
for (const opt of options) {
console.log(`${opt.name}: ${opt.help}`);
console.log(` Type: ${opt.type}, Default: ${opt.defaultValue}`);
console.log(` Range: ${opt.min} - ${opt.max}`);
}See
OptionInfo For option metadata structure
Inherited from
nextPts()
nextPts(
pts):bigint
Defined in: src/lib/software-resample-context.ts:462
Calculate next PTS.
Calculates the presentation timestamp for the next output sample.
Direct mapping to swr_next_pts().
Parameters
pts
bigint
Current presentation timestamp
Returns
bigint
Next presentation timestamp
Example
let pts = 0n;
pts = resampler.nextPts(pts);
console.log(`Next PTS: ${pts}`);setChannelMapping()
setChannelMapping(
channelMap):number
Defined in: src/lib/software-resample-context.ts:512
Set channel mapping.
Sets custom channel mapping for remixing.
Direct mapping to swr_set_channel_mapping().
Parameters
channelMap
number[]
Array mapping input to output channels
Returns
number
0 on success, negative AVERROR on error
Example
// Map stereo to reverse stereo (swap L/R)
const ret = resampler.setChannelMapping([1, 0]);
FFmpegError.throwIfError(ret, 'setChannelMapping');setCompensation()
setCompensation(
sampleDelta,compensationDistance):number
Defined in: src/lib/software-resample-context.ts:490
Set compensation.
Adjusts the resampling rate to compensate for clock drift. Used for audio/video synchronization.
Direct mapping to swr_set_compensation().
Parameters
sampleDelta
number
Sample difference to compensate
compensationDistance
number
Distance over which to compensate
Returns
number
0 on success, negative AVERROR on error:
- AVERROR_EINVAL: Invalid parameters
Example
import { FFmpegError } from 'node-av';
// Compensate 10 samples over 1000 samples
const ret = resampler.setCompensation(10, 1000);
FFmpegError.throwIfError(ret, 'setCompensation');setMatrix()
setMatrix(
matrix,stride):number
Defined in: src/lib/software-resample-context.ts:540
Set mixing matrix.
Sets a custom mixing matrix for channel remapping.
Direct mapping to swr_set_matrix().
Parameters
matrix
number[]
Mixing matrix coefficients
stride
number
Matrix row stride
Returns
number
0 on success, negative AVERROR on error
Example
// Custom downmix matrix
const matrix = [
1.0, 0.0, // Left channel
0.0, 1.0, // Right channel
];
const ret = resampler.setMatrix(matrix, 2);
FFmpegError.throwIfError(ret, 'setMatrix');setOption()
Set an option on this object.
Uses the AVOption API to set options. Available options depend on the specific object type.
Direct mapping to av_opt_set* functions.
Param
Option name
Param
Option value
Param
Option type (defaults to AV_OPT_TYPE_STRING)
Param
Search flags (default: AV_OPT_SEARCH_CHILDREN)
Example
import { FFmpegError } from 'node-av';
import { AV_OPT_TYPE_STRING, AV_OPT_TYPE_INT64, AV_OPT_TYPE_RATIONAL, AV_OPT_TYPE_PIXEL_FMT } from 'node-av/constants';
// String options (default)
let ret = obj.setOption('preset', 'fast');
FFmpegError.throwIfError(ret, 'set preset');
ret = obj.setOption('codec', 'h264', AV_OPT_TYPE_STRING);
FFmpegError.throwIfError(ret, 'set codec');
// Integer options
ret = obj.setOption('bitrate', 2000000, AV_OPT_TYPE_INT64);
FFmpegError.throwIfError(ret, 'set bitrate');
ret = obj.setOption('threads', 4, AV_OPT_TYPE_INT);
FFmpegError.throwIfError(ret, 'set threads');
// Complex types with proper types
ret = obj.setOption('framerate', {num: 30, den: 1}, AV_OPT_TYPE_RATIONAL);
FFmpegError.throwIfError(ret, 'set framerate');
ret = obj.setOption('pix_fmt', AV_PIX_FMT_YUV420P, AV_OPT_TYPE_PIXEL_FMT);
FFmpegError.throwIfError(ret, 'set pixel format');Call Signature
setOption(
name,value):number
Defined in: src/lib/option.ts:1037
Parameters
name
string
value
string | number | bigint | boolean | null | undefined
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1038
Parameters
name
string
value
string
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1039
Parameters
name
string
value
string
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1042
Parameters
name
string
value
number
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1043
Parameters
name
string
value
bigint
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1044
Parameters
name
string
value
number
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1045
Parameters
name
string
value
bigint
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1046
Parameters
name
string
value
number
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1047
Parameters
name
string
value
boolean
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1048
Parameters
name
string
value
number
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1049
Parameters
name
string
value
number
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1052
Parameters
name
string
value
number
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1053
Parameters
name
string
value
number
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1056
Parameters
name
string
value
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1057
Parameters
name
string
value
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1058
Parameters
name
string
value
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1059
Parameters
name
string
value
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1060
Parameters
name
string
value
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1061
Parameters
name
string
value
number | bigint
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1062
Parameters
name
string
value
Buffer
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1063
Parameters
name
string
value
number[]
type
searchFlags?
Returns
number
Inherited from
Call Signature
setOption(
name,value,type,searchFlags?):number
Defined in: src/lib/option.ts:1064
Parameters
name
string
value
type
searchFlags?
Returns
number
