[Dev] A problem with sound assets and deserialization

Brian Fisher brian at hamsterrepublic.com
Fri May 2 13:28:01 PDT 2008


When you mentioned about making a dummy sound, it seemed like a bit of an
awkward way to handle things, but given that I have never in my life found a
computer without a sound card/output device (just a bunch without speakers)
I wasn't able to test or have an educated opinion on that front.

It seems to me that a soundasset should probably always be a soundasset, but
probably have a do-nothing behavior if it doesn't have any internals (i.e.
it couldn't make a pygame sound).

The reason that seems better to me is because if we start adding new
functionality to soundasset, it would be likely to be out of sync with the
faked functionality of dummysoundasset or whatever (i.e. we wouldn't be
adding the same interface functions to both because it is so rare to use a
dummy sound). While if a soundasset just needs to deal with having no
internal buffer to play or something like that, then looking at soundasset
code it would generally be obvious you need to deal with it, so it would be
easier to remember and figure out (in my mind at least)


On Fri, May 2, 2008 at 12:23 PM, James Paige <Bob at hamsterrepublic.com>
wrote:

> Hmmm... you know, in spite of all my little fixes to get Customer
> Service ROBOT! to run on systems with no sound card available, it is
> *still* failing :(
>
> A closer look at the backtrace from the py2exe version suggests that I
> am actually crashing as a pickled SoundAsset is deserialized. My
> previous fixes caused a dummy pygame sound to be created when a
> SoundAsset was initialized, but unless I am going crazy, it seems that
> if you are on a machine with no sound and you deserialize a sound that
> was serialized on a machine where sound was working, you get a crash :(
>
> Also, may I note that I am alarmed at how often I am running into this.
> I shouldn't be running into this many different diverse computers with
> totally broken sound support :(
>
> On Windows it is generally a case of "Last Time I had to Reinstall
> Windows Because of a Virus Or Something I Couldn't Find the Recovery CD
> That Came With My Computer So My Sound Doens't Work Anymore"
>
> On Linux it is generally a case of "To Preserve The Internal Purity Of
> Linuxness All Software Must Convert To Using PulseAudio, What Is That
> You Say? Make PulseAudio Backwards Compatable With OSS ALSA ESD And All
> The Other APIs That People Actually User For Everything? Sure! Use
> These Confusing And Unreliable Command-Line Tools! What? You Want It To
> be Transparently Backwards Compatable? No! If Software That Doesn't Use
> PulseAudio Directly Isn't Painfully Awkward To Use Then What Incentive
> Will The Developers Have To Upgrade Their Packages To Use PulseAudio
> Natively? You Non-Absolutist Non-Purist Heretic!"
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/dev-motherhamster.org/attachments/20080502/2dd7445a/attachment-0001.htm>


More information about the Dev mailing list