From d9c0dc773391641be59190d7103334f4ef81115f Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 27 Jun 2013 08:22:52 +0200 Subject: ao_coreaudio: remove packetSize private variable --- audio/out/ao_coreaudio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'audio') diff --git a/audio/out/ao_coreaudio.c b/audio/out/ao_coreaudio.c index 7fbd66da0b..7b45e68ecf 100644 --- a/audio/out/ao_coreaudio.c +++ b/audio/out/ao_coreaudio.c @@ -73,7 +73,6 @@ struct priv /* AudioUnit */ AudioUnit theOutputUnit; - int packetSize; bool paused; struct mp_ring *buffer; @@ -92,8 +91,9 @@ static OSStatus render_cb_lpcm(void *ctx, AudioUnitRenderActionFlags *aflags, { struct ao *ao = ctx; struct priv *p = ao->priv; - int requested = frames * p->packetSize; + AudioBuffer buf = buffer_list->mBuffers[0]; + int requested = buf.mDataByteSize; buf.mDataByteSize = mp_ring_read(p->buffer, buf.mData, requested); @@ -318,7 +318,7 @@ static int init(struct ao *ao, char *params) asbd.mFormatFlags |= kAudioFormatFlagIsBigEndian; asbd.mFramesPerPacket = 1; - p->packetSize = asbd.mBytesPerPacket = asbd.mBytesPerFrame = + asbd.mBytesPerPacket = asbd.mBytesPerFrame = asbd.mFramesPerPacket * asbd.mChannelsPerFrame * (asbd.mBitsPerChannel / 8); -- cgit v1.2.3