• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# SoundPool (Sound Pool) (System API)
2<!--Kit: Media Kit-->
3<!--Subsystem: Multimedia-->
4<!--Owner: @wang-haizhou6-->
5<!--Designer: @HmQQQ-->
6<!--Tester: @xchaosioda-->
7<!--Adviser: @zengyawen-->
8
9The module provides APIs for loading, unloading, playing, and stopping playing system sounds, setting the volume, and setting the number of loops.
10
11Before using these APIs, you must call [media.createSoundPool](arkts-apis-media-f.md#mediacreatesoundpool10) to create a SoundPool instance.
12
13> **NOTE**
14>
15> - The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
16> - This topic describes only system APIs provided by the module. For details about its public APIs, see [SoundPool (Sound Pool)](js-apis-inner-multimedia-soundPool.md).
17
18## PlayParameters
19
20Describes the playback parameters of the sound pool.
21
22**System capability**: SystemCapability.Multimedia.Media.SoundPool
23
24| Name           | Type                                    | Mandatory| Description                                                        |
25| --------------- | ---------------------------------------- | ---- | ------------------------------------------------------------ |
26| parallelPlayFlag | boolean | No  | Whether the sound can be played in parallel with other active audio streams, without preempting the audio focus. **true** if yes, **false** otherwise. The default value is **false**.<br>This is a system API.|
27