public static class SoundPlayer.SoundPlayerParameters extends Object
SoundPlayer parameters for a playback task.
This class provides the playback task priority, looping policy, playback speed, and multi-channel volume
(defined by AudioVolumes).
SystemCapability.Multimedia#AUDIO| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
NO_LOOP |
Indicates that the playback will not be looped.
|
static float |
NORMAL_SPEED_RATE |
Indicates the normal playback speed.
|
static int |
PLAY_DELAYED_PRIORITY |
Indicates that the task will start only when the task queue is not full.
|
static int |
PLAY_IMMEDIATELY_PRIORITY |
Indicates that the task will start immediately.
|
| 构造器 | 说明 |
|---|---|
SoundPlayerParameters() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
SoundPlayer.AudioVolumes |
getAudioVolumes() |
Obtains the volume of all audio channels for a sound playback task.
|
int |
getLoop() |
Obtains the loop number of a sound playback task.
|
int |
getPriority() |
Obtains the playback task priority.
|
float |
getSpeed() |
Obtains the playback speed of a sound playback task.
|
void |
setLoop(int loop) |
Sets the loop number of a sound playback task.
|
void |
setPriority(int priority) |
Sets the playback task priority.
|
void |
setSpeed(float speed) |
Sets the playback speed of a sound playback task.
|
void |
setVolumes(SoundPlayer.AudioVolumes audioVolumes) |
Sets the volume of all audio channels for a sound playback task.
|
public static final float NORMAL_SPEED_RATE
public static final int NO_LOOP
public static final int PLAY_DELAYED_PRIORITY
public static final int PLAY_IMMEDIATELY_PRIORITY
If the task queue is full, earlier tasks will be deleted.
public SoundPlayer.AudioVolumes getAudioVolumes()
public void setVolumes(SoundPlayer.AudioVolumes audioVolumes)
audioVolumes - Indicates the volume of all audio channels to set.public int getPriority()
public void setPriority(int priority)
priority - Indicates the playback task priority to set.public int getLoop()
public void setLoop(int loop)
loop - Indicates the loop number to set.public float getSpeed()
public void setSpeed(float speed)
speed - Indicates the playback speed to set.