[cocomud] Re: Playing a sound, change of strategy

  • From: cocomud@xxxxxxxxxxxxx
  • To: cocomud@xxxxxxxxxxxxx
  • Date: Wed, 10 Oct 2018 08:57:44 +0200

I would like to keep OGG too.  But I can't find a decent library that does it.  Except for Pygame and Pyglet which are both quite heavy for the task.  I'm toying with playsound right now (which is a very lightweight library).  It allows playing WAV and MP3 but doesn't allow much configuration, so I'm uncertain about what to do.  I'll keep on looking another solution I guess!  But dropping pygame sounds like a must-do.

On 10/10/2018 8:45 AM, cocomud@xxxxxxxxxxxxx wrote:

It is true what Devin said. But for me it would be totaly OK to use MP3 or wav.


Am 10.10.2018 um 08:32 schrieb cocomud@xxxxxxxxxxxxx:
I know that many soundpacks use ogg to keep the file size down, for sounds, and they use some MP3 for music.

Devin Prater
Assistive Technology Instructor certified by World Services for the Blind
JAWS certified

On Oct 10, 2018, at 1:26 AM, cocomud@xxxxxxxxxxxxx wrote:

Hi everyone,


As I mentioned in the previous email, I am taking this opportunity to optimize CocoMUD.  One thing that slowed it down (particularly on first run) was the use of the pygame library. For those who don't know, pygame allows to create games in Python using a very simple interface.  However, CocoMUD only used it for playing sounds in triggers, and Pygame is not a light library.  So I've decided to drop pygame and find an alternative way to play sounds.


I have found one, and it wasn't easy.  However, this new strategy doesn't come without drawbacks: although it might work on Windows and other platforms, and is able to read more formats, the results might be a bit random.  One of the major drawbacks: although the documentation states that more formats might be available, on Windows, it seems to read only WAV and MP3 files.  Not OGG.  OGG is good, since it's lighter and open, so I can publish it without problem in my demo worlds. It was supported by pygame (pygame didn't support MP3).  So the main question is: would it be extremely problematic if CocoMUD stopped processing OGG files, instead being able to read WAV and MP3 files?  How many of you use OGG files for the time being?  There are ways to convert, sure, but it might be an additional inconvenience.


Good day to all,


Vincent





Other related posts: