All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class guinea.logic.SSMSTest
java.lang.Object
   |
   +----guinea.logic.Test
           |
           +----guinea.logic.GenericTest
                   |
                   +----guinea.logic.GenericABCTest
                           |
                           +----guinea.logic.SSMSTest
  -  public class SSMSTest
  
-  extends GenericABCTest
  
The SSMSTest object handles the Single Stimulus Mixed Source
(SSMS) test.
  Variable Index
  -   · 
	currentVolume
  
 -  The current level.
  
 -   · 
	ensureNoOverflows
  
 -  Ensure that no overflows will happen when multiple samples are
mixed together.
  
 -   · 
	levelControlName
  
 -  The control name for the UI component that sets the level of
S2/S3 samples.
  
 -   · 
	levelControlsS2
  
 -  Whether volume level controls volume level of signal S2.
  
 -   · 
	levelControlsS3
  
 -  Whether volume level controls volume level of signal S3.
  
 -   · 
	maxOutputLevel
  
 -  The maximum output level allowed so that no overflows can
occur.
  
 -   · 
	monochannel
  
 -  To which output channel samples S2/3 come out to.
  
 -   · 
	monomapping
  
 -  Channel mapping for playing samples S2/3.
  
 -   · 
	S1Volume
  
 -  Volume for the S1 sample.
  
 -   · 
	S2Volume
  
 -  Volume for the S2 sample.
  
 -   · 
	S3Volume
  
 -  Volume for the S3 sample.
  
 -   · 
	sampleS1
  
 -  Sample for signal S1.
  
 -   · 
	sampleS2
  
 -  Sample for signal S2.
  
 -   · 
	sampleS3
  
 -  Sample for signal S3.
  
 -   · 
	SCALE_DECIBEL
  
 -  Volume scale type is decibel.
  
 -   · 
	SCALE_LINEAR
  
 -  Volume scale type is linear.
  
 -   · 
	scaleMax
  
 -  Maximum volume for samples S2/3.
  
 -   · 
	scaleType
  
 -  Type of the volume scale.
 
  Constructor Index
  -   · 
	SSMSTest()
  
 -  
 
  Method Index
  -   · 
	controlPerformed(ControlEvent, SessionSubject)
  
 -  Process control events from a subject UI.
  
 -   · 
	initItemSamples_base()
  
 -  Sample initialization for this item.
  
 -   · 
	initItemUI()
  
 -  
  
 -   · 
	initTest()
  
 -  In addition to defaul test initialization, creates mappings
for channel mappings for S2/3 and calculates maximum output
level for avoiding overflows.
  
 -   · 
	propertyLoad(Properties, String)
  
 -  Read parameters for this test from the properties.
  
 -   · 
	samplePlay(String)
  
 -  Play sample.
 
  Variables
 · 
sampleS1
 protected transient SoundSample sampleS1
  -  Sample for signal S1.
 
 · 
sampleS2
 protected transient SoundSample sampleS2
  -  Sample for signal S2.
 
 · 
sampleS3
 protected transient SoundSample sampleS3
  -  Sample for signal S3.
 
 · 
S1Volume
 protected Volume S1Volume
  -  Volume for the S1 sample.
 
 · 
S2Volume
 protected Volume S2Volume
  -  Volume for the S2 sample.
 
 · 
S3Volume
 protected Volume S3Volume
  -  Volume for the S3 sample.
 
 · 
currentVolume
 protected transient Volume currentVolume
  -  The current level.
 
 · 
scaleMax
 protected Volume scaleMax
  -  Maximum volume for samples S2/3.  It is used for calculating
the maximum output level for avoiding overflows.
 
 · 
monochannel
 protected int monochannel
  -  To which output channel samples S2/3 come out to.  The default
is 1 (right channel).
 
 · 
monomapping
 protected ChannelMapping monomapping
  -  Channel mapping for playing samples S2/3.
 
 · 
SCALE_LINEAR
 public static final int SCALE_LINEAR
  -  Volume scale type is linear.
  
 
    -  See Also:
    
 -  Volume, scaleType
  
 
 
 
 · 
SCALE_DECIBEL
 public static final int SCALE_DECIBEL
  -  Volume scale type is decibel.
  
 
    -  See Also:
    
 -  Volume, scaleType
  
 
 
 
 · 
scaleType
 protected int scaleType
  -  Type of the volume scale.  Not currently selectable, only
decibel scale is currently used.  Will affect how the variable
gain controller affects volume leve.  Scaling is a bit
different for linear and decibel scale.
  
 
    -  See Also:
    
 -  SCALE_LINEAR, SCALE_DECIBEL
  
 
 
 
 · 
ensureNoOverflows
 protected boolean ensureNoOverflows
  -  Ensure that no overflows will happen when multiple samples are
mixed together.  It is done by limiting the output level or
the MCL level that can be set.  Setting to false will
disable overflow checking.
 
 · 
maxOutputLevel
 protected Volume maxOutputLevel
  -  The maximum output level allowed so that no overflows can
occur.
 
 · 
levelControlName
 protected String levelControlName
  -  The control name for the UI component that sets the level of
S2/S3 samples.
 
 · 
levelControlsS2
 protected boolean levelControlsS2
  -  Whether volume level controls volume level of signal S2.
 
 · 
levelControlsS3
 protected boolean levelControlsS3
  -  Whether volume level controls volume level of signal S3.
 
  Constructors
 · 
SSMSTest
 public SSMSTest()
  Methods
 · 
initTest
 public void initTest() throws Exception
  -  In addition to defaul test initialization, creates mappings
for channel mappings for S2/3 and calculates maximum output
level for avoiding overflows.  Done by limiting the MCL level
range that can be used. 
 Also, will warn and change sample
switching to 'normal' and sequence type to 'free' if they are
not so.
  
    -  Throws: Exception
    
 -  thrown if an exception occurs during test
initialization.
    
 -  Overrides:
    
 -  initTest in class Test
    
 -  See Also:
    
 -  ensureNoOverflows, scaleMax, sampleSwitching, sequenceType, MCLL, MCLLmin, MCLLmax
  
 
 
 
 · 
initItemSamples_base
 protected void initItemSamples_base() throws Exception
  -  Sample initialization for this item.
  
    -  Throws: Exception
    
 -  an exception may be thrown if there are
problems
    
 -  Overrides:
    
 -  initItemSamples_base in class GenericABCTest
  
 
 
 
 · 
initItemUI
 protected void initItemUI()
  
    -  Overrides:
    
 -  initItemUI in class Test
  
 
 
 · 
samplePlay
 protected void samplePlay(String name)
  -  Play sample.
  
    -  Parameters:
    
 -  name - the name of sample to be played received from the
subject UI.
    
 -  Overrides:
    
 -  samplePlay in class GenericTest
  
 
 
 
 · 
controlPerformed
 public void controlPerformed(ControlEvent e,
                              SessionSubject subj)
  -  Process control events from a subject UI.  In this test this
method processes the control events of the level setting
control for the level of S2/S3 samples.  Other control events
are passed on to the super-class for processing.  In this test
the level is also recorded as an answer.  The answer is
delivered as an answer event from the same component.
  
    -  Parameters:
    
 -  e - The control event.
    
-  subj - The subject that generated this event.
    
  -  Overrides:
    
 -  controlPerformed in class GenericTest
  
 
 
 
 · 
propertyLoad
 public void propertyLoad(Properties p,
                          String name) throws IllegalArgumentException
  -  Read parameters for this test from the properties.
  
    -  Parameters:
    
 -  p - the properties.
    
-  name - the name of this object (not usually used)
    
  -  Throws: IllegalArgumentException
    
 -  thrown if parameters are
wrong.
    
 -  Overrides:
    
 -  propertyLoad in class GenericABCTest
  
 
 
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index