GNOME Bugzilla – Bug 678170
osxaudiosink: respect the prefered channel layout
Last modified: 2012-06-19 12:05:21 UTC
Created attachment 216520 [details] [review] patch that implements the behaviour In OSX is possible to configure the prefered channel layout using the "Audio MIDI Setup" tool. The attached patch ensures that exposed caps match with user preferences.
Review of attachment 216520 [details] [review]: + case kAudioChannelLabel_LeftSurround: + pos[i] = GST_AUDIO_CHANNEL_POSITION_REAR_LEFT; + break; + case kAudioChannelLabel_RightSurround: + pos[i] = GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT; + break; + case kAudioChannelLabel_RearSurroundLeft: + pos[i] = GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT; + break; + case kAudioChannelLabel_RearSurroundRight: + pos[i] = GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT; + break; + case kAudioChannelLabel_CenterSurround: + pos[i] = GST_AUDIO_CHANNEL_POSITION_REAR_CENTER; + break; Are you sure this is correct? I would expect: L/R Surround => L/R Side L/R Rear Surround => L/R Rear But for Center Surround => Rear I have no suggestion either ;) + gst_caps_append_structure (caps, s); + if (max_channels > 2 && use_positions) { + s = gst_structure_copy (s); s not valid after append_structure()! + gst_structure_set (s, "channels", G_TYPE_INT, max_channels, NULL); Really? Shouldn't it allow any permutation and subset of the allowed channels? You should for 0.10 check when configuring the ringbuffer to caps that these caps are actually supported now for the device. Because of the caps setting "bug" in 0.10, where core only checks against the template caps.
Created attachment 216728 [details] [review] patch that respect the user channel configuration New patch with requested fixes
commit c6cd91755487fc2af67d71dccef457af01a33d0b Author: Josep Torra <n770galaxy@gmail.com> Date: Tue Jun 19 12:15:33 2012 +0200 osxaudiosink: respect the prefered channel layout In OSX is allowed to configure the default audio output device, prefered channel layout and speaker positions through the tool "Audio MIDI Setup".