Audio Device Driver

本文深入探讨了MPlayer音频播放的实现原理,包括获取音频设备空闲内存、解码和播放过程,以及延迟和输出突发策略。

MPlayer音频播放原理:

1. 获得音频设备空闲的内存打小, byte_to_write

2. 判断音频输出缓冲区ao_out_buffer中还没有被播放的已解码数据大小ao_out_buffer_len是否大于byte_to_write,如果不够,就继续解码,直到ao_out_buffer_len大于byte_to_write

3. 当ao_out_buffer_len大于byte_to_write时,播放数据,然后将ao_out_buffer中没有播放的数据搬移到该缓冲区的前端。

 

delay:


outburst = A Fragment Size = Channel x Chunck Size

 

Linux Audio Device Driver

http://blog.youkuaiyun.com/romanman/archive/2009/05/17/4194372.aspx
http://bbs.mydrivers.com/archiver/tid-193073.html

http://linuxaudio.org/resources

http://manuals.opensound.com/developer/fulldup.c.html

video file format
Flash Video (FLV) Open Source Flash

BLT
bit-block transfer

 

{ "name": "@ohos/drivers_peripheral_audio", "description": "audio device driver", "version": "4.0", "license": "Apache License 2.0", "publishAs": "code-segment", "segment": { "destPath": "drivers/peripheral/audio" }, "dirs": {}, "scripts": {}, "component": { "name": "drivers_peripheral_audio", "subsystem": "hdf", "features": [ "drivers_peripheral_audio_feature_mono_to_stereo", "drivers_peripheral_audio_feature_hal_notsupport_pathselect", "drivers_peripheral_audio_feature_hdf_proxy_stub", "drivers_peripheral_audio_feature_user_mode", "drivers_peripheral_audio_feature_full_test_suite", "drivers_peripheral_audio_feature_policy_config", "drivers_peripheral_audio_feature_alsa_lib", "drivers_peripheral_audio_feature_rich_device", "drivers_peripheral_audio_feature_community", "drivers_peripheral_audio_feature_effect", "drivers_peripheral_audio_feature_double_pnp_detect", "drivers_peripheral_audio_feature_offload", "drivers_peripheral_audio_feature_multichannel", "drivers_peripheral_audio_feature_hicollie_enable", "drivers_peripheral_audio_feature_hitrace_enable", "drivers_peripheral_audio_feature_frame_ec" ], "adapted_system_type": ["standard", "small"], "rom": "1035KB", "ram": "8600KB", "deps": { "components": [ "c_utils", "cJSON", "hilog", "hdf_core", "drivers_interface_audio", "bounds_checking_function", "hitrace", "hicollie", "alsa-lib", "ipc" ], "third_party": [] }, "build": { "sub_component": [ "//drivers/peripheral/audio:hdi_audio", "//drivers/peripheral/audio/effect:effect_model", "//drivers/peripheral/audio:libaudio_header_static" ], "inner_kits": [ { "name": "//drivers/peripheral/audio:libaudio_header_static", "header": { "header_base": [ "//drivers/peripheral/audio/interfaces/sound", "//drivers/peripheral/audio/interfaces/effect" ], "header_files": [] } } ], "test": [ "//drivers/peripheral/audio/test:audio_test_entry", "//drivers/peripheral/audio/test/sample:idl_audio_sample", "//drivers/peripheral/audio/test/audio_utils/audio_mixer:audio_mixer", "//drivers/peripheral/audio/effect/test:effect_test" ] } } } 详细解读这段代码,详细解释 ,详细解释
07-25
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值