Package: singularity
Version: 0.26a+r409-2
Severity: normal
Tags: patch

Even after installing the singularity-music package, the game doesn't play
any music. It turns out that there's a simple bug in the code that searches
for music files, preventing the game from ever locating them. There's a block
of code that iterates over the files and adds them to the list, but it's
indented too far and only gets run if the directory it's looking in didn't
already exist. Patch is attached.

With this patch in place, music plays. Although, it's awfully scratchy, as if
the music player code isn't getting enough cycles. The music files sound fine
when I play them with xmms.

cheers,
 -Brian


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.21.1 (PREEMPT)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages singularity depends on:
ii  python               2.4.4-6             An interactive high-level object-o
ii  python-pygame        1.7.1release-4.1+b1 SDL bindings for games development
hi  python-support       0.6.4               automated rebuilding support for p
ii  ttf-bitstream-vera   1.10-7              The Bitstream Vera family of free 

Versions of packages singularity recommends:
ii  singularity-music             001-2      Music for Endgame: Singularity gam

-- no debconf information
--- singularity-0.26a+r409/code/g.py.orig       2007-09-16 11:32:01.000000000 
-0700
+++ singularity-0.26a+r409/code/g.py    2007-09-16 11:32:21.000000000 -0700
@@ -156,15 +156,15 @@
                 # We don't have permission to write here.  Don't bother
                 # trying to load music.
                 music_available_here = False
-            
-            if music_available_here:
 
-                # Loop through the files in music_path and add the ones
-                # that are .mp3s and .oggs.
-                for file_name in listdir(music_path):
-                    if (len(file_name) > 5 and
-                     (file_name[-3:] == "ogg" or file_name[-3:] == "mp3")):
-                        music_array.append(path.join(music_path, file_name))
+        if music_available_here:
+
+            # Loop through the files in music_path and add the ones
+            # that are .mp3s and .oggs.
+            for file_name in listdir(music_path):
+                if (len(file_name) > 5 and
+                 (file_name[-3:] == "ogg" or file_name[-3:] == "mp3")):
+                    music_array.append(path.join(music_path, file_name))
 
     music_arraylen = len(music_array)
 

Reply via email to