Firefly Open Source Community

Title: Cannot use AUDIO_SOURCE_REMOTE_SUBMIX as audio record source! [Print This Page]

Author: maye    Time: 1/6/2016 14:50
Title: Cannot use AUDIO_SOURCE_REMOTE_SUBMIX as audio record source!
Hi Guys,

My current project might need to use AUDIO_SOURCE_REMOTE_SUBMIX as audio source to be streamed out just like wifi-display did.


in the sample code, i've already be able to use AUDIO_SOURCE_DEFAULT as audio source and encoded it AMR or AAC and saved as .m4a file.
But when I set AUDIO_SOURCE_REMOTE_SUBMIX as source, i got segment fault.


the code to get input source is:
    sp<MediaSource> source = new AudioSource(
             //AUDIO_SOURCE_DEFAULT,  // ok
             AUDIO_SOURCE_REMOTE_SUBMIX, // error
            kSampleRate /* sampleRate */,
            kNumChannels /* channelCount */);


the log when use AUDIO_SOURCE_REMOTE_SUBMIX is:
D/AudioHardwareALSA(  142): AudioHardwareALSA::getInputBufferSize sampleRate:8000,format:1,channelCount:2
D/AudioHardwareALSA(  142): AudioStreamInALSA::getInputBufferSize sampleRate:8000,format:1,channelCount:2
W/AudioPolicyManagerBase(  142): getInput() could not find profile for device 80000100, samplingRate 8000, format 1,channelMask 000c
E/AudioRecord( 1908): Could not get audio input for record source 8
F/libc    ( 1908): Fatal signal 11 (SIGSEGV) at 0x00000010 (code=1), thread 1908 (audioloop)


the audio source MACROs are defined in file ./system/core/include/system/audio.h


Does this error means that current RK3288 audio driver doesn't support? or I need to get some proper pemission to do so?

any comments are welcomed

thanks in advance

Maye







Welcome Firefly Open Source Community (https://bbs.t-firefly.com/) Powered by Discuz! X3.1