[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Compiling music into a game?
- To: "Pygame Users Mailing List" <pygame-users@xxxxxxxx>
- Subject: Re: [pygame] Compiling music into a game?
- From: "David Mikesell" <dave_mikesell@xxxxxxxxxxx>
- Date: Fri, 13 Jan 2006 19:26:11 -0500
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Fri, 13 Jan 2006 19:26:14 -0500
- In-reply-to: <1107878788.23523.1.camel@localhost>
- References: <3487.64.7.152.217.1107873300.squirrel@64.7.152.217> <1107878788.23523.1.camel@localhost>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
OK, I *finally* got around to trying this and am having problems on
Windows XP. I open my sound file, write it to a temporary file created
with tempfile.NamedTemporaryFile() and that all seems to work.
However, when I try to create a pygame.mixer.Sound with the temp file, I
get a NameError. I printed the tempfile name and printed debug
statements after I wrote to it so I'm assuming it got created and
written to successfully.
Any ideas?
On Tue, 08 Feb 2005 10:06:28 -0600, "Joe Wreschnig"
<piman@xxxxxxxxxxxxxx> said:
> On Tue, 2005-02-08 at 09:35 -0500, shandy@xxxxxxxxx wrote:
> > I assume that the content providers are concerned with you distributing
> > them as .ogg files that can just be simply copied by the end user.
> >
> > The easiest way to distribute them then would be all together in a zip
> > file and DON'T unzip them on the end user's machine, just use the python
> > zipfile module.
>
> Pygame can't do that; mixer.music can only load from disk, not a
> file-like. You'd have to extract the file, play it, and remove it when
> you're done.
> --
> Joe Wreschnig <piman@xxxxxxxxxxxxxx>