• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Cannot change device stream format
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cannot change device stream format


  • Subject: Cannot change device stream format
  • From: Yue Wang <email@hidden>
  • Date: Sun, 03 Jan 2016 00:27:11 -0800

Hi

I am a contributor to the cmus music player project (https://cmus.github.io/) who implemented the coreaudio output plugin. My original implementation is based on AudioOutputUnit, which works perfectly fine. Latest code is hosted at https://github.com/Wang-Yue/cmus/blob/master/coreaudio.c.

I'm currently doing an experiment to provide "bit perfect" support (similar what BitPerfect on App Store is doing), that sends the unmodified linear PCM data directly to an output device (such as a DAC), if the device supports such data format. 

I ran into problem that I cannot change the device stream format from 32 bit float (system default) to 16 bit int (CD format). My hardware does support the 16 bit integer format as an available physical format, and I can set it as kAudioStreamPropertyPhysicalFormat. In Audio Midi Setup I can see it's correctly updated. 

Then I try to set the kAudioDevicePropertyStreamFormat with 16bit integer AudioStreamBasicDescription. It returns without any error. However, when getting the description from the device again, it seems unchanged (still 32 bit float). 

My code is listed in 
https://github.com/Wang-Yue/cmus/blob/exclusive/coreaudio.c#L821

If I force to call AudioDeviceStart, I will get very noisy audio (which is also 2x faster than normal speed).

Could someone help and take a look?

Thanks

Yue
 _______________________________________________
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

  • Follow-Ups:
    • Re: Cannot change device stream format
      • From: Brian Willoughby <email@hidden>
  • Next by Date: Re: Cannot change device stream format
  • Next by thread: Re: Cannot change device stream format
  • Index(es):
    • Date
    • Thread