Chrome ARC AAC编码器崩溃

时间:2015-04-10 16:27:25

标签: google-chrome-arc

我在我的应用程序中使用AAC编码器对音频进行编码,并且在Android中一切正常,但在使用ARC Welder在Chrome中运行时,同样的APK会崩溃。

我的代码如下所示:

    mRecorder = new MediaRecorder();
    mRecorder.setOnInfoListener(infoListener);

    String audioFilePath = mUri.getPath();
    mRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
    mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
    mRecorder.setOutputFile(audioFilePath);
    mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
    mRecorder.setAudioEncodingBitRate(256 * 1024);
    mRecorder.setAudioSamplingRate(44100);

    mRecorder.setMaxDuration(600000); // 600000ms = 10 minutes

    try{
        mRecorder.prepare();
    }catch (IOException ex){
        Log.e(TAG, "Prepare() failed", ex);
    }
    mRecorder.start();

它崩溃了

    mRecorder.start();

我发现通过将编码器和格式更改为AMR-WB我可以录制和播放音频OK,无论如何我能让AAC工作吗?

0 个答案:

没有答案
相关问题