realbasic-nug
[Top] [All Lists]

Re: Getting song duration and using Sound class for playing the sound

To: realbasic-nug at lists dot realsoftware dot com
Subject: Re: Getting song duration and using Sound class for playing the sound
From: Ron Benditt <rbenditt at alienapparatus dot com>
Date: Fri, 31 Dec 2004 16:14:51 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <20041231180032 dot 9F2DA62EA3A at lists dot realsoftware dot com>
Now, I was thinking about allowing the sound editing and found the...
EditableMovie Class ... and ... what a surprise, there is a 'Duration' property.


Emile,

Just a couple of comments on your technique. I used to open sounds as editablemovies because I wanted access to the duration property. I had to abandon that approach because during my beta testing, I found that users were trying to open songs from CDs (i.e. non-editable media) or write-protected files. None of these files will open as editablemovies. After researching this a bit, I found that someone posted that you can get the sound's duration by setting its playback position to some extremely large number, then reading it back. You can then reset the position to the original position after obtaining the duration. Another workaround is to use the Monkeybread plugin.

Regards,

Ron Benditt
Alien Apparatus Company, Inc.
http://www.alienapparatus.com

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>