summaryrefslogtreecommitdiffstats
path: root/play
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-09-14 07:04:26 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-09-14 07:04:26 +0000
commitd1dcfcbc903153007fff2c155248046ecfbdc76a (patch)
tree400ed80dd1ce436818c893bb5f53d4b9d95443ec /play
parentf2f82cae3114683dd230328a4638b8cb35b46c3b (diff)
downloadampache-d1dcfcbc903153007fff2c155248046ecfbdc76a.tar.gz
ampache-d1dcfcbc903153007fff2c155248046ecfbdc76a.tar.bz2
ampache-d1dcfcbc903153007fff2c155248046ecfbdc76a.zip
some fixes for the localplay, you can now install the MPD controller, and add instances, just not actually play to it... realized I need to think on how to do that a little...
Diffstat (limited to 'play')
-rw-r--r--play/index.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/play/index.php b/play/index.php
index 5ce996dd..42641138 100644
--- a/play/index.php
+++ b/play/index.php
@@ -266,10 +266,10 @@ else {
} // else not downsampling
// We need to check to see if they are rate limited
-$chunk_size = '4096';
+$chunk_size = '2084';
// Attempted fix, pimp up the size a bit
-$song->size = $song->size + ($chunk_size*2);
+$song->size = $song->size;
// Put this song in the now_playing table
insert_now_playing($song->id,$uid,$song->time,$sid);
@@ -299,11 +299,11 @@ $bytesStreamed = 0;
$minBytesStreamed = $song->size / 2;
// Actually do the streaming
-while (!feof($fp) && (connection_status() == 0)) {
+do {
$buf = fread($fp, $chunk_size);
print($buf);
$bytesStreamed += $chunk_size;
-}
+} while (!feof($fp) && (connection_status() == 0));
// Make sure that a good chunk of the song has been played
if ($bytesStreamed > $minBytesStreamed) {