diff options
Diffstat (limited to 'src/audioOutputs/audioOutput_osx.c')
-rw-r--r-- | src/audioOutputs/audioOutput_osx.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/audioOutputs/audioOutput_osx.c b/src/audioOutputs/audioOutput_osx.c index 1fc0a5d9e..65060cc8c 100644 --- a/src/audioOutputs/audioOutput_osx.c +++ b/src/audioOutputs/audioOutput_osx.c @@ -266,8 +266,7 @@ static int osx_openDevice(struct audio_output *audioOutput, streamDesc.mFormatFlags |= kLinearPCMFormatFlagIsBigEndian; #endif - streamDesc.mBytesPerPacket = - audioFormat->channels * audio_format_sample_size(audioFormat); + streamDesc.mBytesPerPacket = audio_format_frame_size(audioFormat); streamDesc.mFramesPerPacket = 1; streamDesc.mBytesPerFrame = streamDesc.mBytesPerPacket; streamDesc.mChannelsPerFrame = audioFormat->channels; @@ -284,7 +283,7 @@ static int osx_openDevice(struct audio_output *audioOutput, /* create a buffer of 1s */ od->bufferSize = (audioFormat->sample_rate) * - (audioFormat->bits >> 3) * (audioFormat->channels); + audio_format_frame_size(audioFormat); od->buffer = xrealloc(od->buffer, od->bufferSize); od->pos = 0; |