Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner

Intel CS for WebRTC 3.4 Android crash with custom AudioFrameGeneratorInterface and stereo input

1. Test Environment
Network status, WIFI, not related.
Server machine information : P2PServer, not related
Client machine information : Tested 2 devices (Samsung S6 Edge Plus and Xiaomi RedMi Note 3, other devices should have the same issue)
Test topology : p2p

2. Test Steps

a. I've write some test code, which is based on p2psample, but with a custom AudioFrameGeneratorInterface
The AudioFrameGeneratorInterface has following attribute: sampleRate is 44100Hz, gitsPerSample is 16, channelNumber is 2 (stereo)
b. Deploy the test code on two Android devices, then connect each other.
c. Once click "start video" button, the demo will crash immediately with following debug log:
D/WooGeen-PeerConnectionChannel: Found opus rtpmap 111 at a=rtpmap:111 opus/48000/2
D/WooGeen-PeerConnectionChannel: Found opus a=fmtp:111 minptime=10;useinbandfec=1
D/WooGeen-PeerConnectionChannel: Update remote SDP line: a=fmtp:111 minptime=10;useinbandfec=1; maxaveragebitrate=64000
D/WooGeen-PeerConnectionChannel: Setting Remote Description
D/WooGeen-PeerConnectionChannel: PC Observer ---- onSignalingChange: STABLE
D/WoogeenAudioRecordJni: InitRecording@[tid=3095]
D/WoogeenAudioRecordJni: OnCacheDirectBufferAddress
D/WoogeenAudioRecordJni: direct buffer capacity: 1764
D/WoogeenAudioRecordJni: frames_per_buffer: 441
E/rtc: #
# Fatal error in ../../webrtc/modules/audio_device/android/woogeen_audio_record_jni.cc, line 146
# last system error: 2
# Check failed: direct_buffer_capacity_in_bytes_ == frames_per_buffer_ * bytes_per_frame (1764 vs. 882)

#
A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 3095 (Thread-96869)

d. if I change the channelNumber of AudioFrameGeneratorInterface, then everything works.

 

3. Other important references
I think the bug is inside woogeen_audio_record_jni.cc, which calculated wrong frames_per_buffer value (with 44100hz 16bit stereo, a 10ms buffer should contain 441 * 2 = 882 samples).

Tags (2)
0 Kudos
1 Reply
Highlighted
Employee

Thanks a lot lamian for

Thanks a lot lamian for reporting this issue, we are checking and fixing this issue.

0 Kudos