ap4y / OrigamiEngine

Lightweight audio engine for iOS and OSX with flac, cue, mp3, m4a, m3u support.
http://ap4y.github.com/OrigamiEngine/
MIT License
545 stars 117 forks source link

the engine delegate method would run many times while play a song #46

Open hament opened 10 years ago

hament commented 10 years ago

the delegate method

wil run many times while playing a song.

My os is yosemite , rmbp 15 inch~

hament commented 10 years ago

I found this bug just appear in some songs like play this : https://drive.google.com/file/d/0BzjdbbgYruNbSV80OFAwcjRHczg/view?usp=sharing

ap4y commented 10 years ago

For some reason it doesn't happen for me. I have exactly one call of engineExpectsNextUrl. I also spotted another issue that low quality short files don't play because initial buffer requirements are quite generous. You can solve it by lowering buffer size here. Hope this helps.

rperney commented 10 years ago

I do have a similar bug : I noticed that my songs were cut before the end, because of the line [_input flushBuffer] even if bool flush was NO. I added an if(flush) condition, but now, I get a loop on the delegate call, due to [self setEndOfInput:YES] in the process method of the input.