Support more AudioChannelLayoutTag than kAudioChannelLayoutTag_UseChannelDescriptions in cubeb_audiounit

NEW
Assigned to

Status

()

Core
Audio/Video: cubeb
P3
normal
Rank:
25
a year ago
8 months ago

People

(Reporter: chunmin, Assigned: chunmin)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

a year ago
We only support kAudioChannelLayoutTag_UseChannelDescriptions in cubeb_audiounit.cpp[0] currently. We need to kAudioChannelLayoutTag_UseChannelBitmap and kAudioFormatProperty_ChannelLayoutForTag also.

[0] http://searchfox.org/mozilla-central/rev/0079c7adf3b329bff579d3bbe6ac7ba2f6218a19/media/libcubeb/src/cubeb_audiounit.cpp#1131
[1] http://searchfox.org/mozilla-central/rev/0079c7adf3b329bff579d3bbe6ac7ba2f6218a19/dom/media/platforms/apple/AppleATDecoder.cpp#481
(Assignee)

Comment 1

a year ago
Need to figure out what cases we will get mChannelLayoutTag = kAudioChannelLayoutTag_UseChannelBitmap or kAudioFormatProperty_ChannelLayoutForTag. Maybe we need a device. The reference is [1] above.
Assignee: nobody → cchang

Updated

a year ago
Rank: 25
Priority: -- → P2
(Assignee)

Updated

a year ago
Blocks: 1073786
(Assignee)

Comment 2

a year ago
Created attachment 8855675 [details] [review]
pull on github
(Assignee)

Comment 3

a year ago
Hi jya,
Do you know when |AudioChannelLayout->mChannelLayoutTag != kAudioChannelLayoutTag_UseChannelDescriptions|[0] is true?
I mean, how to let the tag to be kAudioChannelLayoutTag_UseChannelBitmap or other values? 

[0] https://github.com/kinetiknz/cubeb/pull/276/commits/956ffbedd6d03b942c177f32015fd19e46a39074#diff-148fe3e6ebf13351ba4d886b1b4898d2R1139
Flags: needinfo?(jyavenard)
I don't know this structure, nor its member.

gecko will always call cubeb with SMPTE channel layout.
Flags: needinfo?(jyavenard)
Should have read the code first I guess and that it's about AudioUnit.

I haven't played with AudioUnit in years unfortunately, and my memory on the matter is rather fuzzy.

It all depends on what audio card you will be using and if the user has defined a custom channel layout using the Audio MIDI Setup utility...

You may want to ask your question in Apple's CoreAudio mailing list.
(Assignee)

Comment 6

a year ago
(In reply to Jean-Yves Avenard [:jya] from comment #5)
> Should have read the code first I guess and that it's about AudioUnit.
> 
> I haven't played with AudioUnit in years unfortunately, and my memory on the
> matter is rather fuzzy.
> 
> It all depends on what audio card you will be using and if the user has
> defined a custom channel layout using the Audio MIDI Setup utility...
> 
> You may want to ask your question in Apple's CoreAudio mailing list.

OK, thanks for your reply.

If I find the answer, I'll also test similar code[0] using AudioChannelLayoutTag in gecko.
[0] http://searchfox.org/mozilla-central/rev/0079c7adf3b329bff579d3bbe6ac7ba2f6218a19/dom/media/platforms/apple/AppleATDecoder.cpp#481
(In reply to Chun-Min Chang[:chunmin] from comment #6)
> (In reply to Jean-Yves Avenard [:jya] from comment #5)
> > Should have read the code first I guess and that it's about AudioUnit.
> > 
> > I haven't played with AudioUnit in years unfortunately, and my memory on the
> > matter is rather fuzzy.
> > 
> > It all depends on what audio card you will be using and if the user has
> > defined a custom channel layout using the Audio MIDI Setup utility...
> > 
> > You may want to ask your question in Apple's CoreAudio mailing list.
> 
> OK, thanks for your reply.
> 
> If I find the answer, I'll also test similar code[0] using
> AudioChannelLayoutTag in gecko.
> [0]
> http://searchfox.org/mozilla-central/rev/
> 0079c7adf3b329bff579d3bbe6ac7ba2f6218a19/dom/media/platforms/apple/
> AppleATDecoder.cpp#481

That's a different thing altogether. Same constant name, but different use.
It's for the decoder, and is already properly handled. This is to define when the codec explicitly defines a channel layout, this is used to convert to SMPTE.

AAC can defined either a number of channels, or an explicit channel layout. AFAIK, only the Apple AAC decoder supports it.
(Assignee)

Comment 8

a year ago
(In reply to Jean-Yves Avenard [:jya] from comment #7)
> That's a different thing altogether. Same constant name, but different use.
> It's for the decoder, and is already properly handled. This is to define
> when the codec explicitly defines a channel layout, this is used to convert
> to SMPTE.
> 
> AAC can defined either a number of channels, or an explicit channel layout.
> AFAIK, only the Apple AAC decoder supports it.

Oh, I see. They should be totally unrelated. One gets the layout from decoder, and the other gets from underlying audio interface directly. Thanks!
Mass change P2->P3 to align with new Mozilla triage process.
Priority: P2 → P3
You need to log in before you can comment on or make changes to this bug.