From: molivier Date: Tue, 27 Dec 2005 07:53:53 +0000 (+0000) Subject: Fixed CoreAudio sound module X-Git-Tag: xonotic-v0.1.0preview~4418 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f0af7525eef11356b0e948df23146415f67b1e08;p=xonotic%2Fdarkplaces.git Fixed CoreAudio sound module git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5869 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/snd_coreaudio.c b/snd_coreaudio.c index 10214b90..09389301 100644 --- a/snd_coreaudio.c +++ b/snd_coreaudio.c @@ -147,17 +147,17 @@ qboolean SNDDMA_Init(void) return false; } Con_DPrintf(" Hardware format:\n"); - Con_DPrintf(" %5d mSampleRate\n", (unsigned int)outputStreamBasicDescription.mSampleRate); - Con_DPrintf(" %c%c%c%c mFormatID\n", + Con_DPrintf(" %5d mSampleRate\n", (unsigned int)outputStreamBasicDescription.mSampleRate); + Con_DPrintf(" %c%c%c%c mFormatID\n", (outputStreamBasicDescription.mFormatID & 0xff000000) >> 24, (outputStreamBasicDescription.mFormatID & 0x00ff0000) >> 16, (outputStreamBasicDescription.mFormatID & 0x0000ff00) >> 8, (outputStreamBasicDescription.mFormatID & 0x000000ff) >> 0); - Con_DPrintf(" %5d mBytesPerPacket\n", outputStreamBasicDescription.mBytesPerPacket); - Con_DPrintf(" %5d mFramesPerPacket\n", outputStreamBasicDescription.mFramesPerPacket); - Con_DPrintf(" %5d mBytesPerFrame\n", outputStreamBasicDescription.mBytesPerFrame); - Con_DPrintf(" %5d mChannelsPerFrame\n", outputStreamBasicDescription.mChannelsPerFrame); - Con_DPrintf(" %5d mBitsPerChannel\n", outputStreamBasicDescription.mBitsPerChannel); + Con_DPrintf(" %5d mBytesPerPacket\n", outputStreamBasicDescription.mBytesPerPacket); + Con_DPrintf(" %5d mFramesPerPacket\n", outputStreamBasicDescription.mFramesPerPacket); + Con_DPrintf(" %5d mBytesPerFrame\n", outputStreamBasicDescription.mBytesPerFrame); + Con_DPrintf(" %5d mChannelsPerFrame\n", outputStreamBasicDescription.mChannelsPerFrame); + Con_DPrintf(" %5d mBitsPerChannel\n", outputStreamBasicDescription.mBitsPerChannel); if(outputStreamBasicDescription.mFormatID != kAudioFormatLinearPCM) { @@ -183,6 +183,7 @@ qboolean SNDDMA_Init(void) shm->format.speed = outputStreamBasicDescription.mSampleRate; shm->format.channels = outputStreamBasicDescription.mChannelsPerFrame; shm->format.width = 2; + shm->sampleframes = maxMixedSamples / shm->format.channels; shm->samples = maxMixedSamples; shm->buffer = (unsigned char *)s_mixedSamples; shm->samplepos = 0;