audiocogs / aurora.js Goto Github PK
View Code? Open in Web Editor NEWJavaScript audio decoding framework
Home Page: http://audiocogs.org/codecs
JavaScript audio decoding framework
Home Page: http://audiocogs.org/codecs
Using Firefox 21 and the latest aurora, flac, mp3, I get "too much recursion" in aurora.js:1005.
The line says:
event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
I am using aurora.js with flac.js and the 'end' event isn't fired at the end of playback. I've identified the issue to be on the line that says
if (_this.asset.ended)
in the function
Player.prototype.startPlaying
As _this.asset.ended is undefined.
Is seeing if we can use the web audio api's decodeAudioData() function before we set up our own decoder a good idea?
Hi!
I needed a JavaScript sound file decoder for node-web-audio-api, and after a couple of hours trying to figure out how aurora works, I have to say it works great.
I have seen the last npm release is quite old, and as I would prefer to add it as a dependency rather than bundling it, I was wondering if you could publish?
Though the lib works great, I think it deserves some love (no offense), for example the build system seems bit odd to me, and also it seems to be a full framework to build a player ... what about splitting in smaller better documented components?
In short, do you have any roadmap, any plans for the future?
I plan to use the audio-decoding part extensively, so I'd be glad to help taking it out, or repackaging it, writing docs and so on ...
I setup aurora.js with mp3.js, flac.js, and alac.js, and I set up the player as in the Wiki.
When I run player.play()
, it starts playing - in another world.
The JavaScript object's currentTime
is increasing, volume
is set to 100, and my computer's audio is working (regular HTML5 <audio>
tag works fine.
I'm also noticing this problem on the demo site. I'm currently using Chrome v31.0.1650.16
It works fine in Firefox, though.
Playing Mono (1 channel) audio results in high-speed playback. This is using flac.js and jsmad, so I figured the Aurora might be the common part. The audio sample rate is 44100, but single channel.
In the docs found here https://github.com/audiocogs/aurora.js/wiki/Player-Class-Reference#wiki-progress-event it states the output is in percentage, but I see milliseconds in the console. I don't mind milliseconds, but which one is it?
I'm still trying to get this library working, it looks really awesome, but having a few issues:
Im getting the error "Uncaught TypeError: Object # has no method 'decodePacket' " from the following code.
The issue seems to originate in the Queue, or something to do with it...
var queue = new AV.Queue(decoder);
Any help appreciated.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>JS</title>
<script type="text/javascript" src="js/aurora.js" ></script>
<script type="text/javascript" src="js/mp3.js" ></script>
</head>
<body>
<script type="text/javascript">
window.AudioContext = window.AudioContext || window.webkitAudioContext;
var web_audio_context = new AudioContext();
// the known format (usually embedded in the container format)
var format = {
formatID: 'mp3',
sampleRate: 44100,
channelsPerFrame: 2,
bitsPerChannel: 16
};
// the cookie used by the decoder (usually embedded in the container)
var cookie = {
maxBlockSize: 4096,
maxFrameSize: 14323,
minBlockSize: 4096,
minFrameSize: 1751
};
var audio_sock = new WebSocket('ws://localhost:8071');
audio_sock.binaryType = 'arraybuffer';
// create a fake source event emitter
var source = new AV.EventEmitter;
Decoder = AV.Decoder.find("mp3")
// create the decoder
var decoder = new Decoder(source, format);
// emit the cookie
source.emit('cookie', cookie);
// create a queue to hold decoded chunks
var queue = new AV.Queue(decoder);
// create an AudioDevice for playback
var device = AV.AudioDevice.create(format.sampleRate, format.channelsPerFrame);
// read the first frame
var frame = queue.read();
var frameOffset = 0;
var div = decoder.floatingPoint ? 1 : Math.pow(2, format.bitsPerChannel - 1);
// start listening for the device's refill event
device.on('refill', function(buffer) {
var bufferOffset = 0;
// write the decoded frames into the buffer
while (frame && bufferOffset < buffer.length) {
var max = Math.min(frame.length - frameOffset, buffer.length - bufferOffset);
for (var i = 0; i < max; i++) {
buffer[bufferOffset++] = frame[frameOffset++] / div;
}
if (frameOffset === frame.length) {
frame = queue.read();
frameOffset = 0;
}
}
// if we ran out of data, stop the device
if (!frame) {
device.off('refill', arguments.callee);
}
});
audio_sock.onmessage = function(e){
var buf = new AV.Buffer(e.data);
// emit the buffer of audio data to the decoder
source.emit('data', buf);
}
</script>
</body>
</html>
I've seen that someone posted this project as a suggestion on the shumway project, so i thought pitching an idea over here wouldn't do much harm.
Firefox OS already has an inbuilt media player, but it lacks support for many formats.
So since you already have working codecs, building a HTML5 media player using them probably shouldn't be too hard for you.
Just a small suggestion, if you don't like it i hope that at least someone else will.
Thank you for your time, good luck with your project and any future endeavors.
How I can call callback function after my song end? Automatically?
Given an app that's playing music from a server, among playing stuff, there's a lot of UI rendering going on, and for example, when I have a bigger list of songs to load, the sound gets distrupted for a fraction of a second, or even more.
Is there any way to prevent this? (I'm thinking maybe web workers somehow?)
This is sort-of a question (possibly a bug).
I'm developing a small web application to do ABX testing in the browser. It works with the Web Audio API as that is going to be the future (the Firefox api is deprecated). It needs to decode the entire audio file in memory, as it is currently implemented. I wanted to add FLAC support (as FLAC isn't very well supported in browsers, AFAIK only Chrome OS has support for the format).
The test.html (in flac.js) worked. I added a 'data' event handler to the asset (player.asset). When playing the audio file (via player.play()), the data callback fired for every bit of data (which I do not want, I want the entire arraybuffer), but when calling player.asset.start(), two chunks of data were given to the data callback, but nothing more happened.
Is it actually possible to decode the whole file in one arraybuffer (possibly in a Web Worker)? The documentation (https://github.com/ofmlabs/aurora.js/wiki/Asset-Class-Reference#wiki-data-event) seems to suggest the 'data' callback is called when the whole file is decoded.
I don't really like that we have a dependency on Node.js, especially not one that generates name conflicts on all my systems.
It would just a first step to removing the whole dependency on node.js, probably replacing it with the more available Ruby. (Unless there is a good reason to pick another language?)
Hello,
I'm getting this error
http://d.pr/i/t1BM
on line 892
I'm doing
player = Player.fromURL("my url");
player.play();
and after the third request (buffering) I get that error.
Am I doing something wrong?
I am using Chrome 27. I tried both flac.js and mp3.js, all head from git. At the beginning of the playback, I can hear three distinct clicks interleaved with the beginning of the song.
There are a number of very common metadata fields that should have the same name across formats so it's easier to get info out of the metadata:
We could provide constants or just document the names for those fields and fix our own demuxers to use them. Other fields beyond these common ones could be different across formats, and I think that's fine unless we want to standardize on something like the ID3 field names. It should just be easy to get these common fields from the metadata for players especially, and other metadata as allowed by the format should be allowed I think.
I'm trying to compile Aurora in an ubuntu 12.04 box, as detailed in the README file:
importer src/aurora.coffee aurora.js
I got this error:
user@box:~/Documents/aurora.js/repo$ git pull
remote: Counting objects: 66, done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 49 (delta 26), reused 45 (delta 22)
Unpacking objects: 100% (49/49), done.
From https://github.com/audiocogs/aurora.js
ea09be4..1e92c73 master -> origin/master
Updating ea09be4..1e92c73
Fast-forward
[output manually chopped]
user@box:~/Documents/aurora.js/repo$ importer src/aurora.coffee aurora.js
/usr/local/lib/node_modules/importer/js/cmd.js:20
throw err;
^
Error: Parse error on line 8: Unexpected '::' /home/user/Documents/aurora.js/repo/src/devices/webkit.coffee
Assuming the syntax is fine, i went to check the importer utility.
I had already installed Importer from previous (successful) build attemps. However, trying to install a new version fails because of requirements:
user@box:~/Documents/aurora.js/repo$ sudo npm install importer -g
[sudo] password for user:
npm http GET https://registry.npmjs.org/importer
npm http 200 https://registry.npmjs.org/importer
npm http GET https://registry.npmjs.org/importer/-/importer-0.6.0.tgz
npm http 200 https://registry.npmjs.org/importer/-/importer-0.6.0.tgz
npm WARN [email protected] package.json: bugs['name'] should probably be bugs['url']
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/source-map
npm http GET https://registry.npmjs.org/uglify-js
npm http GET https://registry.npmjs.org/optimist
npm http 200 https://registry.npmjs.org/optimist
npm http 200 https://registry.npmjs.org/source-map
npm ERR! error installing [email protected]
npm ERR! Error: No compatible version found: source-map@'>=0.1.8'
npm ERR! Valid install targets:
npm ERR! ["0.0.0","0.1.0","0.1.1","0.1.2","0.1.3"]
npm ERR! at installTargetsError (/usr/share/npm/lib/cache.js:488:10)
npm ERR! at next_ (/usr/share/npm/lib/cache.js:438:17)
npm ERR! at next (/usr/share/npm/lib/cache.js:415:44)
npm ERR! at /usr/share/npm/lib/cache.js:408:5
npm ERR! at saved (/usr/share/npm/lib/utils/npm-registry-client/get.js:147:7)
npm ERR! at Object.oncomplete (/usr/lib/nodejs/graceful-fs.js:230:7)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/user/Documents/aurora.js/repo/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.5.0-27-generic
npm ERR! command "node" "/usr/bin/npm" "install" "importer" "-g"
npm ERR! cwd /home/juancarlos/Documents/aurora.js/repo
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message No compatible version found: source-map@'>=0.1.8'
npm ERR! message Valid install targets:
npm ERR! message ["0.0.0","0.1.0","0.1.1","0.1.2","0.1.3"]
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/juancarlos/Documents/aurora.js/repo/npm-debug.log
npm not ok
And now, i don't event have Importer installed, as it seems npm broke it.
Any help? =/
Thanks,
Daniel.
On my computer I have a Node.js server that serves up audio files (aac or mp3).
If I enter a url like "http://localhost:5346/?song=testaac" into my browser, the aac files starts to download. However, if in the browser I try to play the aac file with aurora, it doesn't work.
I do this:
var player = Player.fromUrl('http://localhost:5346/?song=testaac');
player.play();
The issue seems to be that that first thing aurora seems to do is make a HEAD request? Instead of just GETing the audio content?
What am I missing here/what might be a solution so I can get audio files playing?
Thanks
It seems that it's doable :
http://libwebpjs.hohenlimburg.org/vp8/ogg-vorbis-javascript-decoder/
Not sure which project exactly takes care of the Vorbis decoding :
I'm working on a player and want users to add music on their own.So,I need to let users add musics on different sites.so,can we paly music in diffrernt domains?
I'm not sure what I'm doing wrong, but the AV.Player namespace isn't defined for me. I've followed the WIKI instructions, compiling everything from the src
in this repo into aurora.js
:
$(document).ready(function(){
var player = new AV.Player.fromURL('assets/audio/holdon.mp3');
});
will throw this error:
Uncaught ReferenceError: AV is not defined
I am using the following code to try and play a live mp3 feed. I have been assured this is possible. Please note, I am not downloading the mp3 file from the beginning, I am receiving 1024 chunks of the file and then trying to decode and play them. I have been working on this for some time now, and keep hitting brick walls. Happy to pay a few hours upfront for some one to put the last missing pieces together, had though it was the mp3 decoder, but now not sure that's the case as fabian couldn't fix it...
I will leave the stream running on the domain in the below code, the policy should allow it to be consumed anywhere... if not, please let me know and I'll do what I can.
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" ></script>
<script type="text/javascript" src="js/aurora.js"></script>
<script type="text/javascript" src="js/mp3.js"></script>
<script type="text/javascript">
$( document ).ready(function() {
var MySource = AV.EventEmitter.extend({
start: function() {
var source = this
source.socket = new WebSocket("ws://ws.awelan.com:8071");
source.socket.onmessage = function(data) {
var abData = new AV.Buffer(data);
console.log(data);
source.emit('data', abData);
//if (LAST_CHUNK) {
// source.emit('end');
//}
};
},
pause: function() {
//this.socket.disconnect();
//delete this.socket;
},
reset: function() {}
});
// create a source, asset and player
var source = new MySource();
var asset = new AV.Asset(source);
var player = new AV.Player(asset);
player.play();
});
</script>
</head>
<body>
Should be playing mp3 live stream....
</body>
</html>
Per https://twitter.com/oasisfr/status/223405948297940993 It would be awesome to have playlist support at some point. There should be a special playlist player that can take a list of Assets and play them sequentially, automatically preloading the upcoming files in advance. It should also support skipping forward and backward in the list of songs, and jumping to a specific point in the list. In addition, a simple demuxer for playlist file formats such as M3U should be supported.
Greetings!
I'm trying to play 24bit audio files on your demo (88200 Hz, 96000, 192000, both Flac and Alac). And I'm receiving a message, that the format is not supported.
Is there any way to make aurora.js play these files?
Hi everyone,
I realy like your the idea of your project but I have some problems with your demos. When I'm playing the demos with firefox on linux the sound is realy
choppy and I don't know what the reason is. I have a core i7 cpu and the load factor is below 10% so I don't think it's a performance problem.
When I'm trying the demos with the chromium browser everything works fine. Same for firefox on windows. Only the combination of firefox + linux is problematically.
A friend of mine had the same problem with the same combination firefox+linux.
Is this a known problem?
My firefox version is 15.0.1
I'm using linux mint 13 which is based on ubuntu 12.04.
I don't know what other informations might help you.
Hi.
[background]
The web app project i'm working on requires the handling of local audio files (so, remote files via ".fromURL", or local web servers, are not options for me) and i'm targeting Firefox as the default browser for the app.
The users will mostly use mp3 files. And i hate using flash. So, after testing jsmad, i eventually reached the aurora.js project, which looks like the right tool for the task.
[/background]
I'm testing aurora.js within this basic PHP script:
<?php
header("Access-Control-Allow-Origin:*");
?>
<html>
<head>
<script type="text/javascript" src="jquery-1.7.min.js"></script>
<script type="text/javascript" src="aurora.js"></script>
<script type="text/javascript">
function try_audio(){
var f = $("#file")[0].files[0];
window.player = Player.fromFile(f);
}
</script>
</head>
<body>
<input type="file" id="file" onchange="try_audio();"/>
</body>
</html>
And then, on a console, i do "player.play()".
There's no sound at all, firefox or chrome. No error either.
The "aurora.js" was downloaded from master branch and built following this guide: https://github.com/ofmlabs/aurora.js/wiki/Getting-Started
I'm working on an Ubuntu 12.04 box.
I've also tried handling the file object in different ways, like reading it as data url, createobjecturl for the file, manually instantiating an asset... all with the same result.
Is there anything else i should know or do in order to play a local file using aurora.js?
Thanks,
Daniel.
I'm still going through the docs and all, but basically I want to deliver a file from a server (say like you would normally do with an mp3) but add some sort of on the fly encryption (something simple for starters, say delivering a base64 string representation of the mp3 file) and play it on the client
Can you guys tell me if this is even remotely possible using this framework?
Adapt to changes in network condition better, and start playing after preloading an amount based on network speed rather than a constant.
Pull request coming very soon
I am using the following code to process a ws stream.
The data I am sending works fine through a http stream in an audio tag - and through a conventional flash method method of playing streams.
I have included the console.log of data, if that helps... the byte length looks fairly big enough (byteLength: 4180), but I can increase if need be... I have tried some big numbers already!
The stream is an MP3 feed, which is realtime radio so dosn't have the MP3 headers AV may be expecting, I can inject these on connection if that's the right thig to do, just need to know what AV is expected.
var MySource = AV.EventEmitter.extend({
start: function() {
var source = this
source.socket = new WebSocket("ws://localhost:8071");
source.socket.binaryType = 'arraybuffer';
source.socket.onmessage = function(data) {
console.log(data);
var abData = new AV.Buffer(data.data);
source.emit('data', abData);
//if (LAST_CHUNK) {
// source.emit('end');
//}
};
},
pause: function() {
//this.socket.disconnect();
//delete this.socket;
},
reset: function() {}
});
Console Output
MessageEvent {ports: Array[0], data: ArrayBuffer, source: null, lastEventId: "", origin: "ws://localhost:8071"…}
bubbles: false
cancelBubble: false
cancelable: false
clipboardData: undefined
currentTarget: WebSocket
data: ArrayBuffer
byteLength: 4180
proto: ArrayBuffer
defaultPrevented: false
eventPhase: 0
lastEventId: ""
origin: "ws://localhost:8071"
ports: Array[0]
returnValue: true
source: null
srcElement: WebSocket
target: WebSocket
timeStamp: 1383899351132
type: "message"
proto: MessageEvent
Have tried Safare & Google Chrome, both of them buffering audio data from socket correctly but fails to play, https://www.dropbox.com/s/sc3ulfjtdwjftmw/play.zip here is node.js sample
No! My server supports all what need for this player. You test what I take you?:
"Problem with my site http://master255.no-ip.org/
Test track: 2Trance - In My Dreams (M.O.R.P.H. vs. Van Eyden Re7mix).flac 1 minute
When I add and play this track his randomly play or not
If I play more longer (>3-5 min) track then after buffering all track (how i can buffering 10% of track? and start play at once??) chrome has play 5-10 seconds and stop after.
If I play this tracks local then tracks play correctly. This suggests that the player does not work with slow INTERNET.
How correct this?"
I often get an AV.UnderflowError when seeking into areas that aren't loaded yet. Is there anything I could do on my side to improve this process?
I'm also having issues regarding playback of a song from url, it takes quite a while until the ready event fires and the song starts playing, so I'm also wondering if there's something I can do to improve this, some pointers to where I should be looking at least
The m4a decoder makes a lot of high-frequency crackle and bleeping on some files.
Test case: http://vladkorotnev.me/webtunes/player.php?list=74&track=1
Listen to tracks 1 and 2.
Expected behavior: acceptable quality playback.
Resulting behavior: music along with bleeps and cracks around 10kHz and almost missing high frequencies.
The same files sound awesome in QuickTime 7.
The tracks can be downloaded (play a track and then click the right "down arrow" key in the player control display) and played in QuickTime to prove that it's not the files being low-quality.
Great JS plugin otherwise though, enjoyed building with it, thanks Audiocogs!
I was working with a pre-AV namespace build of aurora.js, and i'm now using an up-tp-date version.
This new build gave me a few definition problems when used in-browser, that i managed to fix using simple workarounds.
After that, i found that there's a "browser.coffee" file that implements exactly the same workarounds i figured out before.
I feel It's kinda silly now that i found "browser.coffee", but i guess that without mention of this in the README other people may have the same problem, so i better leave a note here about this.
Thanks,
Daniel.
Or is that coming to the Web Audio API?
Hello,
I noticed that aurora.js will try to download entire file by making several requests using 1Mb of bytes array chunk.
In my cases I have large m4a files (around 40/50Mb), so this results on aurora.js making 40~50 requests to obtain whole file. This stresses too much the server.
I wonder if there is a way to set the size of the file chunk while downloading?
I think chunks of 1Mb is good for first few requests (just to obtain needed bytes to start streaming), but subsequents chunks can be larger, maybe progressively increased (?).
IE:
first request chunk of 1Mb
second request chunk of 3Mb
third request chunk of 5Mb
fourth request chunk of 8Mb .....
// and so on ....
It should be nice to implement this alongside with #4
Thanks in advance
I put this in different places in my code, but this want work. I use copy of your player http://audiocogs.org/codecs/flac/
. Where should I put it?
This touches briefly another issue as well, that being namespacing.
aurora.js exposes a lot of globals, which is a bad thing (TM), and none of them (afaict) are even prefixed which could be a lot of potential conflict (especially names like Buffer).
I'd suggest refactoring a bit. :)
I know that aurora does not support playing binary data streams out of the box, but how would I go about modifying aurora to be able to push data manually to the Buffer? I think this is a common use case and would make aurora a much more useful platform for audio playback!
I would very much just use aurora to decode the file types, webaudio's "decodeAudioData" can't handle. Which is mp3 (on Linux) or flac. I can play audios with aurora alright, but I have a hard time to simply decode them.
I don't get any buffer (percentage) values, it takes very long to decode, I have no way to figure out whether decoding is complete and the browser is almost completely frozen. What am I doing wrong here?
binary (mp3) data in data (Uint8Array)
var buf = new AV.Buffer(data);
var MySource = AV.EventEmitter.extend ({
start: function() {
this.emit('data',buf);
this.emit('end');
},
pause: function() {
// nope
},
reset: function() {
// nope
}
});
var list = new AV.BufferList;
var the_aurora = new MySource();
var asset = new AV.Asset(the_aurora);
asset.on('error', function(er) {
console.log("ERROR:" + er);
});
asset.on('buffer', function(pc) {
console.log("PC:" + pc);
});
asset.on('data', function(buffer) {
list.append(new AV.Buffer(buffer));
});
asset.start();
Hello there,
Is it possible to manage the 304 response status with if-none-match
or if-not-modified-since
headers in request for streaming
Thanks
I wasn't sure whether to put this issue here or in the MP3.js repo because I was running into this problem while attempting to use it for my demuxer/decoder and not sure if the issue was specific to just the MP3 demuxer.
It seems in order to successfully find the correct demuxer (MP3 in this case) through probing the first chunk of audio data that aurora receives, it must receive the beginning chunk of the actual file being streamed? I'm not entirely sure here because I'm not yet very familiar with the MP3 codec but that's what the code looked like it was doing to me.
I came across this when connecting to a server that started streaming audio data from a continuous source (not a discrete track that had a beginning) and noticing the data was received but a demuxer not found and so there was no playback. I had assumed this would be supported since one of the purposes of the library was to play podcast or radio style streams.
If you could help clarify that would be great.
I'm running into problems using Aurora.js on Safari and digging into the console errors it looks like the problem is BlobBuilder, which appears to be depreciated:
https://developer.mozilla.org/en-US/docs/Web/API/BlobBuilder
Are there any plans to replace this with "Blob" (https://developer.mozilla.org/en-US/docs/Web/API/Blob)?
Some wav files are not so simple as fmt, and then data chunk :(
Problem with my site http://master255.no-ip.org/
Test track: 2Trance - In My Dreams (M.O.R.P.H. vs. Van Eyden Re7mix).flac 1minute
When I add and play this track his randomly play or not
If I play more longer (>3-5 min) track then after buffering all track (how i can buffering 10% of track?) chrome has play 5-10 seconds and stop after.
If I play this tracks local then tracks play correctly.
How correct this?
Is it possible to change input of existing Asset? I mean asset from flac ArrayBuffer. I saw your demo is creating new player for every file, well... I'd rather prefer a bit more gentle way.
I'm trying to play an a-Law encoded audio file. The file appears to have the expected specs for its format, as the file
command reveals:
~$ file 24.alaw
24.alaw: RIFF (little-endian) data, WAVE audio, ITU G.711 A-law, mono 8000 Hz
The client script is pretty straightforward.
var player = AV.Player.fromURL("http://localhost:8090/loader/audio/24.alaw");
player.play();
And is not working. HEAD
and GET
requests are sent correctly, no error is thrown. However, no audio comes out on latest Chrome (32.0.1700.77).
Here is what a `console.log(player)`` prints:
Player {asset: Asset, startPlaying: function, playing: false, buffered: 0, currentTime: 0…}
asset: Asset
_decode: function (){ return fn.apply(me, arguments); }
active: true
buffered: 100
decoder: XLAWDecoder
demuxer: WAVEDemuxer
duration: 10526
events: Object
findDecoder: function (){ return fn.apply(me, arguments); }
format: Object
bitsPerChannel: 16
bytesPerPacket: 1
channelsPerFrame: 1
floatingPoint: false
formatID: "alaw"
framesPerPacket: 1
littleEndian: false
sampleRate: 8000
__proto__: Object
metadata: null
probe: function (){ return fn.apply(me, arguments); }
shouldDecode: false
source: HTTPSource
__proto__: ctor
buffered: 100
currentTime: 0
duration: 10526
events: Object
filters: Array[2]
format: Object
metadata: Object
pan: 0
playing: true
queue: Queue
startPlaying: function (){ return fn.apply(me, arguments); }
startedPreloading: true
volume: 100
__proto__: ctor
Notice the absence of device
and refill
attributes. Also, bitsPerChannel
and littleEndian
values are apparently wrong (should be 8
and true
, respectively).
Same bit of code works just fine with .mp3
files (after importing the corresponding demuxer). The alaw
file you have hosted here: https://github.com/audiocogs/aurora.js-test/blob/master/au/alaw.au seems to work, as well - although I noticed that its header is entirely different.
alaw.au: Sun/NeXT audio data: 8-bit A-law (CCITT G.711), stereo, 44100 Hz
Any help will be appreciated.
You can download my sample file from here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.