Changeset 345 for trunk/src_apollo/org/apollo/widgets/LinkedTrack.java
- Timestamp:
- 10/05/08 20:13:15 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src_apollo/org/apollo/widgets/LinkedTrack.java
r344 r345 43 43 import org.apollo.audio.util.PlaybackClock; 44 44 import org.apollo.audio.util.SoundDesk; 45 import org.apollo.audio.util.Timeline; 45 46 import org.apollo.audio.util.TrackMixSubject; 46 47 import org.apollo.audio.util.MultiTrackPlaybackController.MultitrackLoadListener; … … 853 854 } 854 855 856 857 /** 858 * Adjusts the initiation time for this track - to the exact millisecond. 859 * 860 * The x-position is updated (which will be eventually done with possibly better 861 * accuracy if the layout daemon is on) 862 * 863 * @param specificInitTime 864 * The new initiation time for this track in milliseconds 865 */ 866 public void setInitiationTime(long specificInitTime) { 867 868 Frame parent = getParentFrame(); 869 870 // Update x position if it can 871 if (parent != null) { 872 Timeline tl = FrameLayoutDaemon.getInstance().getTimeline(parent); 873 if (tl != null) { 874 this.setPosition(tl.getXAtMSTime(specificInitTime), getY()); 875 } 876 } 877 878 updateData(TrackWidgetCommons.META_INITIATIONTIME_TAG, TrackWidgetCommons.META_INITIATIONTIME_TAG + specificInitTime); 879 880 String absLink = getAbsoluteLink(); 881 882 // If this track is in the audio model ... 883 if (AudioStructureModel.getInstance().getLinkedTrackGraphInfo(virtualFilename, (parent != null) ? parent.getName() : null) != null && 884 absLink != null) { 885 886 FrameLayoutDaemon.getInstance().suspendLayout(DisplayIO.getCurrentFrame(), null); 887 888 try { 889 890 // Add and remove it 891 AudioStructureModel.getInstance().onLinkedTrackWidgetRemoved(virtualFilename, (parent != null) ? parent.getName() : null); 892 893 AudioStructureModel.getInstance().onLinkedTrackWidgetAnchored( 894 virtualFilename, 895 (parent != null) ? parent.getName() : null, 896 specificInitTime, 897 absLink, 898 getName()); 899 900 } finally { 901 FrameLayoutDaemon.getInstance().resumeLayout(null); 902 } 903 904 } 905 } 906 855 907 /** 856 908 * @return
Note:
See TracChangeset
for help on using the changeset viewer.