提交 3ba6765d 编写于 作者: A amenkov

6832063: OpenJDK fails to open the default ALSA device when PulseAudio is enabled

Reviewed-by: amenkov
Contributed-by: omajid@redhat.com
上级 5dd123c5
...@@ -143,8 +143,12 @@ void DAUDIO_GetFormats(INT32 mixerIndex, INT32 deviceID, int isSource, void* cre ...@@ -143,8 +143,12 @@ void DAUDIO_GetFormats(INT32 mixerIndex, INT32 deviceID, int isSource, void* cre
ERROR1("snd_pcm_hw_params_malloc returned error %d\n", ret); ERROR1("snd_pcm_hw_params_malloc returned error %d\n", ret);
} else { } else {
ret = snd_pcm_hw_params_any(handle, hwParams); ret = snd_pcm_hw_params_any(handle, hwParams);
if (ret != 0) { /* snd_pcm_hw_params_any can return a positive value on success too */
ERROR1("snd_pcm_hw_params_any returned error %d\n", ret); if (ret < 0) {
ERROR1("snd_pcm_hw_params_any returned error %d\n", ret);
} else {
/* for the logic following this code, set ret to 0 to indicate success */
ret = 0;
} }
} }
snd_pcm_hw_params_get_format_mask(hwParams, formatMask); snd_pcm_hw_params_get_format_mask(hwParams, formatMask);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册