Can I play a .MP3 with Squeak?

David T. Lewis lewis at mail.msen.com
Sat Nov 23 14:48:26 UTC 2002


On Fri, Nov 22, 2002 at 02:45:32PM -0800, Tim Rowledge wrote:
> >
> > John M McIntosh wrote:
> >>
> >> Of course thinking further on this it seems we really need a call to
> >> check for the existence of a plugin, or at
> >> the point we fail to load the plugin mm I wonder if in <primitive:
> >> 'primitiveMPEG3EndOfAudio' module:'Mpeg3Plugin'>
> >> one could recompile them all and do a sanity check and invoke better
> >> feedback if the module or api name does not exist.
> >> Tossing an exception comes to mind versus the rather meager
> >> primtiveFail logic we have now
> 
> You can get pretty close to this right now in two ways:-
> a) in a plugin you can implement an explicit 'am I installed ok' prims 
> - several seem to do this already.
> b) in plugin-prim call failure code youcould check the result of 
> 'Smalltalk listLoadedModules' for the name of the plugin. If it's not 
> there, it didn't load.

Also, in the case of a plugin which may change over time, it is helpful
to have #primitiveVersionString so you can handle the differences in
the image. Then:

Foo>>doStuffWithCoolMpegFeature
  self hasCoolNewMpegFeature
    ifTrue: ["do cool stuff"]
    ifFalse: ["apologize and suggest upgrading the plugin"]

For example, see OSProcessPlugin>>primitiveVersionString and senders.

Dave




More information about the Squeak-dev mailing list