Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Delay using SelectStream to change track on FLAC player. #2163

Answered by pschatzmann
hash6iron asked this question in Q&A
Discussion options

Hi @pschatzmann.

I've implemented SD_MMC now FLAC plays well. I ́m using AudioSourceIdxSDMMC source.

I ́ve observed a delay stepping some files when I use source.selectStream(..) to change track. Is possible to know when source.SelectStream has finished?

I undestand that selectStream try to search the track that I ́ve indicated and that process required a concrete time. if I start to player.COPY without selectStream process finished, player freezed.

Any idea for solution?

Thanks in advance.

You must be logged in to vote

What error messages or warnings would you get in the Log when it is failing ?
I added some more error checks to the SDIndex class

Replies: 3 comments 2 replies

Comment options

Hi again.

The problem was in player.begin(..) I ́ve added this code that works fine with FLACs where files are very big,

while(!player.begin(currentIdx)){}

Thanks!

You must be logged in to vote
1 reply
Comment options

Don't forget to set setupIndex to false in the AudioSourceIdxSDMMC constructor, when you don't need to rebuild the index.

This should avoid the initial delay when rebuilding the index...

Comment options

Appears that the problem is in player.begin() I'm waiting until player.begin is true but sometimes freez the player. This issue only occurs in FLAC player with 30Mb around file size.
I'm going to set setupIndex to false.

You must be logged in to vote
1 reply
Comment options

What error messages or warnings would you get in the Log when it is failing ?
I added some more error checks to the SDIndex class

Answer selected by pschatzmann
Comment options

Any error. Only delay sometimes playing FLAC files using player.begin(..) without review if .begin finished. If begin is reviewed there is not problem.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /