REMOTE_SUBMIX, AUDIO_DEVICE_OUT_REMOTE_SUBMIX, AUDIO_DEVICE_IN_REMOTE_SUBMIX含义

【释义】

    在 Andorid 音频开发中,我们会看到叫做 REMOTE_SUBMIX 的音频类型,相应地在底层会有 AUDIO_DEVICE_OUT_REMOTE_SUBMIX 和 AUDIO_DEVICE_IN_REMOTE_SUBMIX 音频设备,在 audio_policy.conf 配置文件中也能看到 r_submix 设备。这次在开发中终于看到了这类音频的使用场景——使设备通过 WiFi 向 ChromeCast 设备传输 HDMI 数据(HDMI 同时含有视频数据和音频数据)。

    我们可以查看官方文档获得更详细的信息,如下:  

public static final int REMOTE_SUBMIX
Added in  API level 19

Audio source for a submix of audio streams to be presented remotely.

An application can use this audio source to capture a mix of audio streams that should be transmitted to a remote receiver such as a Wifi display. While recording is active, these audio streams are redirected to the remote submix instead of being played on the device speaker or headset.

Certain streams are excluded from the remote submix, including STREAM_RINGSTREAM_ALARM, and STREAM_NOTIFICATION. These streams will continue to be presented locally as usual.

Capturing the remote submix audio requires the CAPTURE_AUDIO_OUTPUT permission. This permission is reserved for use by system components and is not available to third-party applications.


    上面这段话的意思是 REMOTE_SUBMIX 表示被传输至远程接收设备(比如 WiFi 显示器,这次开发中使用的就是将 ChromeCast 设备接到一个显示器上)的音频,这类音频数据流会被重定向至远程输出而非在本地扬声器或耳机播放。但如果这其中包含了 STREAM_RING、STREAM_ALARM、STRAM_NOTIFICATION 这类音频数据,被包含的这些数据不会被发送到远程。

【参考资料】

    [1] 《MediaRecorder.AudioSource》




  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 10
    评论
评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值