Missing parameter in Sound>>play:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Missing parameter in Sound>>play:

Udo Schneider
Andy, Blair,

there seems to be a "bug" in Sound>>play:.

When playing a wave file hmod/location should be NULL. However if
playing a wave from a resource DLL it should be the handle of the
resource library. But hmod is set to location (ExternalResourceLibrary)
and not to it's handle.

So the correct method should be:
Sound>>play: flags
     "Private - Play the receiver with the specified flags.
     Answer whether it succeeded."

     | soundName |
     soundName := fileLocator notNil
                 ifTrue: [fileLocator localFileSpecFor: name]
                 ifFalse: [name].
     ^WinMMLibrary default
         playSound: soundName
         hmod: location asParameter
         fdwSound: flags


BTW: This is the same in DST5.

CU,

Udo

PS: I also filed this in your Ticket system.


Reply | Threaded
Open this post in threaded view
|

Re: Missing parameter in Sound>>play:

Blair McGlashan
"Udo Schneider" <[hidden email]> wrote in message
news:[hidden email]...
> Andy, Blair,
>
> there seems to be a "bug" in Sound>>play:.
>
> When playing a wave file hmod/location should be NULL. However if playing
> a wave from a resource DLL it should be the handle of the resource
> library. But hmod is set to location (ExternalResourceLibrary) and not to
> it's handle.
>

Yes, it looks like a bug. Please go ahead and file a bug report.

Thanks

Blair