[Pkg-games-ubuntu] [Bug 1470270] [NEW] No sound (but with music)

Luis perdigao at virginmedia.com
Tue Jun 30 23:11:30 UTC 2015


Public bug reported:

Game runs without sound in Lubuntu (Ubuntu 15.04). In fact, running the
game from console reports error in loading audio files.

I downloaded source and attempted to debug. After carefull analysis I
surprised to find that the error comes from a 'for' loop located in file
"src/audio.cc", function

void audio :: cargar_sonidos(void)

(which means "loading sounds")

... at line 144, where it reads

        for (i=0; i<12; i++)

For some reason the loop runs over i=11 when it shouldn't up to 12,
leading to error later and so program does not use the sounds. Nowhere
in the rest of the code the value of i is changed. The problem seems to
be with the for loop itself and the way it is compiled. This suggests an
error (potentially serious) with the g++ compiler.

I quick way to resolve this problem is to change line 144 to

for (i=0; i<12.0; i++)

... and after compilation, the sound now works.

I used Codeblocks to help compiling and testing.

** Affects: ceferino (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of
Debian/Ubuntu Games Team, which is subscribed to ceferino in Ubuntu.
https://bugs.launchpad.net/bugs/1470270

Title:
  No sound (but with music)

Status in ceferino package in Ubuntu:
  New

Bug description:
  Game runs without sound in Lubuntu (Ubuntu 15.04). In fact, running
  the game from console reports error in loading audio files.

  I downloaded source and attempted to debug. After carefull analysis I
  surprised to find that the error comes from a 'for' loop located in
  file "src/audio.cc", function

  void audio :: cargar_sonidos(void)

  (which means "loading sounds")

  ... at line 144, where it reads

          for (i=0; i<12; i++)

  For some reason the loop runs over i=11 when it shouldn't up to 12,
  leading to error later and so program does not use the sounds. Nowhere
  in the rest of the code the value of i is changed. The problem seems
  to be with the for loop itself and the way it is compiled. This
  suggests an error (potentially serious) with the g++ compiler.

  I quick way to resolve this problem is to change line 144 to

  for (i=0; i<12.0; i++)

  ... and after compilation, the sound now works.

  I used Codeblocks to help compiling and testing.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ceferino/+bug/1470270/+subscriptions



More information about the Pkg-games-ubuntu mailing list