Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-23-2012, 01:52 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
musicpos and musiclen

Hey, just trying to calculate the position of a song in seconds.
I'm assuming musiclen and musicpos are in bytes? not bits?
So it's either /1024 or /1000 not sure.
Anyway, iv'e tried a few things.
This seemed the most logical but failed.
PHP Code:
  temp.mp musicpos//Current position, assuming it's the current byte you're at.
  
temp.ml musiclen//Total bytes.
  
temp.bitrate 128//The bit rate of the song, needed to get seconds.
  
temp.mps musicpos/1024/bitrate/60//Should be the second you're at. 
Any advice?
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:17 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.