当前位置:   article > 正文

Android源码--listAudioPorts调用过程

listaudioports
AudioService.java
private void configureHdmiPlugIntent(Intent intent, int state) {
    ArrayList<AudioPort> ports = new ArrayList<AudioPort>();
    int[] portGeneration = new int[1];
    int status = AudioSystem.listAudioPorts(ports, portGeneration);
}

AudioService.java
// declare native method
public static native int listAudioPorts(ArrayList<AudioPort> ports, int[] generation);

android_media_AudioSystem.cpp
// JNI call
static jint android_media_AudioSystem_listAudioPorts(JNIEnv *env, jobject clazz, jobject jPorts, jintArray jGeneration) {
    unsigned int numPorts;
    struct audio_port *nPorts = NULL;
    do {
        numPorts = 0;
        // get numPorts generation1
        AudioSystem::listAudioPorts(AUDIO_PORT_ROLE_NONE, AUDIO_PORT_TYPE_NONE, &numPorts, NULL, &generation1);
   
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/正经夜光杯/article/detail/876001
推荐阅读
相关标签
  

闽ICP备14008679号