Browse Source

更新

worker
dexter 8 years ago
parent
commit
53a8bac407
  1. 7
      AudioDecoder.h
  2. 1
      base.h
  3. 4
      debug.log
  4. BIN
      js/MP3.zip
  5. 6
      js/index.html
  6. 2
      make.py

7
AudioDecoder.h

@ -188,7 +188,7 @@ class AudioDecoder
nsamples = pcm.length;
left_ch = pcm.samples[0];
right_ch = pcm.samples[1];
samplesBytes += nsamples*2;
samplesBytes += nsamples*2* nchannels;
//i16 left_output[576];
//emscripten_log(0,"%d %d",left_ch[0],left_ch[1])
while (nsamples--) {
@ -197,6 +197,11 @@ class AudioDecoder
sample = scale(*left_ch++);
(*output++) = ((sample >> 0) & 0xff);
(*output++) = ((sample >> 8) & 0xff);
if (nchannels == 2) {
sample = scale(*right_ch++);
(*output++) = ((sample >> 0) & 0xff);
(*output++) = ((sample >> 8) & 0xff);
}
//memcpy(output, &sample, 2);
//output+=2;
//*(left_output++) = (i16)sample;

1
base.h

@ -7,6 +7,7 @@
#include "basetype.h"
#ifdef USE_H265
#include "libde265/de265.h"
#include "libde265/image.h"
#else
#include "H264SwDecApi.h"
void* H264SwDecMalloc(u32 size)

4
debug.log

@ -10,3 +10,7 @@
[0104/152103:ERROR:node_debugger.cc(86)] Cannot start debugger server
[0119/101337:ERROR:tcp_listen_socket.cc(76)] Could not bind socket to 127.0.0.1:6004
[0119/101337:ERROR:node_debugger.cc(86)] Cannot start debugger server
[0227/101707:ERROR:tcp_listen_socket.cc(76)] Could not bind socket to 127.0.0.1:6004
[0227/101707:ERROR:node_debugger.cc(86)] Cannot start debugger server
[0301/141751:ERROR:tcp_listen_socket.cc(76)] Could not bind socket to 127.0.0.1:6004
[0301/141751:ERROR:node_debugger.cc(86)] Cannot start debugger server

BIN
js/MP3.zip

6
js/index.html

@ -55,10 +55,10 @@
//speex
//ns.initAudio(50*320, 16000 , 1);
//mp3
ns.initAudio(12 * 576, 22050, 1);
//ns.initAudio(12 * 576, 22050, 1);
//aac
//ns.initAudio(12 * 1024, 44100, 2);
ns.play('h265')
ns.initAudio(12 * 1024, 44100, 2);
ns.play('user1')
}
function test() {

2
make.py

@ -30,7 +30,7 @@ emcc_args = [
'-IBroadway','-I.',
#'-I../libid3tag',
#'-DUSE_MP3',
#'-DUSE_H265'
#'-DUSE_H265',
'-DUSE_AAC'
#'--js-library', 'library.js'
# '--js-transform', 'python appender.py'

Loading…
Cancel
Save