You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
App crashes when starts to play audio stream that was created on any another android device.
I can play this stream in ios app (by HaishinKit.swift) or ffmpeg in console of linux. Also my android app plays streams that created by OBS studio or ffmpeg.
Create audio stream on first android device
rtmpStream.attachAudio(AudioRecordSource(context))
rtmpStream.attachVideo(null)
...
rtmpStream.publish(getStreamName())
Try to play stream on second android device
rtmpSstream.play(getStreamName())
Expected behavior
Stream should play
Version
0.14.0
0.13.7
Smartphone info.
Samsung A15
Motorola G24
Pixel 6a, Pixel 7a, 14 Android
emulators of android studio
Additional context
It looks like mistake here. Need replace channelCount by channelMask in calling AudioTrack.getMinBufferSize function
Screenshots
No response
Relevant log output
Channel configuration features unsupported channels
getMinBufferSize(): Invalid channel configuration.
FATAL EXCEPTION: com.haishinkit.codec.AudioCodec
Process: com.kidslox.app, PID: 4091
java.lang.IllegalArgumentException: Invalid audio buffer size.
at android.media.AudioTrack.audioBuffSizeCheck(AudioTrack.java:1955)
at android.media.AudioTrack.<init>(AudioTrack.java:810)
at android.media.AudioTrack.<init>(AudioTrack.java:752)
at android.media.AudioTrack.<init>(AudioTrack.java:706)
at android.media.AudioTrack.<init>(AudioTrack.java:647)
at com.haishinkit.net.NetStream.createAudioTrack$haishinkit_release(NetStream.kt:165)
at com.haishinkit.rtmp.RtmpMuxer.onFormatChanged(RtmpMuxer.kt:268)
at com.haishinkit.codec.Codec.setOutputFormat(Codec.kt:170)
at com.haishinkit.codec.Codec.access$setOutputFormat(Codec.kt:18)
at com.haishinkit.codec.Codec$Callback.onOutputFormatChanged(Codec.kt:92)
at android.media.MediaCodec$EventHandler.handleCallback(MediaCodec.java:1868)
at android.media.MediaCodec$EventHandler.handleMessage(MediaCodec.java:1753)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)
The text was updated successfully, but these errors were encountered:
Describe the bug
Hello.
App crashes when starts to play audio stream that was created on any another android device.
I can play this stream in ios app (by HaishinKit.swift) or ffmpeg in console of linux. Also my android app plays streams that created by OBS studio or ffmpeg.
It is very similar to #163
To Reproduce
Create audio stream on first android device
rtmpStream.attachAudio(AudioRecordSource(context))
rtmpStream.attachVideo(null)
...
rtmpStream.publish(getStreamName())
Try to play stream on second android device
rtmpSstream.play(getStreamName())
Expected behavior
Stream should play
Version
0.14.0
0.13.7
Smartphone info.
Samsung A15
Motorola G24
Pixel 6a, Pixel 7a, 14 Android
emulators of android studio
Additional context
It looks like mistake here. Need replace channelCount by channelMask in calling AudioTrack.getMinBufferSize function
Screenshots
No response
Relevant log output
The text was updated successfully, but these errors were encountered: