L
Lloyd Dupont
given a Wav file or byte[] how do I know the number of seconds it will play
?
?
Chris Tacke said:Ah, you're running into the "quickly written and largely untested" part.
Really, the Multimedia library started as a mixer project, then I inherited
it and tried to put it into a usable format, then Alex grabbed it and did
enough fixes to get it to work with a single format. What it needs is some
attention, but none of us have had the time. If you get it working, we (and
many others in the community) would greatly appreciate it, but otherwise
you'll probably have to wait for the "Feinman Touch" to turn it to gold.
-Chris
Lloyd Dupont said:given a Wav file or byte[] how do I know the number of seconds it will play
?
haven't had a chance to make any changes to the actual OpenNETCF.orgMark Arteaga said:I have made some changes to the player to calculate the length but I
StreamLength property to show a progress.private int streamLength=0;
public int StreamLength
{
get{return this.streamLength;}
}
public void Play(Stream playStream)
{
...
if ( playStream == null )
{
throw new Exception("No valid WAV file has been opened");
}
this.streamLength = (int)playStream.Length/this.m_format.AvgBytesPerSec;
...
}
After the Play() method returns you can start a timer using the