audio-buffer-from
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -58,2 +58,3 @@ /** | ||
if (channels == null) channels = source.numberOfChannels | ||
if (sampleRate == null) sampleRate = source.sampleRate | ||
@@ -60,0 +61,0 @@ if (source._channelData) { |
{ | ||
"name": "audio-buffer-from", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Create AudioBuffer from any source", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
# audio-buffer-from [![Build Status](https://travis-ci.org/audiojs/audio-buffer-from.svg?branch=master)](https://travis-ci.org/audiojs/audio-buffer-from) [![unstable](https://img.shields.io/badge/stability-unstable-green.svg)](http://github.com/badges/stability-badges) | ||
# audio-buffer-from [![Build Status](https://travis-ci.org/audiojs/audio-buffer-from.svg?branch=master)](https://travis-ci.org/audiojs/audio-buffer-from) [![unstable](https://img.shields.io/badge/stability-unstable-green.svg)](http://github.com/badges/stability-badges) [![Greenkeeper badge](https://badges.greenkeeper.io/audiojs/audio-buffer-from.svg)](https://greenkeeper.io/) | ||
@@ -3,0 +3,0 @@ Create [AudioBuffer](https://github.com/audiojs/audio-buffer) from any source. |
12
test.js
@@ -351,3 +351,14 @@ 'use strict' | ||
let a = createBuffer(1, 3) | ||
let b = createBuffer(a, 2) | ||
t.equal(a.numberOfChannels, 3) | ||
t.equal(b.numberOfChannels, 2) | ||
t.equal(b.length, 1) | ||
t.end() | ||
}) | ||
t.only('from audiobuffer save sample rate', t => { | ||
let a = createBuffer(1, {channels: 3, sampleRate: 10000}) | ||
let b = createBuffer(a, 2) | ||
@@ -358,4 +369,5 @@ | ||
t.equal(b.length, 1) | ||
t.equal(b.sampleRate, 10000) | ||
t.end() | ||
}) |
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
18885
412