Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0 - Custom Binding #44

Open
wants to merge 97 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 74 commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
525377f
Move changes to release-2.0 branch
vectrixdevelops Oct 3, 2016
937c85b
Add node-gyp to install in travis
vectrixdevelops Oct 3, 2016
49f1b07
Add mpg123 submodule
vectrixdevelops Oct 3, 2016
0edb96d
Modify gitignore
vectrixdevelops Oct 3, 2016
e63ab36
Add windows configurations
vectrixdevelops Oct 3, 2016
2a5a37b
Add Linux config for mpg123
jamen Oct 6, 2016
23ca6f9
Add libasound to .travis.yml
vectrixdevelops Oct 6, 2016
9b83b6d
Add node-gyp to travis script
vectrixdevelops Oct 6, 2016
988ab97
JavaScript Implementation (#24)
vectrixdevelops Oct 14, 2016
b896919
Add test and fix most bugs
vectrixdevelops Oct 22, 2016
dd4d4c9
Clean up debug messages
vectrixdevelops Oct 22, 2016
e401110
Fix write method
vectrixdevelops Oct 22, 2016
f21c47d
Fix test message output
vectrixdevelops Oct 22, 2016
9625c5d
Update submodule to 1.23.8
vectrixdevelops Oct 22, 2016
123327c
Add autoFlush option and add end method to test
vectrixdevelops Oct 22, 2016
802cb5a
Delete audio handler on close
vectrixdevelops Oct 22, 2016
17ffb55
Add autoFlush test
vectrixdevelops Oct 22, 2016
960f5e5
Add sink implementation
vectrixdevelops Nov 2, 2016
1f29553
Simplify implementation
vectrixdevelops Nov 4, 2016
d1af218
Remove support for node 0.10 and 0.12
vectrixdevelops Nov 4, 2016
ceac771
Add streams implementation
vectrixdevelops Nov 4, 2016
02097dc
Add pullstream implementation
vectrixdevelops Nov 4, 2016
ad5247a
mac config
whaaaley Nov 4, 2016
b385e05
Add usage into readme
vectrixdevelops Nov 4, 2016
b463e0b
Add docs to direct
vectrixdevelops Nov 4, 2016
52d54c3
Add docs to pull
vectrixdevelops Nov 4, 2016
2616180
Add docs to stream
vectrixdevelops Nov 4, 2016
e1c7bee
Remove remaining param from write publicly
vectrixdevelops Nov 4, 2016
a9da5e3
Add browser note
vectrixdevelops Nov 4, 2016
31b832a
Use tape for tests
vectrixdevelops Nov 4, 2016
613e8f9
Replace validate with objectAssign
vectrixdevelops Nov 5, 2016
3e24ec3
Update submodule to fix coreaudio and remove unnecessary compat headers
vectrixdevelops Nov 5, 2016
fbcd237
Add browser implementation
vectrixdevelops Nov 5, 2016
280da98
Add mpg123 as an optional dependency
vectrixdevelops Nov 5, 2016
01cc009
Remove node-gyp from travis
vectrixdevelops Nov 5, 2016
2d3c9dd
2.0.0-1
vectrixdevelops Nov 5, 2016
ba50a61
Fix package.json
vectrixdevelops Nov 5, 2016
963fb27
2.0.0-2
vectrixdevelops Nov 5, 2016
8a92b61
Change defaults and browser related functions and information
vectrixdevelops Nov 5, 2016
de88016
2.0.0-3
vectrixdevelops Nov 5, 2016
675073a
Update audio-mpg123
vectrixdevelops Nov 6, 2016
5cfc9e4
Add latest node version to travis.yml and rename tests
vectrixdevelops Nov 7, 2016
74b887d
Bump audio-mpg123 version
vectrixdevelops Nov 7, 2016
a257382
2.0.0-4
vectrixdevelops Nov 7, 2016
37a7449
Add test to travis.yml
vectrixdevelops Nov 7, 2016
b76ffa2
Simplify stream.js
dy Nov 8, 2016
b488588
Simplify browser includes
dy Nov 8, 2016
0821744
Add node sine test
dy Nov 8, 2016
6f354bd
Fix browser entry
dy Nov 8, 2016
f48bbf5
Resurrect classic test-cases
dy Nov 8, 2016
9cfb8d7
Fix some eslints
dy Nov 8, 2016
ef06e14
Fix test case
dy Nov 8, 2016
6f8f4c9
Update audio-mpg123 to 1.2.0
vectrixdevelops Nov 8, 2016
8f21d51
Update audio-mpg123 to v1.2.2
Nov 8, 2016
ec82b6c
Convert some debugs to errors and update travis
vectrixdevelops Nov 8, 2016
64f6ca8
Update audio-mpg123 to 1.2.3
vectrixdevelops Nov 9, 2016
ed3a41f
Add sine test to package scripts
vectrixdevelops Nov 9, 2016
5984b3a
2.0.0-5
vectrixdevelops Nov 9, 2016
aca6843
Rename index.js to node.js
jamen Jan 28, 2017
e240fee
Change import to browser/node env
jamen Jan 28, 2017
d94957d
Add yarn.lock
jamen Jan 28, 2017
f35f20f
Fix audio-speaker/browser
jamen Mar 7, 2017
e15ba63
Remove pull stream and node stream support (move to another package)
vectrixdevelops Jun 21, 2017
9f17096
Fix up readme
vectrixdevelops Jun 21, 2017
91dacb1
Remove uneeded tests
vectrixdevelops Jun 21, 2017
f4c8cf1
Make improvement to test ending
vectrixdevelops Jun 21, 2017
57342ef
Add sine test
vectrixdevelops Jun 21, 2017
7db3a0c
Improve auto flush and add auto flush test
vectrixdevelops Jun 21, 2017
67706d6
Improve example in readme
vectrixdevelops Jun 21, 2017
da39399
Update pcm-util
dy Jun 21, 2017
8321ed8
Update test/deps
dy Jun 21, 2017
944f254
Add browser version & test
dy Jun 21, 2017
bf6e77c
Clean up
vectrixdevelops Jun 23, 2017
c8a5d31
Add callback for abandoned remaining chunks
vectrixdevelops Jun 23, 2017
9f4adea
Fix speaker options assertion
vectrixdevelops Jun 23, 2017
a130cb2
Refactor tests
dy Jun 23, 2017
b5f1816
Fix browser tests
dy Jun 23, 2017
41a7caa
Fix up use of assertion
vectrixdevelops Jun 23, 2017
b746212
Remove assertion
vectrixdevelops Jun 23, 2017
1f60aed
Remove the assertion I didn't see
vectrixdevelops Jun 23, 2017
f980a8e
Add temporary test fix
vectrixdevelops Jun 24, 2017
2ca1050
Tidy up end method
vectrixdevelops Jun 24, 2017
a75a8cd
Upgrade Node implentation and tests
jamen Jun 25, 2017
3134239
Fix minor things from Node impl and package.json
jamen Jun 25, 2017
d8aa826
Fix readme link to audio-speaker-stream
jamen Jun 25, 2017
cae0469
Introduce pcm-convert
dy Jun 25, 2017
49339ca
Merge branch 'release-2.0-browser' of github.com:audiojs/audio-speake…
dy Jun 25, 2017
8ff35ae
Fix endianness
dy Jun 25, 2017
394eb4f
Fix buffer creation
dy Jun 25, 2017
51d4f9d
Fix tests
dy Jun 25, 2017
75b92c2
Make test work (yay)
dy Jun 25, 2017
07ca65a
Make tests pass perfectly
dy Jun 25, 2017
ddb3592
Fix formal details
dy Jun 25, 2017
09a8f99
Update readme/details
dy Jun 25, 2017
d70877b
Simplify inner structure
dy Jun 25, 2017
856d983
Update pcm-convert
dy Jun 26, 2017
4adf45e
Return dtypes
dy Jun 26, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,32 @@ git config --global core.excludesfile ~/.gitignore
//update files since .ignore won't if already tracked
git rm --cached <file>

# Node GYP #
############
/build

# Binding #
###########
Makefile
Makefile.in
configure
config.status
config.h.in
config.log
config.cache
autom4te.cache
aclocal.m4
libmpg123.pc
libout123.pc
libmpg123.spec
mpg123.spec
unix2dos
unix2dos.c
/libtool
/.Tpo
/.deps
/.libs

# Compiled source #
###################
*.com
Expand Down Expand Up @@ -91,6 +117,7 @@ bower_components
.CVS
intermediate
publish
.vscode
.idea
.graphics
_test
Expand All @@ -104,5 +131,5 @@ tmp
.netrwhist

bundle.*
build
_demo

_demo
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/mpg123"]
path = src/mpg123
url = https://github.com/audiojs/mpg123
27 changes: 22 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
sudo: false
language: node_js
node_js:
- "node"
- "6"
- "5"
- "4"
- "0.12"
- "0.10"
addons:
apt:
packages:
- libgnome-keyring-dev
- g++-4.8
- libasound2-dev
sources:
- ubuntu-toolchain-r-test
env:
- CXX=g++-4.8
install:
- npm install -g npm
- npm install -g node-pre-gyp
- npm install
- cd ./node_modules/audio-mpg123
- node-pre-gyp clean
- node-pre-gyp rebuild --mpg123-module=dummy
script:
- node -v
- npm -v
- npm run test
matrix:
fast_finish: true
allow_failures:
- node_js: "0.10"
- node_js: "0.12"
7 changes: 7 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright (c) 2016 AudioJS <https://github.com/audiojs>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15 changes: 0 additions & 15 deletions browser-direct.js

This file was deleted.

22 changes: 0 additions & 22 deletions browser-stream.js

This file was deleted.

20 changes: 20 additions & 0 deletions browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/** @module audio-speaker/browser */
'use strict'

var objectAssign = require('object-assign')
var createContext = require('audio-context')
var createWriter = require('web-audio-write')

module.exports = function createSpeaker (opts) {
var options = {}

options = objectAssign({
channels: 1,
Copy link
Member

@dy dy Jun 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want default speaker to have mono output? I'd drop that option, but no worries I will handle that once we are merged.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point, this is the same in node and in the readme. So if you'd like to change that feel free. 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would go in line with your recent audio-buffer changes, right? I'm for keeping this. 👍

sampleRate: 44100
}, opts)

var ctx = options.context || createContext(options)
var write = createWriter(ctx.destination, options)

return write
}
Empty file removed cli.js
Empty file.
97 changes: 0 additions & 97 deletions direct.js

This file was deleted.

1 change: 0 additions & 1 deletion element.html

This file was deleted.

44 changes: 0 additions & 44 deletions element.js

This file was deleted.

9 changes: 6 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/** @module audio-speaker */
'use strict';
module.exports = require('./direct');
'use strict'

module.exports =
require('is-browser')
? require('./browser')
: require('./node')
Loading