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 16:13:41 -0700
Thanks!
I’ll give it a shot.
-Kenny
> On Apr 18, 2018, at 4:09 PM, Stephen F. Booth <email@hidden> wrote:
>
> I believe you're after kAudioDevicePropertyNominalSampleRate.
>
> See https://developer.apple.com/library/content/qa/qa1196/_index.html
> <https://developer.apple.com/library/content/qa/qa1196/_index.html> for a
> code sample and more information.
>
> Stephen
>
> On Wed, Apr 18, 2018 at 5:33 PM Kenny Leung <email@hidden
> <mailto:email@hidden>> wrote:
> Yes it does, just like any other audio output device. That’s not my issue.
> The issue is how to make the OS output to that device at the desired bitrate
> programmatically. I know I can change the bitrate in Audio Midi Setup
> manually.
>
> -Kenny
>
>
>> On Apr 18, 2018, at 2:37 PM, Patrick Cusack <email@hidden
>> <mailto:email@hidden>> wrote:
>>
>>
>>
>>> On Apr 18, 2018, at 2:25 PM, Kenny Leung <email@hidden
>>> <mailto:email@hidden>> wrote:
>>>
>>> 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.
>>
>> Does the XDuoo shows up as an output device in OSX? Specifically in the
>> Sound system preferences?
>>
>>>
>>> Thanks.
>>>
>>> -Kenny
>>>
>>>
>>>> On Apr 18, 2018, at 12:12 PM, Patrick Cusack <email@hidden
>>>> <mailto: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
>>>>
>>>> <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
> <mailto:email@hidden>)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden <mailto:email@hidden>
_______________________________________________
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