Class SessionMediaModel

java.lang.Object
ca.phon.app.session.editor.SessionMediaModel

public class SessionMediaModel extends Object
Media model for a session editor.
  • Field Details

    • MIN_PLAYBACK_RATE

      public static final float MIN_PLAYBACK_RATE
      See Also:
    • MAX_PLAYBACK_RATE

      public static final float MAX_PLAYBACK_RATE
      See Also:
    • DEFAULT_PLAYBACK_RATE

      public static final float DEFAULT_PLAYBACK_RATE
      See Also:
    • PERFORM_MEDIA_CHECK_PROP

      public static final String PERFORM_MEDIA_CHECK_PROP
    • DEFAULT_PERFORM_MEDIA_CHECK

      public static final boolean DEFAULT_PERFORM_MEDIA_CHECK
      See Also:
    • SessionAudioAvailable

      public static final EditorEventType<SessionMediaModel> SessionAudioAvailable
      Editor action key generated when session audio file becomes available The session audio file should be provided as event data
  • Constructor Details

    • SessionMediaModel

      public SessionMediaModel(SessionEditor editor)
  • Method Details

    • getProject

      public Project getProject()
    • getEditor

      public SessionEditor getEditor()
    • getSession

      public Session getSession()
    • getVolumeModel

      public VolumeModel getVolumeModel()
    • getPlaybackRate

      public float getPlaybackRate()
    • setPlaybackRate

      public void setPlaybackRate(float playbackRate)
    • getSegmentPlayback

      public SegmentPlayback getSegmentPlayback()
    • isSessionMediaAvailable

      public boolean isSessionMediaAvailable()
      Is session media available?
    • getSessionMediaFile

      public File getSessionMediaFile()
      Return the media location for the session.
      Returns:
    • resetAudioCheck

      public void resetAudioCheck()
    • checkAudioFile

      public boolean checkAudioFile()
      Check audio file (if exists) to see if we can load it using the java sound system.
      Returns:
    • isSessionAudioAvailable

      public boolean isSessionAudioAvailable()
      Is there an audio file (wav) available for the session?
      Returns:
      true if session media field has been set and a wav file is present for the media
    • getSessionAudioFile

      public File getSessionAudioFile()
      Return the audio (wav) file for the session. This may be the same as the session media file.
      Returns:
      session audio (wav) file
    • getAudioFileExtensions

      public List<String> getAudioFileExtensions()
      Return a list of valid audio file extensions (excluding the '.')
      Returns:
      list of valid audio file extensions
    • getSharedSessionAudio

      public LongSound getSharedSessionAudio() throws IOException
      Return (and load if necessary) the shared session audio file instance.
      Returns:
      shared audio file instance
      Throws:
      IOException
    • loadSessionAudio

      public LongSound loadSessionAudio() throws IOException
      Load session audio file as a LongSound object
      Returns:
      Throws:
      IOException
    • getGenerateSessionAudioAction

      public GenerateSessionAudioAction getGenerateSessionAudioAction()
      Return this shared action for generating session audio. Shared access is necessary as multiple views will use this same action and will want to watch for progress simultaneously.
      Returns:
      shared generate session audio action
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener listener)
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener listener)
    • getPropertyChangeListeners

      public PropertyChangeListener[] getPropertyChangeListeners()
    • addPropertyChangeListener

      public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
    • removePropertyChangeListener

      public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
    • getPropertyChangeListeners

      public PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
    • hasListeners

      public boolean hasListeners(String propertyName)