Skip to content

Commit

Permalink
sound setf markers
Browse files Browse the repository at this point in the history
  • Loading branch information
j-bresson committed Feb 13, 2018
1 parent db63e27 commit 2885075
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion om/src/packages/basic/containers/data-stream.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@
(defmethod (setf frames) (frames (self data-stream)) (setf (slot-value self (data-stream-frames-slot self)) frames))

(defmethod data-stream-get-frames ((self data-stream)) (frames self))
(defmethod data-stream-set-frames ((self data-stream) frames) (setf (frames self) frames))
(defmethod data-stream-set-frames ((self data-stream) frames)
(setf (frames self) frames)
(time-sequence-update-internal-times self))

;;; TIME-SEQUENCE API
(defmethod time-sequence-get-timed-item-list ((self data-stream)) (data-stream-get-frames self))
Expand Down
4 changes: 3 additions & 1 deletion om/src/packages/basic/time-sequence/time-sequence.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,9 @@
))


;todo clean and avoid calls to om-copy
; todo:
; - clean and avoid calls to om-copy
; - simplify when all points have a time !!
(defmethod time-sequence-update-internal-times ((self time-sequence) &optional (interpol-mode :constant-speed) (duration 10000) (modif-time nil))
;this function creates a list of times for all timed points even if they are nil.
;It can do with constant time or constant speed interpolations (interpol-mode :constant-speed :constant-time "default")
Expand Down
3 changes: 2 additions & 1 deletion om/src/packages/sound/sound/sound.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ Press 'space' to play/stop the sound file.
(defmethod (setf markers) (markers (self sound))
(data-stream-set-frames
self
(mapcar #'(lambda (m) (make-instance 'marker-frame :date m)) markers)))
(mapcar #'(lambda (m) (make-instance 'marker-frame :date m)) markers))
markers)

;;;===========================
;;; INITIALIZATION...
Expand Down

0 comments on commit 2885075

Please sign in to comment.