Moderator: moderators
otis_bartleh wrote:I've never used the stock kernel, I use Trinity and leankernel on my Galaxy Nexus, both with the stuttering issue... Franco kernel just isn't as good on my phone, guess I'll have to bring that up in the other kernel threads...
NTolerance wrote:otis_bartleh wrote:I've never used the stock kernel, I use Trinity and leankernel on my Galaxy Nexus, both with the stuttering issue... Franco kernel just isn't as good on my phone, guess I'll have to bring that up in the other kernel threads...
The Franco kernel has some documented I/O scheduling tweaks that the other kernels may not have.
otis_bartleh wrote:NTolerance wrote:otis_bartleh wrote:I've never used the stock kernel, I use Trinity and leankernel on my Galaxy Nexus, both with the stuttering issue... Franco kernel just isn't as good on my phone, guess I'll have to bring that up in the other kernel threads...
The Franco kernel has some documented I/O scheduling tweaks that the other kernels may not have.
Both kernels are way better than Franco's, like I said, gonna have to check those threads and post about it, not going to ruin my phone by going to Franco kernel just for Subsonic, I'll just use a player that works. Franco also turns off fsync by default which can result in data corruption...
...
...
I/DownloadFile( 5382): Downloaded 25.22 MB of Layer 04
I/DownloadFile( 5382): Downloaded 25.96 MB of Layer 04
I/DownloadFile( 5382): Downloaded 26.64 MB of Layer 04
I/DownloadFile( 5382): Downloaded 27.32 MB of Layer 04
I/DownloadFile( 5382): Downloaded 28.07 MB of Layer 04
I/DownloadFile( 5382): Downloaded 28.76 MB of Layer 04
I/DownloadServiceImpl( 5382): STARTED -> COMPLETED (DownloadFile (Layer 04))
I/DownloadServiceImpl( 5382): Requesting restart from 122828 of 5608000
D/CancellableTask( 5382): Cancelling BufferTask (DownloadFile (Layer 04))
I/DownloadServiceImpl( 5382): COMPLETED -> IDLE (DownloadFile (Layer 04))
D/CancellableTask( 5382): Starting thread for BufferTask (DownloadFile (Layer 04))
I/DownloadServiceImpl( 5382): IDLE -> DOWNLOADING (DownloadFile (Layer 04))
I/DownloadServiceImpl( 5382): Buffering /storage/sdcard1/subsonic/music/Mixes/Autonomic Podcasts/Layer 04.0.partial.mp3 (30323208/30446088, false)
I/DownloadServiceImpl( 5382): Buffering /storage/sdcard1/subsonic/music/Mixes/Autonomic Podcasts/Layer 04.0.partial.mp3 (30550544/30446088, false)
I/DownloadServiceImpl( 5382): DOWNLOADING -> IDLE (DownloadFile (Layer 04))
I/DownloadServiceImpl( 5382): IDLE -> PREPARING (DownloadFile (Layer 04))
I/DownloadServiceImpl( 5382): PREPARING -> PREPARED (DownloadFile (Layer 04))
I/DownloadServiceImpl( 5382): Restarting player from position 122828
I/DownloadServiceImpl( 5382): PREPARED -> STARTED (DownloadFile (Layer 04))
I/DownloadServiceLifecycleSupport( 5382): Serialized currentPlayingIndex: 0, currentPlayingPosition: 122880
I/FileUtil( 5382): Serialized object to /data/data/net.sourceforge.subsonic.androidapp/cache/downloadstate.ser
...
...
Log.i(TAG, System.currentTimeMillis() + " - Requesting restart from " + pos + " of " + duration);
Log.i(TAG, System.currentTimeMillis() + " - Restarting player from position " + position);
I/DownloadServiceImpl( 6750): 1349824056713 - STARTED -> COMPLETED (DownloadFile (Layer 04))
I/DownloadServiceImpl( 6750): 1349824056717 - Requesting restart from 6060 of 5608000
D/CancellableTask( 6750): Cancelling BufferTask (DownloadFile (Layer 04))
I/DownloadServiceImpl( 6750): 1349824056733 - COMPLETED -> IDLE (DownloadFile (Layer 04))
D/CancellableTask( 6750): Starting thread for BufferTask (DownloadFile (Layer 04))
I/DownloadServiceImpl( 6750): 1349824056739 - IDLE -> DOWNLOADING (DownloadFile (Layer 04))
I/DownloadServiceImpl( 6750): 1349824056741 - Buffering /storage/sdcard1/subsonic/music/Mixes/Autonomic Podcasts/Layer 04.0.partial.mp3 (1641912/1764792, false)
I/DownloadFile( 6750): Downloaded 1.76 MB of Layer 04
I/DownloadServiceImpl( 6750): 1349824057742 - Buffering /storage/sdcard1/subsonic/music/Mixes/Autonomic Podcasts/Layer 04.0.partial.mp3 (1906896/1764792, false)
I/DownloadServiceImpl( 6750): 1349824057745 - DOWNLOADING -> IDLE (DownloadFile (Layer 04))
I/DownloadServiceImpl( 6750): 1349824057780 - IDLE -> PREPARING (DownloadFile (Layer 04))
I/DownloadServiceImpl( 6750): 1349824057790 - PREPARING -> PREPARED (DownloadFile (Layer 04))
I/DownloadServiceImpl( 6750): 1349824057790 - Restarting player from position 6060
I/DownloadServiceImpl( 6750): 1349824057801 - PREPARED -> STARTED (DownloadFile (Layer 04))
I/DownloadServiceImpl(32528): 1349829962261 FINDME - doPLay start
I/DownloadServiceImpl(32528): 1349829973041 FINDME - Requesting restart from 10292 of 5708000
I/DownloadServiceImpl(32528): 1349829973057 FINDME - just run reset
I/DownloadServiceImpl(32528): 1349829973058 FINDME - just made a new buffertask
I/DownloadServiceImpl(32528): 1349829973059 FINDME - just asked buffertask to start
I/DownloadServiceImpl(32528): 1349829974063 FINDME - doPLay start
I/DownloadServiceImpl(32528): 1349829974100 FINDME - Restarting player from position 10292
I/DownloadServiceImpl(32528): 1349829974103 FINDME - Restarted player from position 10292
...
...
private synchronized void doPlay(final DownloadFile downloadFile, int position, boolean start) {
try {
Log.i(TAG, System.currentTimeMillis() + " FINDME - doPLay start");
final File file = downloadFile.isCompleteFileAvailable() ? downloadFile.getCompleteFile() : downloadFile.getPartialFile();
downloadFile.updateModificationDate();
mediaPlayer.setOnCompletionListener(null);
mediaPlayer.reset();
setPlayerState(IDLE);
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mediaPlayer.setDataSource(file.getPath());
setPlayerState(PREPARING);
mediaPlayer.prepare();
setPlayerState(PREPARED);
mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mediaPlayer) {
// Acquire a temporary wakelock, since when we return from
// this callback the MediaPlayer will release its wakelock
// and allow the device to go to sleep.
wakeLock.acquire(60000);
setPlayerState(COMPLETED);
// If COMPLETED and not playing partial file, we are *really" finished
// with the song and can move on to the next.
if (!file.equals(downloadFile.getPartialFile())) {
onSongCompleted();
return;
}
// If file is not completely downloaded, restart the playback from the current position.
int pos = mediaPlayer.getCurrentPosition();
synchronized (DownloadServiceImpl.this) {
// Work-around for apparent bug on certain phones: If close (less than ten seconds) to the end
// of the song, skip to the next rather than restarting it.
Integer duration = downloadFile.getSong().getDuration() == null ? null : downloadFile.getSong().getDuration() * 1000;
if (duration != null) {
if (Math.abs(duration - pos) < 10000) {
Log.i(TAG, System.currentTimeMillis() + " FINDME - Skipping restart from " + pos + " of " + duration);
onSongCompleted();
return;
}
}
Log.i(TAG, System.currentTimeMillis() + " FINDME - Requesting restart from " + pos + " of " + duration);
reset();
Log.i(TAG, System.currentTimeMillis() + " FINDME - just run reset");
bufferTask = new BufferTask(downloadFile, pos);
Log.i(TAG, System.currentTimeMillis() + " FINDME - just made a new buffertask");
bufferTask.start();
Log.i(TAG, System.currentTimeMillis() + " FINDME - just asked buffertask to start");
}
}
});
if (position != 0) {
Log.i(TAG, System.currentTimeMillis() + " FINDME - Restarting player from position " + position);
mediaPlayer.seekTo(position);
Log.i(TAG, System.currentTimeMillis() + " FINDME - Restarted player from position " + position);
}
...
...
I/DownloadServiceImpl(32528): 1349829973059 FINDME - just asked buffertask to start
D/CancellableTask(32528): Starting thread for BufferTask (DownloadFile (Layer 06))
I/DownloadServiceImpl(32528): 1349829973060 - IDLE -> DOWNLOADING (DownloadFile (Layer 06))
I/DownloadServiceImpl(32528): 1349829973061 - Buffering /storage/sdcard1/subsonic/music/Mixes/Autonomic Podcasts/Layer 06.0.partial.mp3 (2904944/3027824, false)
I/DownloadFile(32528): Downloaded 2.88 MB of Layer 06
I/DownloadServiceImpl(32528): 1349829974062 - Buffering /storage/sdcard1/subsonic/music/Mixes/Autonomic Podcasts/Layer 06.0.partial.mp3 (3155448/3027824, false)
I/DownloadServiceImpl(32528): 1349829974063 FINDME - doPLay start
...
...
private class BufferTask extends CancellableTask {
private static final int BUFFER_LENGTH_SECONDS = 30;
...
...
./adb logcat | grep FINDME
W/AudioTrack( 1916): releaseBuffer() track 0x40eb5300 name=0x1 disabled, restarting
Users browsing this forum: No registered users and 13 guests