Opened 14 years ago

Closed 14 years ago

#79 closed defect (fixed)

Sound does not work in LIBPATHSTRICT=T mode

Reported by: dmik Owned by:
Priority: major Milestone: RC2
Component: general Version: 1.6.0-b19 RC
Severity: low Keywords:
Cc:

Description

I found that sound doesn't work when LIBPATHSTRICT=T is set in the environment. For some reason, it cannot open the audio stream:

javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 11025.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian not supported.
        at com.sun.media.sound.DirectAudioDevice$DirectDL.implOpen(DirectAudioDevice.java:539)
        at com.sun.media.sound.DirectAudioDevice$DirectClip.implOpen(DirectAudioDevice.java:1338)
        at com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:124)
        at com.sun.media.sound.DirectAudioDevice$DirectClip.open(DirectAudioDevice.java:1118)
        at com.sun.media.sound.DirectAudioDevice$DirectClip.open(DirectAudioDevice.java:1208)
        at Juke.loadSound(Juke.java:257)
        at Juke.run(Juke.java:409)
        at java.lang.Thread.run(Thread.java:636)

Change History (1)

comment:1 by dmik, 14 years ago

Resolution: fixed
Status: newclosed

It turned out that if LIBPATHSTRICT=T is set and some DLL was already loaded by DosLoadModule() using its base name with no extension (i.e. "MDM" in this case) then the following attempt to load the same DLL using the name with the extension (i.e. "MDM.DLL") fails with error 2 (ERROR_FILE_NOT_FOUND) and the buffer for the failed module contains "MDM".

This looks like a total OS/2 loader bug to me. And it would actually be very useful to remember such a weird behavior and always load DLLs using the base name only (except the cases where a full file name is used).

The issue is fixed in Odin in r 21578. Sound now works.

Note: See TracTickets for help on using tickets.