Bug 88901 - CoreAudio routines return OSStatus, not UInt32
Summary: CoreAudio routines return OSStatus, not UInt32
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: modules (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Mac OS X (All)
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-01 18:13 UTC by René J.V. Bertin
Modified: 2015-04-01 07:45 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
patch that corrects the err type issue (2.07 KB, text/plain)
2015-02-01 18:13 UTC, René J.V. Bertin
Details

Description René J.V. Bertin 2015-02-01 18:13:24 UTC
Created attachment 113023 [details]
patch that corrects the err type issue

CoreAudio routines that return an error status do so with the OSStatus type, which is not a UInt32: typical OS X errors are negative numbers.

Errors like I have been seeing :

W: [iMic USB audio system] module-coreaudio-device.c: Failed to get device latency: 560947818
W: [iMic USB audio system] module-coreaudio-device.c: Failed to get buffer frame size: 560947818
W: [iMic USB audio system] module-coreaudio-device.c: Failed to get safety offset: 560947818
W: [iMic USB audio system] module-coreaudio-device.c: Failed to get streams: 560947818


are thus not informative about the true error that occurred.

The above errors occurred when I tried to change the device a playing application was streaming to, using pavucontrol; this action did not work.
After rebuilding pulseaudio with the attached path, the feature now seems to function and I can change the used device at will. (I cannot yet confirm though that it works 100% of the time.)
Comment 1 David Henningsson 2015-04-01 07:45:59 UTC
Hi and thanks for the patch!

I don't run MacOSX so I haven't been able to test your patch, but it looks correct, so I've pushed it to git master now.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.