public class

OpenSLMediaPlayerFactory

extends Object
implements IMediaPlayerFactory
java.lang.Object
   ↳ com.h6ah4i.android.media.opensl.OpenSLMediaPlayerFactory

Summary

Public Constructors
OpenSLMediaPlayerFactory(Context context)
OpenSLMediaPlayerFactory(Context context, OpenSLMediaPlayerContext.Parameters params)
Public Methods
IBassBoost createBassBoost(IBasicMediaPlayer player)
Create BassBoost object
IBassBoost createBassBoost(int audioSession)
Create BassBoost object
IEnvironmentalReverb createEnvironmentalReverb()
Create EnvironmentalReverb object
IEqualizer createEqualizer(int audioSession)
Create Equalizer object
IEqualizer createEqualizer(IBasicMediaPlayer player)
Create Equalizer object
IEqualizer createHQEqualizer()
Create HQEqualizer object
IHQVisualizer createHQVisualizer()
Create HQVisualizer object
ILoudnessEnhancer createLoudnessEnhancer(IBasicMediaPlayer player)
Create LoudnessEnhancer object
ILoudnessEnhancer createLoudnessEnhancer(int audioSession)
Create LoudnessEnhancer object
IBasicMediaPlayer createMediaPlayer()
Create BasicMediaPlayer object
IPreAmp createPreAmp()
Create PreAmp object
IPresetReverb createPresetReverb()
Create PresetReverb object
IVirtualizer createVirtualizer(IBasicMediaPlayer player)
Create Virtualizer object
IVirtualizer createVirtualizer(int audioSession)
Create Virtualizer object
IVisualizer createVisualizer(IBasicMediaPlayer player)
Create Visualizer object
IVisualizer createVisualizer(int audioSession)
Create Visualizer object
OpenSLMediaPlayerContext getOpenSLMediaPlayerContext()
void release()
Release associated resources.
Protected Methods
static void checkIsOpenSLMediaPlayer(IBasicMediaPlayer player)
void finalize()
int getDefaultContextOptions()
OpenSLMediaPlayerContext.Parameters getDefaultContextParams()
static int getEqualizerNumberOfBands()
OpenSLMediaPlayerContext getMediaPlayerContext()
int getMediaPlayerOptions()
OpenSLBassBoost onCreateBassBoost(OpenSLMediaPlayer player)
OpenSLBassBoost onCreateBassBoost(int audioSession)
OpenSLEnvironmentalReverb onCreateEnvironmentalReverb()
OpenSLEqualizer onCreateEqualizer(int audioSession)
OpenSLEqualizer onCreateEqualizer(OpenSLMediaPlayer player)
OpenSLHQEqualizer onCreateHQEqualizer()
OpenSLHQVisualizer onCreateHQVisualizer()
OpenSLPreAmp onCreatePreAmp()
OpenSLPresetReverb onCreatePresetReverb()
OpenSLVirtualizer onCreateVirtualizer(int audioSession)
OpenSLVirtualizer onCreateVirtualizer(OpenSLMediaPlayer player)
void throwNotSupportedError()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.h6ah4i.android.media.IMediaPlayerFactory
From interface com.h6ah4i.android.media.IReleasable

Public Constructors

public OpenSLMediaPlayerFactory (Context context)

public OpenSLMediaPlayerFactory (Context context, OpenSLMediaPlayerContext.Parameters params)

Public Methods

public IBassBoost createBassBoost (IBasicMediaPlayer player)

Create BassBoost object

Parameters
player the BasicMediaPlayer instance to attached the BassBoost effect.
Returns
  • BassBoost object
Throws
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

public IBassBoost createBassBoost (int audioSession)

Create BassBoost object

Parameters
audioSession system wide unique audio session identifier.
Returns
  • BassBoost object
Throws
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

public IEnvironmentalReverb createEnvironmentalReverb ()

Create EnvironmentalReverb object

Returns
  • EnvironmentalReverb object
Throws
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

public IEqualizer createEqualizer (int audioSession)

Create Equalizer object

Parameters
audioSession system wide unique audio session identifier.
Returns
  • Equalizer object
Throws
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

public IEqualizer createEqualizer (IBasicMediaPlayer player)

Create Equalizer object

Parameters
player the BasicMediaPlayer instance to attached the Equalizer effect.
Returns
  • Equalizer object
Throws
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

public IEqualizer createHQEqualizer ()

Create HQEqualizer object

Returns
  • HQEqualizer object
Throws
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

public IHQVisualizer createHQVisualizer ()

Create HQVisualizer object

Returns
  • HQVisualizer object
Throws
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

public ILoudnessEnhancer createLoudnessEnhancer (IBasicMediaPlayer player)

Create LoudnessEnhancer object

Parameters
player the BasicMediaPlayer instance to attached the LoudnessEnhancer effect.
Returns
  • LoudnessEnhancer object
Throws
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

public ILoudnessEnhancer createLoudnessEnhancer (int audioSession)

Create LoudnessEnhancer object

Parameters
audioSession system wide unique audio session identifier.
Returns
  • LoudnessEnhancer object
Throws
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

public IBasicMediaPlayer createMediaPlayer ()

Create BasicMediaPlayer object

Returns
  • BasicMediaPlayer object
Throws
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

public IPreAmp createPreAmp ()

Create PreAmp object

Returns
  • PreAmp object
Throws
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

public IPresetReverb createPresetReverb ()

Create PresetReverb object

Returns
  • PresetReverb object
Throws
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

public IVirtualizer createVirtualizer (IBasicMediaPlayer player)

Create Virtualizer object

Parameters
player the BasicMediaPlayer instance to attached the Virtualizer effect.
Returns
  • Virtualizer object
Throws
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

public IVirtualizer createVirtualizer (int audioSession)

Create Virtualizer object

Parameters
audioSession system wide unique audio session identifier.
Returns
  • Virtualizer object
Throws
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

public IVisualizer createVisualizer (IBasicMediaPlayer player)

Create Visualizer object

Parameters
player the BasicMediaPlayer instance to attached the Visualizer effect.
Returns
  • Visualizer object
Throws
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

public IVisualizer createVisualizer (int audioSession)

Create Visualizer object

Parameters
audioSession system wide unique audio session identifier.
Returns
  • Visualizer object
Throws
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

public OpenSLMediaPlayerContext getOpenSLMediaPlayerContext ()

public void release ()

Release associated resources.

Throws
IllegalStateException
UnsupportedOperationException

Protected Methods

protected static void checkIsOpenSLMediaPlayer (IBasicMediaPlayer player)

protected void finalize ()

Throws
Throwable

protected int getDefaultContextOptions ()

protected OpenSLMediaPlayerContext.Parameters getDefaultContextParams ()

protected static int getEqualizerNumberOfBands ()

protected OpenSLMediaPlayerContext getMediaPlayerContext ()

protected int getMediaPlayerOptions ()

protected OpenSLBassBoost onCreateBassBoost (OpenSLMediaPlayer player)

protected OpenSLBassBoost onCreateBassBoost (int audioSession)

protected OpenSLEnvironmentalReverb onCreateEnvironmentalReverb ()

protected OpenSLEqualizer onCreateEqualizer (int audioSession)

protected OpenSLEqualizer onCreateEqualizer (OpenSLMediaPlayer player)

protected OpenSLHQEqualizer onCreateHQEqualizer ()

protected OpenSLHQVisualizer onCreateHQVisualizer ()

protected OpenSLPreAmp onCreatePreAmp ()

protected OpenSLPresetReverb onCreatePresetReverb ()

protected OpenSLVirtualizer onCreateVirtualizer (int audioSession)

protected OpenSLVirtualizer onCreateVirtualizer (OpenSLMediaPlayer player)

protected void throwNotSupportedError ()