Minor fixes

This commit is contained in:
Alexey Savin 2015-12-14 11:37:51 +03:00
parent cbdb01f0a9
commit a84db95be6
2 changed files with 3 additions and 2 deletions

View File

@ -599,6 +599,7 @@ static void AudioFileStreamPacketsProc(void* clientData, UInt32 numberBytes, UIn
pthread_cond_destroy(&mainThreadSyncCallReadyCondition);
free(readBuffer);
free(pcmAudioBufferList.mBuffers[0].mData);
}
-(void) startSystemBackgroundTask

View File

@ -46,7 +46,7 @@
{
if (processedPacketsCount > STK_BIT_RATE_ESTIMATION_MIN_PACKETS_PREFERRED || (audioStreamBasicDescription.mBytesPerFrame == 0 && processedPacketsCount > STK_BIT_RATE_ESTIMATION_MIN_PACKETS_MIN))
{
double averagePacketByteSize = processedPacketsSizeTotal / processedPacketsCount;
double averagePacketByteSize = (double)processedPacketsSizeTotal / (double)processedPacketsCount;
retval = averagePacketByteSize / packetDuration * 8;
@ -110,7 +110,7 @@
-(Float64) progressInFrames
{
OSSpinLockLock(&self->spinLock);
Float64 retval = self->seekTime + self->framesPlayed;
Float64 retval = (self->seekTime * self->audioStreamBasicDescription.mSampleRate) + self->framesPlayed;
OSSpinLockUnlock(&self->spinLock);
return retval;