Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AE/osxsink] - don't set the altered outputformat which might have wrong channel count #4899

Merged
merged 1 commit into from
Jun 12, 2014

Conversation

Memphiz
Copy link
Member

@Memphiz Memphiz commented Jun 12, 2014

For planar devices we adapt the outputFormat from 1 channel to
std::min((size_t)format.m_channelLayout.Count(), streams.size());

here

https://github.com/xbmc/xbmc/blob/master/xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp#L748

When setting the physical format afterwards here

https://github.com/xbmc/xbmc/blob/master/xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp#L777

We get the error:

ERROR: CCoreAudioStream::SetPhysicalFormat: Unable to set physical format for stream 0x0061. Error = '!dat'

This PR ensures to set the unaltered format which was found during stream scoring and instead handling the number of output channels in a seperate variable.

@Memphiz
Copy link
Member Author

Memphiz commented Jun 12, 2014

Testbuild running here (as its only osx code which was altered):

http://jenkins.xbmc.org/job/XBMC-OSX-64/1213/

@MartijnKaijser MartijnKaijser added this to the Pending for inclusion milestone Jun 12, 2014
@Memphiz
Copy link
Member Author

Memphiz commented Jun 12, 2014

After fixing my typo it even built http://jenkins.xbmc.org/job/XBMC-OSX-64/1215/ :)

@Memphiz Memphiz added the Fix label Jun 12, 2014
@@ -779,8 +781,11 @@ bool CAESinkDARWINOSX::Initialize(AEAudioFormat &format, std::string &device)
CLog::Log(LOGDEBUG, "%s: New Virtual Format: %s", __FUNCTION__, StreamDescriptionToString(virtualFormat, formatString));
CLog::Log(LOGDEBUG, "%s: New Physical Format: %s", __FUNCTION__, StreamDescriptionToString(outputFormat, formatString));

if (m_planes > 1)
CLog::Log(LOGDEBUG, "%s: Planar output will have %d channels", __FUNCTION__, (unsigned int)numOutputChannels);

This comment was marked as spam.

This comment was marked as spam.

@Memphiz
Copy link
Member Author

Memphiz commented Jun 12, 2014

Updated with combined logs (which is definitly better :) )

jmarshallnz added a commit that referenced this pull request Jun 12, 2014
[AE/osxsink] - don't set the altered outputformat which might have wrong channel count
@jmarshallnz jmarshallnz merged commit 999accd into xbmc:master Jun 12, 2014
jmarshallnz added a commit to jmarshallnz/xbmc that referenced this pull request Jun 15, 2014
[AE/osxsink] - don't set the altered outputformat which might have wrong channel count
Conflicts:
	xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp
@Memphiz Memphiz deleted the osxsinkphysicalformat branch May 22, 2016 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Fix non-breaking change which fixes an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants