Package nidaqdev
Class NIFilePlayback
java.lang.Object
nidaqdev.NIFilePlayback
- All Implemented Interfaces:
PamSettings
,SettingsNameProvider
,FilePlaybackDevice
PArt of the system for playback from wav files. The wav file playback system
has a number of subsystems, currently including sound card and NI card outputs.
This is NOT the class used to play back data actually acquired using NI cards.
This is NOT the class used to play back data actually acquired using NI cards.
- Author:
- Doug Gillespie
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionString[]
Get device status information.getName()
int
getNumPlaybackChannels
(int devNum) Get's the number of playback channels for a given device.Get a settings panel for additional options.long
boolean
playData
(RawDataUnit[] data) Play some data.boolean
preparePlayback
(PlaybackParameters playbackParameters) Prepare playbackboolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) void
setNiFilePlaybackParams
(NIFilePlaybackParams niFilePlaybackParams) boolean
Stop playback, clean up buffers, etc.
-
Constructor Details
-
NIFilePlayback
-
-
Method Details
-
getDeviceNames
- Specified by:
getDeviceNames
in interfaceFilePlaybackDevice
- Returns:
- a list of device names
-
getName
- Specified by:
getName
in interfaceFilePlaybackDevice
- Returns:
- a name for this type of playback device
-
getNumPlaybackChannels
public int getNumPlaybackChannels(int devNum) Description copied from interface:FilePlaybackDevice
Get's the number of playback channels for a given device.- Specified by:
getNumPlaybackChannels
in interfaceFilePlaybackDevice
- Parameters:
devNum
- device number- Returns:
- number of channels
-
playData
Description copied from interface:FilePlaybackDevice
Play some data. The length of the data array must correspond to the number of channels.- Specified by:
playData
in interfaceFilePlaybackDevice
- Parameters:
data
- array of raw audio data units.- Returns:
- true if played OK.
-
preparePlayback
Description copied from interface:FilePlaybackDevice
Prepare playback- Specified by:
preparePlayback
in interfaceFilePlaybackDevice
- Parameters:
playbackParameters
- parameters- Returns:
- true if all Ok. S
-
stopPlayback
public boolean stopPlayback()Description copied from interface:FilePlaybackDevice
Stop playback, clean up buffers, etc.- Specified by:
stopPlayback
in interfaceFilePlaybackDevice
- Returns:
- true if all cleaned up Ok.
-
getDeviceState
Description copied from interface:FilePlaybackDevice
Get device status information.- Specified by:
getDeviceState
in interfaceFilePlaybackDevice
- Returns:
-
getDeviceName
- Specified by:
getDeviceName
in interfaceFilePlaybackDevice
-
getSettingsPanel
Description copied from interface:FilePlaybackDevice
Get a settings panel for additional options. Can be null.- Specified by:
getSettingsPanel
in interfaceFilePlaybackDevice
- Returns:
- settings panel or null for additional options.
-
getNiFilePlaybackParams
- Returns:
- the niFilePlaybackParams
-
setNiFilePlaybackParams
- Parameters:
niFilePlaybackParams
- the niFilePlaybackParams to set
-
getUnitName
- Specified by:
getUnitName
in interfaceSettingsNameProvider
- Returns:
- A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
-
getUnitType
- Specified by:
getUnitType
in interfacePamSettings
- Returns:
- A Name specific to the type, e.g. Click detector
-
getSettingsReference
- Specified by:
getSettingsReference
in interfacePamSettings
- Returns:
- The serialisable object that will be stored
-
getSettingsVersion
public long getSettingsVersion()- Specified by:
getSettingsVersion
in interfacePamSettings
- Returns:
- An integer version number for the settings
-
restoreSettings
- Specified by:
restoreSettings
in interfacePamSettings
- Returns:
- true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required
-
getCurrentDeviceInfo
- Returns:
- the currentDeviceInfo
-