SpatialMediaPlayer
object SpatialMediaPlayer
Provides spatial audio extensions on the framework MediaPlayer class.
Summary
Public functions |
|
|---|---|
Unit |
setPointSourceParams(Sets a |
Unit |
setSoundFieldAttributes(Sets a |
Public functions
setPointSourceParams
fun setPointSourceParams(
session: Session,
mediaPlayer: MediaPlayer,
params: PointSourceParams
): Unit
Sets a PointSourceParams on a MediaPlayer instance.
Must be called before MediaPlayer.prepare. Not compatible with instances created by MediaPlayer.create. Only the params or attributes from the most recent call to this method or setSoundFieldAttributes will apply since they are mutually exclusive.
| Parameters | |
|---|---|
session: Session |
The current |
mediaPlayer: MediaPlayer |
The |
params: PointSourceParams |
The source params to be set. |
setSoundFieldAttributes
fun setSoundFieldAttributes(
session: Session,
mediaPlayer: MediaPlayer,
attributes: SoundFieldAttributes
): Unit
Sets a SoundFieldAttributes on a MediaPlayer instance.
Must be called before MediaPlayer.prepare. Not compatible with instances created by MediaPlayer.create. Only the attributes or params from the most recent call to this method or setPointSourceParams will apply since they are mutually exclusive.
| Parameters | |
|---|---|
session: Session |
The current |
mediaPlayer: MediaPlayer |
The |
attributes: SoundFieldAttributes |
The source attributes to be set. |