summaryrefslogtreecommitdiffstats
path: root/lib/class/stream.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-20 07:31:00 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-20 07:31:00 +0000
commit897b35aeddd117409af95b270ec8309c2a564aaa (patch)
tree1becb256242920d81b1872a58f5b2b880045e664 /lib/class/stream.class.php
parent9661434379a94791031604a4a5094f5631351457 (diff)
downloadampache-897b35aeddd117409af95b270ec8309c2a564aaa.tar.gz
ampache-897b35aeddd117409af95b270ec8309c2a564aaa.tar.bz2
ampache-897b35aeddd117409af95b270ec8309c2a564aaa.zip
fixed issues with user edit and create, fixed seek errors (Thx Karl Hungus) started digging myself out of the session tarded hole I created, API is broken with this commit
Diffstat (limited to 'lib/class/stream.class.php')
-rw-r--r--lib/class/stream.class.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php
index 507cee02..9c1ad1e8 100644
--- a/lib/class/stream.class.php
+++ b/lib/class/stream.class.php
@@ -521,7 +521,7 @@ class Stream {
* opened file handled a reference to the song object is passed so that the changes we make
* in here affect the external object, References++
*/
- public static function start_downsample(&$song,$now_playing_id=0,$song_name=0) {
+ public static function start_downsample(&$song,$now_playing_id=0,$song_name=0,$start=0) {
/* Check to see if bitrates are set if so let's go ahead and optomize! */
$max_bitrate = Config::get('max_bit_rate');
@@ -591,7 +591,7 @@ class Stream {
$song->size = floor($sample_ratio*$song->size);
/* Get Offset */
- $offset = ( $start*$song->time )/( $sample_ratio*$song->size );
+ $offset = ( $start*$song->time )/( $song->size );
$offsetmm = floor($offset/60);
$offsetss = floor($offset-$offsetmm*60);
$offset = sprintf("%02d.%02d",$offsetmm,$offsetss);