> On Apr 18, 2018, at 2:25 PM, Kenny Leung <[email protected]> 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 protected] >> <mailto:[email protected]>> 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 protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com This email sent to [email protected]
