Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes the state didn't change to AS_PLAYING while the online music is playing~ #74

Open
vieriwml opened this issue Sep 4, 2013 · 7 comments

Comments

@vieriwml
Copy link

vieriwml commented Sep 4, 2013

I found that ,when I play the music with audiostreamer , sometimes the state didn't change to AS_PLAYING while the online music is playing. I debug the codes , I found that ,sometimes after the codes
if (![[NSThread currentThread] isEqual:internalThread])
{
[self
performSelector:@selector(handlePropertyChange:)
onThread:internalThread
withObject:[NSNumber numberWithInt:inID]
waitUntilDone:NO
modes:[NSArray arrayWithObject:NSDefaultRunLoopMode]];
return;
}
in the functions - (void)handlePropertyChangeForQueue:(AudioQueueRef)inAQ
propertyID:(AudioQueuePropertyID)inID execute , the function - (void)handlePropertyChange:(NSNumber *)num
{
[self handlePropertyChangeForQueue:NULL propertyID:[num intValue]];
} didn't execute...so the state keep the AS_WAITING_FOR_QUEUE_TO_START and wouldn't change to AS_PLAYING, anybody help me ?? what's the reason? How can I fix it.... thanks~

@paulshapiro
Copy link

Bump. I am experiencing this as well.

@catbus
Copy link

catbus commented Oct 30, 2013

Exact same issue here, currently looking for a solution. Happens intermittently.

@hiren443
Copy link

Same issue here. Please give me solution.

@atomictag
Copy link

Same problem here. I tried commenting out the code that checks the current thread:

if (![[NSThread currentThread] isEqual:internalThread]) { ... }

and it seems to solve the problem. Not sure this is the right solution, but give it a spin.

@Yaqoot
Copy link

Yaqoot commented Mar 11, 2014

same here I have been try to fix it for long .. @atomictag what did you do exactly , plz share us

@mike-ferenduros
Copy link

Same here.

Looks 'enqueueBuffer' is blocking the internal thread, preventing 'handlePropertyChangeForQueue' 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.

@NemoAir
Copy link

NemoAir commented Sep 17, 2015

Is Anyone solved this?
commet
if (![[NSThread currentThread] isEqual:internalThread]) { ... }
is not the right solution?
@mattgallagher

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

No branches or pull requests

8 participants