mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
Fix nsSound to work on Linux again. Needed for IM prefs work. r=pavlov, a=amusil
This commit is contained in:
parent
b532b6e622
commit
17a35ffc25
@ -117,6 +117,9 @@ nsresult nsSound::Init()
|
|||||||
|
|
||||||
EsdOpenSoundType EsdOpenSound;
|
EsdOpenSoundType EsdOpenSound;
|
||||||
|
|
||||||
|
if ( elib && alib )
|
||||||
|
return NS_OK;
|
||||||
|
|
||||||
elib = PR_LoadLibrary("libesd.so");
|
elib = PR_LoadLibrary("libesd.so");
|
||||||
|
|
||||||
if (!elib)
|
if (!elib)
|
||||||
@ -192,6 +195,7 @@ NS_METHOD nsSound::Play(nsIURI *aURI)
|
|||||||
|
|
||||||
nsCOMPtr<nsIFileLocator> fl;
|
nsCOMPtr<nsIFileLocator> fl;
|
||||||
|
|
||||||
|
Init();
|
||||||
if ( !mInited && NS_FAILED((rv=AllocateBuffers())) )
|
if ( !mInited && NS_FAILED((rv=AllocateBuffers())) )
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
@ -282,7 +286,7 @@ NS_METHOD nsSound::Play(nsIURI *aURI)
|
|||||||
else
|
else
|
||||||
mask |= ESD_STEREO;
|
mask |= ESD_STEREO;
|
||||||
|
|
||||||
fd = (*EsdPlayStreamFallback)(mask, (int) rate, "localhost", "mozillansSound");
|
fd = (*EsdPlayStreamFallback)(mask, (int) rate, NULL, "mozillansSound");
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user