Fixed pendingQueue and mostRecentlyQueuedStillPendingItem returning STKQueueEntry instead of queueItemId

This commit is contained in:
Thong Nguyen 2014-02-13 17:54:24 +00:00
parent 569764d869
commit aa441045aa
1 changed files with 12 additions and 5 deletions

View File

@ -2728,9 +2728,16 @@ static OSStatus OutputRenderCallback(void* inRefCon, AudioUnitRenderActionFlags*
NSArray* retval;
NSMutableArray* mutableArray = [[NSMutableArray alloc] initWithCapacity:upcomingQueue.count + bufferingQueue.count];
[mutableArray skipQueueWithQueue:upcomingQueue];
[mutableArray skipQueueWithQueue:bufferingQueue];
for (STKQueueEntry* entry in upcomingQueue)
{
[mutableArray addObject:[entry queueItemId]];
}
for (STKQueueEntry* entry in bufferingQueue)
{
[mutableArray addObject:[entry queueItemId]];
}
retval = [NSArray arrayWithArray:mutableArray];
pthread_mutex_unlock(&playerMutex);
@ -2755,7 +2762,7 @@ static OSStatus OutputRenderCallback(void* inRefCon, AudioUnitRenderActionFlags*
if (upcomingQueue.count > 0)
{
NSObject* retval = [upcomingQueue objectAtIndex:0];
NSObject* retval = [[upcomingQueue objectAtIndex:0] queueItemId];
pthread_mutex_unlock(&playerMutex);
@ -2764,7 +2771,7 @@ static OSStatus OutputRenderCallback(void* inRefCon, AudioUnitRenderActionFlags*
if (bufferingQueue.count > 0)
{
NSObject* retval = [bufferingQueue objectAtIndex:0];
NSObject* retval = [[bufferingQueue objectAtIndex:0] queueItemId];
pthread_mutex_unlock(&playerMutex);