JSR-234 1.1

javax.microedition.amms.control
Interface PanControl

All Superinterfaces:
javax.microedition.media.Control

public interface PanControl
extends javax.microedition.media.Control

PanControl is an interface for manipulating the panning of a Player in the stereo output mix. If the input is stereo, this controls the balance between the channels.

Pan Settings

This interface allows, in the case of a mono source, the panning between the left and the right channel to be specified using an integer value that varies between -100 and 100.

The pan scale specifies panning on a linear scale. It ranges from -100 to 100, where 0 represents panning for both channels, -100 full panning to the left, and 100 full panning to the right. The mapping for producing linear multiplicative values is implementation dependent.

Balance Settings

This interface allows, in the case of a stereo source, the balancing between the left and the right channel to be specified using an integer value that varies between -100 and 100.

The balance scale specifies balancing on a linear scale. It ranges from -100 to 100, where 0 represents equal gain for both channels, -100 full gain to the left and zero gain to the right, and 100 full gain to the right and zero gain to the left. The mapping for producing linear multiplicative values is implementation dependent.

With multichannel (>2) sources, the effect of the panning set is undefined.

Default Values

The default value of all pan controls (whether the application has obtained them or not) is:

pan = 0 (center)

PanControl and 3D audio.

Note that panning setting is not in effect for Players added to a SoundSource3D.

See Also:
Control, Player

Method Summary
 int getPan()
          Gets the current panning set.
 int setPan(int pan)
          Sets the panning using a linear point scale with values between -100 and 100.
 

Method Detail

setPan

int setPan(int pan)
Sets the panning using a linear point scale with values between -100 and 100.
0 represents panning for both channels, -100 full panning to the left and 100 full panning to the right. If the given panning value is less than -100 or greater than 100, the panning will be set to -100 or 100, respectively.

Parameters:
pan - the new panning to be set
Returns:
the panning that was actually set
See Also:
getPan()

getPan

int getPan()
Gets the current panning set.

Returns:
the current panning
See Also:
setPan(int)

JSR-234 1.1

Copyright © 2004-2007 Nokia Corporation. See the Copyright for details.