Another OpenNETCF..Player question

  • Thread starter Thread starter Lloyd Dupont
  • Start date Start date
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
 
ah, ok.
I see.

well now that I have a working prototype it might be worth do some bug
fixes.
I will let you know ...

--
ihookdb
Get your data mobile
http://www.ihookdb.com


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
?
 
I have made some changes to the player to calculate the length but I haven't had a chance to make any changes to the actual OpenNETCF.org source. Anyway, here is how I get the number of seconds.

private int streamLength=0

public int StreamLengt

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 StreamLength property to show a progress
HT
//Mark
 
Thanks Mark, I already some application to that :)

--
ihookdb
Get your data mobile
http://www.ihookdb.com


Mark Arteaga said:
I have made some changes to the player to calculate the length but I
haven't had a chance to make any changes to the actual OpenNETCF.org
source. Anyway, here is how I get the number of seconds.
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
StreamLength property to show a progress.
 
Back
Top