diff options
author | Alfred E. Heggestad <aeh@db.org> | 2014-02-13 00:01:40 +0100 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2014-02-13 00:01:40 +0100 |
commit | e4d71aca3cc153bbac505dac430b3b5574f15016 (patch) | |
tree | edb7fb636945ed9cecbd7953d575508b7cc80a9b /modules/coreaudio/player.c | |
parent | b823b7d4481612b7047d7ad87911218893a2297b (diff) |
remove fmt parameter from ausrc/auplay api
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++) { |