[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xaudio-sdk
Subject:    AW: [xaudio-sdk] Progress Bar Not Working, Help!
From:       "bAlTo () home" <djbalto () gmx ! ch>
Date:       2001-07-18 19:09:57
[Download RAW message or body]

Progress Bar Not Working, Help!Hi, Dave !

That´s simple : Since myDecoder->info->status->position is a value between
0.0 and 1.0, you will mostly get 0 when you multiply it with an
integer-value.

Try

    int( (myDecoder->info->status->position+0.005) * 100.0 )

to make a correct typecast...

Don´t know how this ever worked...

Greetinx,
Dirk
  -----Ursprüngliche Nachricht-----
  Von: xaudio-sdk-admin@mpegtv.com [mailto:xaudio-sdk-admin@mpegtv.com]Im
Auftrag von Dave Lowe
  Gesendet: Mittwoch, 18. Juli 2001 20:47
  An: 'xaudio-sdk@mpegtv.com'
  Betreff: [xaudio-sdk] Progress Bar Not Working, Help!


  Had previously been working, but now returns 0 all of the time.  This is
what I'm using:

  (myDecoder->info->status->position + 0.005) * 100

  where myDecoder is XA_Decoder*
  and info is XA_DecoderInfo*
  and status is XA_StatusInfo*
  and position is, of course, float

  As an MP3 is playing from a memory mapped file utilizing xsync, a client
program sends a message that the xaudio wrapper app catches in its windows
procedure, and which handles the message by calling the function that
calculates the above.

  Anyone have any pointers of where I could look for the problem?

  Thanks a ton!
  Dave Lowe, Programmer
  Experience Music Project.


[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Progress Bar Not Working, Help!</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4134.600" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=268445818-18072001>Hi, 
Dave !</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=268445818-18072001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=268445818-18072001>That´s 
simple&nbsp;: Since myDecoder-&gt;info-&gt;status-&gt;position is a value 
between 0.0 and 1.0, you will mostly get 0 when you multiply it with an 
integer-value.&nbsp;</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=268445818-18072001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=268445818-18072001>Try 
</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=268445818-18072001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=268445818-18072001>&nbsp;&nbsp;&nbsp; int( 
(myDecoder-&gt;info-&gt;status-&gt;position+0.005) * 100.0 )</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=268445818-18072001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=268445818-18072001>to 
make a correct typecast...</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=268445818-18072001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=268445818-18072001>Don´t 
know how this ever worked...</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=268445818-18072001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=268445818-18072001>Greetinx,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=268445818-18072001>Dirk</SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Ursprüngliche Nachricht-----<BR><B>Von:</B> 
  xaudio-sdk-admin@mpegtv.com [mailto:xaudio-sdk-admin@mpegtv.com]<B>Im Auftrag 
  von </B>Dave Lowe<BR><B>Gesendet:</B> Mittwoch, 18. Juli 2001 
  20:47<BR><B>An:</B> 'xaudio-sdk@mpegtv.com'<BR><B>Betreff:</B> [xaudio-sdk] 
  Progress Bar Not Working, Help!<BR><BR></FONT></DIV>
  <P><FONT face=Arial size=2>Had previously been working, but now returns 0 all 
  of the time.&nbsp; This is what I'm using:</FONT> </P>
  <P><FONT face=Arial size=2>(myDecoder-&gt;info-&gt;status-&gt;position + 
  0.005) * 100</FONT> </P>
  <P><FONT face=Arial size=2>where myDecoder is XA_Decoder*</FONT> <BR><FONT 
  face=Arial size=2>and info is XA_DecoderInfo*</FONT> <BR><FONT face=Arial 
  size=2>and status is XA_StatusInfo*</FONT> <BR><FONT face=Arial size=2>and 
  position is, of course, float</FONT> </P>
  <P><FONT face=Arial size=2>As an MP3 is playing from a memory mapped file 
  utilizing xsync, a client program sends a message that the xaudio wrapper app 
  catches in its windows procedure, and which handles the message by calling the 
  function that calculates the above.&nbsp; </FONT></P>
  <P><FONT face=Arial size=2>Anyone have any pointers of where I could look for 
  the problem?</FONT> </P>
  <P><FONT face=Arial size=2>Thanks a ton!</FONT> <BR><FONT face=Arial 
  size=2>Dave Lowe, Programmer</FONT> <BR><FONT face=Arial size=2>Experience 
  Music Project.</FONT> </P></BLOCKQUOTE></BODY></HTML>

_______________________________________________
xaudio-sdk mailing list
xaudio-sdk@mpegtv.com
http://mailman.bok.net/mailman/listinfo/xaudio-sdk


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic