之前aplay内核部分已经跑通了,可以放音了。现在执行audio_renderer_test的对应的调用流程,执行没有跑到内核。

https://laval.csdn.net/6583e3e0d4226e0eb426f07d.html 参考这个文章,跟踪代码有跑到PaWriteStream 这个部分,但是这里说的audio_host对应的./drivers/hdf_core/framework/model/audio/core/src/audio_host.c并没有编译到,PaWriteStream之下调用的的接口是什么?这部分参考https://laval.csdn.net/64eef49d6ffa502025762163.html 这个教程,似乎没有提到。能否指导一下,跑通一下流程

 

 

240220更新:

编译使用audio_sample_render 执行 wav文件,返回
01-01 08:04:03.767   619   666 I C02500/HDF_AUDIO_HAL_STUB: [AudioAdapterListGetAdapter][line:459]: 
01-01 08:04:03.767   619   666 E C02500/HDF_AUDIO_HAL_IMPL: [AudioAdapterUpdateAudioRoute][line:1210]: portId = 0
01-01 08:04:03.767   619   666 E C02500/HDF_AUDIO_HAL_IMPL: [AudioAdapterUpdateAudioRoute][line:1211]: sinks' device type = 1
01-01 08:04:03.767   619   666 E C02500/HDF_AUDIO_HAL_STUB: HdiSerStubUpdateAudioRoute: call UpdateAudioRoute function failed!
01-01 08:04:03.768  1752  1752 E C01510/BinderInvoker: 121: SendRequest: handle=2 result = -2
01-01 08:04:03.768  1752  1752 E C02500/HDF_AUDIO_HAL_PROXY: AudioProxyAdapterUpdateAudioRoute: call failed! error code is -2
01-01 08:04:03.768  1752  1752 I C02500/HDF_AUDIO_HAL_PROXY: [AudioProxyRenderStart][line:41]: 
代码中会跑到

int32_t AudioAdapterUpdateAudioRoute(struct AudioAdapter *adapter, const struct AudioRoute *route, int32_t *routeHandle)
{
    if (route == NULL || routeHandle == NULL || route->sinks == NULL || route->sources == NULL) {
        AUDIO_FUNC_LOGE("some of the params in AudioAdapterUpdateAudioRoute null!");
        return AUDIO_HAL_ERR_INVALID_PARAM;
    }
    (void)adapter;
    (void)routeHandle;

    AUDIO_FUNC_LOGE("portId = %{public}d", route->sinks[0].portId);
    AUDIO_FUNC_LOGE("sinks' device type = %{public}d", route->sinks[0].ext.device.type);
    return AUDIO_HAL_ERR_NOT_SUPPORT;
}
这里的两个返回值都是错误,这里返回错误是否正常,是否能执行完render放音的

 

相关文件下载
AudioAdapterUpdateAudioRoute日志及代码.txt
1.59 KB
下载
Logo

社区规范:仅讨论OpenHarmony相关问题。

更多推荐