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

Cannot play alaw file #55

Closed
nfantone opened this issue Jan 24, 2014 · 1 comment
Closed

Cannot play alaw file #55

nfantone opened this issue Jan 24, 2014 · 1 comment

Comments

@nfantone
Copy link

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.

@devongovett
Copy link
Member

File is 404ing. Sorry for not looking for so long. Please check again and I'll reopen the issue if it still doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants