Skip to content
This repository has been archived by the owner on Aug 7, 2019. It is now read-only.

Gapless playback over HTTP #53

Open
alecgorge opened this issue Mar 8, 2015 · 2 comments
Open

Gapless playback over HTTP #53

alecgorge opened this issue Mar 8, 2015 · 2 comments

Comments

@alecgorge
Copy link

I would like to eliminate the small blip between two MP3's streamed over HTTP.

My guess was that there isn't enough time for the HTTP request to load enough data between the EOF of the first source and end of playback for the first source for the second source to load data over HTTP.

Based on this hunch, I multiplied CHUNK_SIZE and BUFFER_SIZE by 4:

// default reading chunk size
#define CHUNK_SIZE 16 * 1024 * 4
// deault buffer size
#define BUFFER_SIZE 256 * 1024 * 4

This gives gapless playback from cache and over HTTP. However, seek didn't seem to behave properly until I used [_player seekToTime:seekSlider.value withDataFlush:YES].

Are there any downsides to this approach?

@squarefrog
Copy link

This seems to work really well. I presume the only noticable downside to this is OrigamiEngine uses more memory?

@alecgorge
Copy link
Author

A little more, yeah. The other thing I noticed is initial playback and starting playback after seeking takes a little longer due to the increased sizes, but that is acceptable for what I need to do.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants