(1)频流类型,定义文件路径:
frameworks/base/media/java/android/media/AudioSystem.java


(2)不同音频流,类型定义:
/** @hide Used to identify the volume of audio streams for phone calls */
public static final int STREAM_VOICE_CALL = 0;

/** @hide Used to identify the volume of audio streams for system sounds */
public static final int STREAM_SYSTEM = 1;

/** @hide Used to identify the volume of audio streams for the phone ring and message alerts */
public static final int STREAM_RING = 2;

/** @hide Used to identify the volume of audio streams for music playback */
public static final int STREAM_MUSIC = 3;

/** @hide Used to identify the volume of audio streams for alarms */
public static final int STREAM_ALARM = 4;

/** @hide Used to identify the volume of audio streams for notifications */
public static final int STREAM_NOTIFICATION = 5;

/** @hide
*  Used to identify the volume of audio streams for phone calls when connected on bluetooth */
public static final int STREAM_BLUETOOTH_SCO = 6;

/** @hide Used to identify the volume of audio streams for enforced system sounds in certain
* countries (e.g camera in Japan) */
@UnsupportedAppUsage
public static final int STREAM_SYSTEM_ENFORCED = 7;

/** @hide Used to identify the volume of audio streams for DTMF tones */
public static final int STREAM_DTMF = 8;

/** @hide Used to identify the volume of audio streams exclusively transmitted through the
*  speaker (TTS) of the device */
public static final int STREAM_TTS = 9;

/** @hide Used to identify the volume of audio streams for accessibility prompts */
public static final int STREAM_ACCESSIBILITY = 10;

/** @hide Used to identify the volume of audio streams for virtual assistant */
public static final int STREAM_ASSISTANT = 11;

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐