cacophony
Advanced tools
Comparing version 0.5.8 to 0.5.9
@@ -21,3 +21,3 @@ /** | ||
import { BaseSound, FadeType, LoopCount, PanType, Position } from "./cacophony"; | ||
import { AudioContext, BiquadFilterNode, GainNode, IPannerOptions, SourceNode } from "./context"; | ||
import type { AudioContext, BiquadFilterNode, GainNode, IPannerOptions, SourceNode } from "./context"; | ||
import { FilterManager } from "./filters"; | ||
@@ -24,0 +24,0 @@ export declare class Playback extends FilterManager implements BaseSound { |
@@ -125,2 +125,9 @@ /** | ||
removeFilter(filter: BiquadFilterNode): void; | ||
/*** | ||
* Gets or sets the volume of the sound. This volume level affects all current and future playbacks of this sound instance. | ||
* The volume is specified as a linear value between 0 (silent) and 1 (full volume). | ||
* | ||
* @returns {number} The current volume of the sound. | ||
* @param {number} volume - The new volume level to set, must be between 0 and 1. | ||
*/ | ||
get volume(): number; | ||
@@ -127,0 +134,0 @@ set volume(volume: number); |
{ | ||
"name": "cacophony", | ||
"version": "0.5.8", | ||
"version": "0.5.9", | ||
"description": "Typescript audio library with caching", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -23,3 +23,3 @@ /** | ||
import { BaseSound, FadeType, LoopCount, PanType, Position } from "./cacophony"; | ||
import { AudioBuffer, AudioContext, BiquadFilterNode, GainNode, IPannerOptions, PannerNode, SourceNode, StereoPannerNode } from "./context"; | ||
import type { AudioBuffer, AudioBufferSourceNode, AudioContext, BiquadFilterNode, GainNode, IPannerOptions, PannerNode, SourceNode, StereoPannerNode } from "./context"; | ||
import { FilterManager } from "./filters"; | ||
@@ -29,3 +29,2 @@ | ||
export class Playback extends FilterManager implements BaseSound { | ||
@@ -460,4 +459,2 @@ private context: AudioContext; | ||
} | ||
// Check if the source is an AudioBufferSourceNode | ||
if (this.source instanceof AudioBufferSourceNode) { | ||
@@ -464,0 +461,0 @@ if (loopCount === undefined) { |
@@ -264,2 +264,11 @@ /** | ||
/*** | ||
* Gets or sets the volume of the sound. This volume level affects all current and future playbacks of this sound instance. | ||
* The volume is specified as a linear value between 0 (silent) and 1 (full volume). | ||
* | ||
* @returns {number} The current volume of the sound. | ||
* @param {number} volume - The new volume level to set, must be between 0 and 1. | ||
*/ | ||
get volume(): number { | ||
@@ -266,0 +275,0 @@ return this._volume; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1654032
6857