diff options
Diffstat (limited to 'modules/coreaudio/player.c')
-rw-r--r-- | modules/coreaudio/player.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; i<ARRAY_SIZE(st->buf); i++) { |