public static class NacAudio.Attributes
extends java.lang.Object
Constructor and Description |
---|
Attributes(android.content.Context context) |
Attributes(android.content.Context context,
NacAlarm alarm) |
Attributes(android.content.Context context,
java.lang.String source) |
Modifier and Type | Method and Description |
---|---|
boolean |
canVolumeChange() |
void |
duckVolume()
Duck the volume.
|
android.media.AudioAttributes |
getAudioAttributes() |
int |
getFocus() |
boolean |
getRepeat() |
int |
getStream() |
int |
getUsage() |
int |
getVolumeLevel() |
boolean |
isStreamVolumeAlreadySet() |
NacAudio.Attributes |
merge(NacAlarm alarm)
Merge the current audio attributes with that of the alarm.
|
void |
revertDucking()
Revert the effects of ducking.
|
void |
revertVolume()
Revert the volume level.
|
void |
setFocus(int focus)
Set the audio focus.
|
void |
setRepeat(boolean repeat)
Set whether the audio should be repeated or not.
|
void |
setSource(java.lang.String source)
Set the audio stream and usage.
|
void |
setStream(int stream)
Set the audio stream.
|
void |
setStreamVolume(int volume)
Set the volume of the stream.
|
void |
setUsage(int usage)
Set the audio usage.
|
void |
setVolume()
Set the volume.
|
void |
setVolumeLevel(int level)
Set the volume level.
|
void |
setWasDucking(boolean wasDucking)
Set whether the volume was ducked or not.
|
int |
toStreamVolume() |
int |
toStreamVolume(int volumeLevel)
Convert the volume level to the stream volume format.
|
boolean |
wasDucking() |
public Attributes(android.content.Context context)
public Attributes(android.content.Context context, NacAlarm alarm)
public Attributes(android.content.Context context, java.lang.String source)
public boolean canVolumeChange()
public void duckVolume()
public android.media.AudioAttributes getAudioAttributes()
public int getFocus()
public boolean getRepeat()
public int getStream()
public int getUsage()
public int getVolumeLevel()
public boolean isStreamVolumeAlreadySet()
public NacAudio.Attributes merge(NacAlarm alarm)
public void revertDucking()
public void revertVolume()
public void setFocus(int focus)
public void setRepeat(boolean repeat)
public void setSource(java.lang.String source)
public void setStream(int stream)
public void setStreamVolume(int volume)
public void setUsage(int usage)
public void setVolume()
public void setVolumeLevel(int level)
public void setWasDucking(boolean wasDucking)
public int toStreamVolume()
toStreamVolume(int)
public int toStreamVolume(int volumeLevel)
public boolean wasDucking()