From e4d71aca3cc153bbac505dac430b3b5574f15016 Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" Date: Thu, 13 Feb 2014 00:01:40 +0100 Subject: remove fmt parameter from ausrc/auplay api --- modules/coreaudio/player.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/coreaudio/player.c') diff --git a/modules/coreaudio/player.c b/modules/coreaudio/player.c index 68aca4e..1243450 100644 --- a/modules/coreaudio/player.c +++ b/modules/coreaudio/player.c @@ -110,17 +110,17 @@ int coreaudio_player_alloc(struct auplay_st **stp, struct auplay *ap, goto out; fmt.mSampleRate = (Float64)prm->srate; - fmt.mFormatID = audio_fmt(prm->fmt); + fmt.mFormatID = kAudioFormatLinearPCM; fmt.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked; #ifdef __BIG_ENDIAN__ fmt.mFormatFlags |= kAudioFormatFlagIsBigEndian; #endif fmt.mFramesPerPacket = 1; - fmt.mBytesPerFrame = prm->ch * bytesps(prm->fmt); - fmt.mBytesPerPacket = prm->ch * bytesps(prm->fmt); + fmt.mBytesPerFrame = prm->ch * 2; + fmt.mBytesPerPacket = prm->ch * 2; fmt.mChannelsPerFrame = prm->ch; - fmt.mBitsPerChannel = 8*bytesps(prm->fmt); + fmt.mBitsPerChannel = 16; status = AudioQueueNewOutput(&fmt, play_handler, st, NULL, kCFRunLoopCommonModes, 0, &st->queue); @@ -131,7 +131,7 @@ int coreaudio_player_alloc(struct auplay_st **stp, struct auplay *ap, } sampc = prm->srate * prm->ch * prm->ptime / 1000; - bytc = sampc * bytesps(prm->fmt); + bytc = sampc * 2; for (i=0; ibuf); i++) { -- cgit v1.2.3