Re: Playing hi-res audio through external DAC
Re: Playing hi-res audio through external DAC
- Subject: Re: Playing hi-res audio through external DAC
- From: Kenny Leung <email@hidden>
- Date: Wed, 18 Apr 2018 14:25:07 -0700
Hi Patrick.
I’m trying to write my own hi-res audio player. I’ve already been successful in
playing a 24/192kHz audio file on both iOS and macOS using code based on what
is written here:
https://developer.apple.com/library/content/documentation/MusicAudio/Conceptual/AudioQueueProgrammingGuide/AQPlayback/PlayingAudio.html
<https://developer.apple.com/library/content/documentation/MusicAudio/Conceptual/AudioQueueProgrammingGuide/AQPlayback/PlayingAudio.html>
However, the CoreAudio system automatically converts the sample rate internally
to whatever the output rate is set to (via Audio Midi Setup on Mac, and some
unknown method on iOS).
On iOS, you can set AVAudioSession.sampleRate, but output still won’t go higher
than 48kHz.
I’m using an XDuoo XD-05 (http://www.xduoo.com/xduoo/En/ProductView.Asp?ID=17
<http://www.xduoo.com/xduoo/En/ProductView.Asp?ID=17>) with a display, so it
tells me what the phone is outputting. I can use Onkyo player to play at
24/192kHz, but I can’t get my own app to play at any more than 48kHz. Sample
rate conversion is precisely the thing I am trying to get away from.
Thanks.
-Kenny
> On Apr 18, 2018, at 12:12 PM, Patrick Cusack <email@hidden> wrote:
>
> Your output device is going to determine your sample rate. Any audio you play
> is going to be float so 24 bit isn’t a consideration as you will convert the
> 24bit audio to float. As for your 192kHz audio, you will either need to play
> it out of 192kHz device or perform sample rate conversion in your audio graph.
>
> This stack overflow listing discusses handling sample rate conversion:
>
> https://stackoverflow.com/questions/6610958/os-x-ios-sample-rate-conversion-for-a-buffer-using-audioconverterfillcomplex
>
>
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden