Fixed pendingQueue and mostRecentlyQueuedStillPendingItem returning STKQueueEntry instead of original queueItemId

This commit is contained in:
Thong Nguyen 2014-02-13 11:58:19 +00:00
parent ab0c4d1315
commit 511b756694
1 changed files with 11 additions and 4 deletions

View File

@ -2728,8 +2728,15 @@ 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];
@ -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);