soundengine
Advanced tools
Comparing version 1.1.2 to 1.2.0
{ | ||
"name": "soundengine", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"description": "A C++ node.js module that allows manipulating audio streams from/to soundcards and work with the fft of the signal etc.", | ||
@@ -5,0 +5,0 @@ "main": "build/Release/soundengine.node", |
@@ -88,30 +88,27 @@ # Soundengine | ||
Property | Type | Description | ||
------------------|-----------|------------------------------------------------------- | ||
id | number | The device id to use in the engine options. | ||
name | string | The device name. | ||
defaultSampleRate | number | The default sample rate of the device. | ||
maxInputChannels | number | The maximum supported input channels for this device. | ||
maxOutputChannels | number | The maximum supported output channels for this device. | ||
Property | Type | Description | ||
-------------------------|-----------|------------------------------------------------------- | ||
id | number | The device id to use in the engine options. | ||
name | string | The device name. | ||
defaultSampleRate | number | The default sample rate of the device. | ||
maxInputChannels | number | The maximum supported input channels for this device. | ||
maxOutputChannels | number | The maximum supported output channels for this device. | ||
defaultLowInputLatency | number | [See PortAudio docs](http://www.portaudio.com/docs/latency.html) | ||
defaultLowOutputLatency | number | [See PortAudio docs](http://www.portaudio.com/docs/latency.html) | ||
defaultHighInputLatency | number | [See PortAudio docs](http://www.portaudio.com/docs/latency.html) | ||
defaultHighOutputLatency | number | [See PortAudio docs](http://www.portaudio.com/docs/latency.html) | ||
### Engine methods | ||
* `addListener(eventName: string, listener: Function)` - Alias for `on`. | ||
* `eventNames(): string[]` - Lists all available event names. | ||
* `listenerCount(eventName: string): number` - Returns the number of `listeners` for the event named `eventName`. | ||
* `on(eventName: string, listener: Function)` - Adds the `listener` function to the end of the listeners array for the event named `eventName`. | ||
* `once(eventName: string, listener: Function)` - Adds a one time `listener` function for the event named `eventName`. | ||
* `prependListener(eventName: string, listener: Function)` - Adds the `listener` function to the beginning of the listeners array for the event named `eventName`. | ||
* `prependOnceListener(eventName: string, listener: Function)` - Adds a one time `listener` function for the event named `eventName` to the beginning of the listeners array. | ||
* `removeAllListeners(eventName?: string)` - Removes all listeners, or those of the specified `eventName`. | ||
* `removeListener(eventName: string, listener: Function)` - Removes the specified `listener` from the listener array for the event named `eventName`. | ||
* `loadRecording(file: string)` - Loads a wave `file` that is then playable. | ||
The engine class actually has almost all the methods of a nodejs [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter) to interact with the upcomming events. Furthermore these methods exist: | ||
* `loadRecording(file: string)` - Loads a wave `file` that is then playable with `startPlayback()`. <sup>(1)</sup> | ||
* `startPlayback()` - Starts playback of the last recording or loaded file. | ||
* `stopPlayback()` - Stops playback. | ||
* `pausePlayback()` - Pauses playback. | ||
* `isPlaying(): boolean` - Return if playback is active. | ||
* `isPlaying(): boolean` - Returns if playback is active. | ||
* `startRecording()` - Starts recording. | ||
* `stopRecording()` - Stops recording. | ||
* `deleteRecording()` - Deletes the recording that is currently held in memory. | ||
* `saveRecording(file: string)` - Saves the recording to a wave `file`. | ||
* `saveRecording(file: string)` - Saves the recording to a wave `file`. <sup>(2)</sup> | ||
* `isRecording(): boolean` - Returns if recording is active. | ||
@@ -132,12 +129,18 @@ * `getRecordingSamples(): number` - Return the number of total samples. | ||
***Notes:***<br> | ||
*(1) Currently only 32bit floating point waves with the same samplerate of the current engine can be loaded (and the header will not be checked).*<br> | ||
*(2) The wave files are 32bit floating point.* | ||
### Engine options | ||
Option | Type | Default | Description | ||
----------------|-----------|-----------------------|------------ | ||
sampleRate | number | 44100 | Samples per second for each channel. | ||
bufferSize | number | 1024 | The count of samples for each processing iteration. | ||
inputChannels | number | 1 | The number of input channels. | ||
outputChannels | number | 1 | The number of output channels (should equal inputChannels). | ||
inputDevice | number | default input device | The id of the input device to use. | ||
outputDevice | number | default output device | The id of the output device to use. | ||
Option | Type | Default | Description | ||
----------------|-----------|-----------------------------|------------ | ||
sampleRate | number | 44100 | Samples per second for each channel. | ||
bufferSize | number | 1024 | The count of samples for each processing iteration. | ||
inputChannels | number | 1 | The number of input channels. | ||
outputChannels | number | 1 | The number of output channels (should equal inputChannels). | ||
inputDevice | number | default input device | The id of the input device to use. | ||
outputDevice | number | default output device | The id of the output device to use. | ||
inputLatency | number | default high input latency | [See PortAudio docs](http://www.portaudio.com/docs/latency.html) | ||
outputLatency | number | default high output latency | [See PortAudio docs](http://www.portaudio.com/docs/latency.html) | ||
@@ -144,0 +147,0 @@ ## Beep options |
@@ -9,2 +9,4 @@ declare namespace soundengine { | ||
outputDevice?: number | ||
inputLatency?: number | ||
outputLatency?: number | ||
fftWindowSize?: number | ||
@@ -11,0 +13,0 @@ fftOverlapSize?: number |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
260549
52
84
176