/ohos5.0/foundation/multimedia/player_framework/frameworks/native/soundpool/ |
H A D | soundpool.cpp | 32 std::shared_ptr<SoundPool> impl; in CreateSoundPool() 33 if (!SoundPool::CheckInitParam(maxStreams, audioRenderInfo)) { in CreateSoundPool() 46 SoundPool::SoundPool() in SoundPool() function in OHOS::Media::SoundPool 51 SoundPool::~SoundPool() in ~SoundPool() 81 int32_t SoundPool::Load(const std::string url) in Load() 121 int32_t SoundPool::Stop(int32_t streamID) in Stop() 133 int32_t SoundPool::SetLoop(int32_t streamID, int32_t loop) in SetLoop() 187 int32_t SoundPool::Unload(int32_t soundID) in Unload() 203 int32_t SoundPool::Release() in Release() 209 int32_t SoundPool::ReleaseInner() in ReleaseInner() [all …]
|
H A D | soundpool_manager.h | 25 class SoundPool; variable 33 int32_t GetSoundPool(const pid_t pid, std::shared_ptr<SoundPool>& soundPool); 34 int32_t SetSoundPool(const pid_t pid, std::shared_ptr<SoundPool> soundPool); 46 std::unordered_map<pid_t, std::shared_ptr<SoundPool>> soundPools_;
|
H A D | soundpool_manager.cpp | 34 int32_t SoundPoolManager::GetSoundPool(const pid_t pid, std::shared_ptr<SoundPool>& soundPool) in GetSoundPool() 42 int32_t SoundPoolManager::SetSoundPool(const pid_t pid, std::shared_ptr<SoundPool> soundPool) in SetSoundPool() 50 soundPool = std::make_shared<SoundPool>(); in SetSoundPool()
|
H A D | soundpool.h | 27 class SoundPool : public ISoundPool { 29 SoundPool(); 30 ~SoundPool();
|
/ohos5.0/docs/zh-cn/application-dev/reference/apis-media-kit/ |
H A D | js-apis-inner-multimedia-soundPool.md | 1 # SoundPool (音频池) 34 ## SoundPool section 83 let soundPool: media.SoundPool; 157 let soundPool: media.SoundPool; 228 let soundPool: media.SoundPool; 271 let soundPool: media.SoundPool; 343 let soundPool: media.SoundPool; 384 let soundPool: media.SoundPool; 442 let soundPool: media.SoundPool; 507 let soundPool: media.SoundPool; [all …]
|
H A D | js-apis-inner-multimedia-soundPool-sys.md | 1 # SoundPool (音频池)(系统接口) 5 SoundPool需要和@ohos.multimedia.media配合使用,需要先通过[media.createSoundPool](js-apis-media.md#mediacreatesou… 10 > - 当前页面仅包含本模块的系统接口,其他公开接口参考[SoundPool (音频池)](js-apis-inner-multimedia-soundPool.md)。 16 **系统能力:** SystemCapability.Multimedia.Media.SoundPool
|
H A D | Readme-CN.md | 9 - [SoundPool (音频池)](js-apis-inner-multimedia-soundPool.md) 11 - [SoundPool (音频池)(系统接口)](js-apis-inner-multimedia-soundPool-sys.md)
|
/ohos5.0/docs/zh-cn/application-dev/media/media/ |
H A D | using-soundpool-for-playback.md | 1 # 使用SoundPool播放短音频(ArkTS) 7 SoundPool当前支持播放1MB以下的音频资源,大小超过1MB的长音频将截取1MB大小数据进行播放。 9 本开发指导将以SoundPool进行一次低时延播放音频的过程为例,向开发者讲解如何使用SoundPool。详细的API声明请参考[SoundPool API参考](../../reference/a… 21 1. 调用createSoundPool方法创建SoundPool实例。 28 let soundPool: media.SoundPool; 39 console.info('create SoundPool success'); 41 console.error('create SoundPool fail'); 203 15. 调用release方法释放SoundPool实例。 217 下面展示了使用SoundPool进行低时延播放的完整示例代码。 225 let soundPool: media.SoundPool; [all …]
|
H A D | media-kit-intro.md | 3 …的各类功能。在Media Kit的开发指导中,将详细介绍音视频多个模块的开发方式,指导开发者如何使用系统提供的音视频API实现对应功能。比如使用SoundPool实现简单的提示音,当设备接收到新消… 8 - [SoundPool](#soundpool):播放短音频 27 针对开发中常用的短促音效播放场景,如相机快门音效、系统通知音效等,应用可调用SoundPool,实现一次加载,多次低时延播放。 141 ## SoundPool section 143 SoundPool主要工作是将音频媒体资源(比如mp3/m4a/wav等)转码为音频模拟信号,并通过输出设备进行播放。 145 SoundPool提供短音频的播放能力,应用只需要提供音频资源来源,不负责数据解析和解码就可达成播放效果。 147 当使用SoundPool开发应用播放音频时,SoundPool与外部模块的交互关系如图所示。 149  151 音乐类应用通过调用JS接口层提供的SoundPool接口实现相应功能时,框架层会通过播放服务(Player Framework)将资源解析成音频数据流(PCM),音频数据流经过软件解码后输出至音频服… 155 1. 音乐应用将媒体资源传递给SoundPool接口。
|
H A D | media-kit-quick-overview.md | 11 | 音频池 | [使用SoundPool接口播放短音频(ArkTS)](using-soundpool-for-playback.md) | [SoundPool(ArkTS)…
|
H A D | Readme-CN.md | 12 - [使用SoundPool播放短音频(ArkTS)](using-soundpool-for-playback.md)
|
/ohos5.0/docs/en/application-dev/reference/apis-media-kit/ |
H A D | js-apis-inner-multimedia-soundPool.md | 1 # SoundPool (Sound Pool) 34 ## SoundPool section 82 // Create a SoundPool instance. 83 let soundPool: media.SoundPool; 156 // Create a SoundPool instance. 157 let soundPool: media.SoundPool; 227 // Create a SoundPool instance. 228 let soundPool: media.SoundPool; 270 // Create a SoundPool instance. 271 let soundPool: media.SoundPool; [all …]
|
H A D | js-apis-inner-multimedia-soundPool-sys.md | 1 # SoundPool (Sound Pool) (System API) 3 The **SoundPool** module provides APIs for loading, unloading, playing, and stopping playing system… 5 …media.createSoundPool](js-apis-media.md#mediacreatesoundpool10) to create a **SoundPool** instance. 10 …em APIs provided by the module. For details about its public APIs, see [SoundPool (Sound Pool)](js… 16 **System capability**: SystemCapability.Multimedia.Media.SoundPool
|
H A D | Readme-EN.md | 9 - [SoundPool (Sound Pool)](js-apis-inner-multimedia-soundPool.md) 11 - [SoundPool (Sound Pool) (System API)](js-apis-inner-multimedia-soundPool-sys.md)
|
/ohos5.0/docs/en/application-dev/media/media/ |
H A D | using-soundpool-for-playback.md | 1 # Using SoundPool to Play Short Sounds (ArkTS) 9 … you through on how to use the SoundPool APIs to implement low-latency playback. For details about… 21 1. Call **createSoundPool()** to create a SoundPool instance. 28 let soundPool: media.SoundPool; 39 console.info('create SoundPool success'); 41 console.error('create SoundPool fail'); 203 15. Call **release()** to release the **SoundPool** instance. 217 The following sample code implements low-latency playback using SoundPool. 225 let soundPool: media.SoundPool; 243 // Create a SoundPool instance. [all …]
|
H A D | media-kit-intro.md | 3 …o APIs to achieve desired functionalities. For example, you can use the SoundPool to implement sim… 8 - [SoundPool](#soundpool): plays short sounds. 27 …ct) are often required during application development. You can call the SoundPool APIs to implemen… 141 ## SoundPool section 143 The SoundPool transcodes audio assets (such as MP3, M4A, and WAV) into audio analog signals and pla… 145 The SoundPool provides the capability of playing short sounds. This means that your application onl… 147 The figure below shows the interaction between the SoundPool and external modules when it is used t… 149  151 When an audio playback application calls the SoundPool APIs at the JS interface layer to implement … 155 1. The application transfers the media asset to the SoundPool instance.
|
H A D | media-kit-quick-overview.md | 11 | Sound pool | [Using SoundPool to Play Short Sounds (ArkTS)](using-soundpool-for-playback.md)…
|
H A D | Readme-EN.md | 12 - [Using SoundPool to Play Short Sounds (ArkTS)](using-soundpool-for-playback.md)
|
/ohos5.0/docs/zh-cn/release-notes/api-diff/v4.0-Release to v4.0-beta2/ |
H A D | js-apidiff-multimedia.md | 110 |新增|NA|类名:media;<br>方法or属性:type SoundPool = _SoundPool;|@ohos.multimedia.media.d.ts| 120 |新增|NA|类名:SoundPool;<br>方法or属性:load(uri: string): Promise\<number>;|soundPool.d.ts| 127 |新增|NA|类名:SoundPool;<br>方法or属性:stop(streamID: number): Promise\<void>;|soundPool.d.ts| 129 |新增|NA|类名:SoundPool;<br>方法or属性:setLoop(streamID: number, loop: number): Promise\<void>;|soundPool.d… 137 |新增|NA|类名:SoundPool;<br>方法or属性:unload(soundID: number): Promise\<void>;|soundPool.d.ts| 138 |新增|NA|类名:SoundPool;<br>方法or属性:release(callback: AsyncCallback\<void>): void;|soundPool.d.ts| 139 |新增|NA|类名:SoundPool;<br>方法or属性:release(): Promise\<void>;|soundPool.d.ts| 142 |新增|NA|类名:SoundPool;<br>方法or属性:on(type: 'error', callback: ErrorCallback): void;|soundPool.d.ts| 143 |新增|NA|类名:SoundPool;<br>方法or属性:off(type: 'loadComplete'): void;|soundPool.d.ts| 144 |新增|NA|类名:SoundPool;<br>方法or属性:off(type: 'playFinished'): void;|soundPool.d.ts| [all …]
|
/ohos5.0/docs/zh-cn/release-notes/changelogs/OpenHarmony_4.1.2.3/ |
H A D | changelogs-multimedia.md | 101 ## cl.multimedia.4 SoundPool.on('loadComplete')接口实现错误修正 103 SoundPool的on('loadComplete')接口,按照API定义,开发者调用接口进行加载完成监听,发生错误时通过on('error')回调接口抛出。历史版本中接口抛出错误码的设计多余,在… 120 @syscap SystemCapability.Multimedia.Media.SoundPool 128 ## cl.multimedia.5 SoundPool.on('playFinished')接口实现错误修正 130 SoundPool的on('playFinished')接口,按照API定义,开发者调用接口进行播放完成监听,发生错误时通过on('error')回调接口抛出。历史版本中接口抛出错误码的设计多余,在… 147 @syscap SystemCapability.Multimedia.Media.SoundPool
|
/ohos5.0/docs/en/release-notes/api-diff/v4.0-Release-vs-v4.0-beta2/ |
H A D | js-apidiff-multimedia.md | 110 |Added|NA|Class name: media;<br>Method or attribute name: type SoundPool = _SoundPool;|@ohos.multim… 120 |Added|NA|Class name: SoundPool;<br>Method or attribute name: load(uri: string): Promise\<number>;|… 127 |Added|NA|Class name: SoundPool;<br>Method or attribute name: stop(streamID: number): Promise\<void… 129 |Added|NA|Class name: SoundPool;<br>Method or attribute name: setLoop(streamID: number, loop: numbe… 137 |Added|NA|Class name: SoundPool;<br>Method or attribute name: unload(soundID: number): Promise\<voi… 138 |Added|NA|Class name: SoundPool;<br>Method or attribute name: release(callback: AsyncCallback\<void… 139 |Added|NA|Class name: SoundPool;<br>Method or attribute name: release(): Promise\<void>;|soundPool.… 142 |Added|NA|Class name: SoundPool;<br>Method or attribute name: on(type: 'error', callback: ErrorCall… 143 |Added|NA|Class name: SoundPool;<br>Method or attribute name: off(type: 'loadComplete'): void;|soun… 144 |Added|NA|Class name: SoundPool;<br>Method or attribute name: off(type: 'playFinished'): void;|soun… [all …]
|
/ohos5.0/docs/zh-cn/application-dev/media/audio/ |
H A D | audio-playback-overview.md | 17 除上述方式外,也可以通过Media Kit中的AVPlayer和SoundPool实现音频播放。 21 - [SoundPool](../media/using-soundpool-for-playback.md):低时延的短音播放ArkTS/JS API,适用于播放急促简短的音效,如相机快门音效、按…
|
H A D | using-right-streamusage-and-sourcetype.md | 17 | STREAM_USAGE_MUSIC | 适用于播放音乐,同样适用于其他媒体场景,如[使用SoundPool](../media/using-soundpool-for-playback.md)… 116 - **[使用SoundPool开发音频播放功能](../media/using-soundpool-for-playback.md)**:
|
/ohos5.0/docs/en/release-notes/changelogs/OpenHarmony_4.1.2.3/ |
H A D | changelogs-multimedia.md | 101 ## cl.multimedia.4 Implementation of SoundPool.on('loadComplete') Corrected 120 @syscap SystemCapability.Multimedia.Media.SoundPool 128 ## cl.multimedia.5 Implementation of SoundPool.on('playFinished') Corrected 147 @syscap SystemCapability.Multimedia.Media.SoundPool
|
/ohos5.0/docs/en/application-dev/media/audio/ |
H A D | audio-playback-overview.md | 17 In addition to the preceding classes, you can also use **AVPlayer** and **SoundPool** in Media Kit … 21 - [SoundPool](../media/using-soundpool-for-playback.md): provides ArkTS and JS APIs to implement sh…
|