• 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
Bug in IOAudioStream?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in IOAudioStream?


  • Subject: Bug in IOAudioStream?
  • From: BlazeAudio Developer <email@hidden>
  • Date: Sat, 13 Aug 2005 12:45:13 +0530

I am working on an audio driver in which the Streams are created at a "later" time - that is after the Engine is created/initialized.

In this case, I am creating three streams. One Stereo Output Stream, One 16 ch. Input stream, and one more Stereo Input Stream.

All three streams get created fine. However, CoreAudio applications are able to see only the Stereo output and the 16 channel Input stream. They cannot see the second stereo input stream.

Looking at the IORegistry I see that all three streams are present, but the IOAudioStreamStartingChannelNumber property for the third stream is missing.

I was puzzled by this.

So, I started looking at the IOAudoiFamily code to see where this property gets set/updated.

And in doing so I found out that in my case, this should get updated from IOAudioStream::setformat() function. However, the IOAudioEngine::updateChannelNumbers() is called only if the "old" format and the new format have a different number of channels. However, if it is a "new" stream, and if setFormat is being called the first time, the "old" format is essentially not set, uninitialized..

I tried to find where the IOAudioStream's member "format" is initialized, but I could not find any initialization for this member.

So, comparing the channel count of the new format, against an uninitialized member does not make sense.

I guess I was getting lucky with the first two streams (perhaps the member was being initialized to a value of 0), and with the third stream the format's number of channels was probably 2 to begin with, and so caused it not to be invoked.

I ended up calling updateChannelNumbers() on the engine from my code that creates the streams, and it started working fine.

Thanks.
Devendra.
 _______________________________________________
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: Bug in IOAudioStream?
      • From: Jeff Moore <email@hidden>
References: 
 >Audio clipping (From: Jonathan Lott <email@hidden>)
 >Re: Audio clipping (From: Jeff Moore <email@hidden>)

  • Prev by Date: August 2005 News and Promos
  • Next by Date: Re: iTunes stuttering, and don't shoot me--it might involve Core Audio
  • Previous by thread: Re: Audio clipping
  • Next by thread: Re: Bug in IOAudioStream?
  • Index(es):
    • Date
    • Thread