AudioStreamer
AudioStreamer copied to clipboard
Sometimes state doesn't set to AS_PLAYING
Sometimes state doesn't set to AS_PLAYING. log of states: AS_STARTING_FILE_THREAD AS_WAITING_FOR_DATA AS_WAITING_FOR_QUEUE_TO_START
but there is a sound it happens occasionally
Happens on some of the audio sources I used consistently. So, I can't rely on AS_PLAYING to be the point to enable some of the buttons on my screen.
I ran into this problem, and think I fixed it by changing the call:
[self performSelector: onThread: withObject: waitUntilDone: modes:]
at the start of the function (handlePropertyChangeForQueue:propertyID:) to:
[self performSelector: onThread: withObject: waitUntilDone:]
It seems like there is a mode mismatch which causes the call to be dropped in the first version.
@sbradburn is right ,I found that ,but the fix can't solve the problem , it is still the same
Same problem here. I have tried a little debugging but with no avail. I have tried to fix it by replacing performSelector with NSTimer (!!!) but after a call or two it outputs an error to inID. When audio streamer brakes the inID returned the current date (ex 2013-12-16 11:14...)
Any ideas?
I encounter this problem too, #74 is the same issue, @mike-ferenduros say
"Looks 'enqueueBuffer' is blocking the internal thread, preventing '- (void)handleInterruptionChangeToState:(NSNotification *)notification' from happening. I did the same as atomic and commented out lines 1877-1886 as a quick fix but yeah, it's not the right solution."
I think it may be the reason,but also i can not fix it ,just comment the
if (![[NSThread currentThread] isEqual:internalThread]) { ... }
It may cause other issue... By the way, @mattgallagher ,did you had give up maintain this project? I see the last commit is two years ago.