[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Heroes] [ heroes-Bugs-834693 ] [0.29c] Music sometimes plays even when
From: |
SourceForge.net |
Subject: |
[Heroes] [ heroes-Bugs-834693 ] [0.29c] Music sometimes plays even when disabled |
Date: |
Fri, 14 Nov 2003 04:31:41 -0800 |
Bugs item #834693, was opened at 2003-11-02 20:21
Message generated for change (Comment added) made by agt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107982&aid=834693&group_id=7982
Category: level maps, sounds, graphics
Group: reproducible
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Jerome Zago (agt)
Assigned to: Nobody/Anonymous (nobody)
Summary: [0.29c] Music sometimes plays even when disabled
Initial Comment:
Configure information :
#######
$ ./configure
[...]
Heroes configuration
--------------------
Heroes version : 0.29c
host : i686-pc-linux-gnu
binary install path : /usr/local/bin
data install path : /usr/local/share/heroes
plug-ins install path : /usr/local/lib/heroes
manual page install path : /usr/local/man
info manual install path : /usr/local/info
html doc install path : <none>
compiler : gcc
general options
CFLAGS : -DNDEBUG -g -O3
-ffast-math -fstrict-aliasing -fomit-frame-pointer
LIBS :
display, keyboard, mouse : SDL 1.2.5
joystick : SDL 1.2.5
sound : SDL_mixer
main : SDL_main
#######
Environment :
- Mandrake Linux 9.1 with updates
- IA32 / Athlon XP
- gcc (GCC) 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)
- heroes-data-1.5, heroes-hq-sound-tracks-1.0,
heroes-sound-effects-1.0 and
heroes-sound-tracks-1.0 configured/installed
- no ~/.heroes/
Reproducing the problem :
#######
$
HEROES_DEBUG=SECTION:SYSTEM:SOUND_TRACK
heroes -F -J -2 -i
[I go into "Options" / "Son" (Sound) then disable
"Musique" (Music). I go back then select "QuĂȘte"
(Quest). The level loads and... the music starts :(.
Meanwhile :]
heroes: initialization
heroes: Current persona: EUID=501 EGID=501
heroes: switching to the user persona
heroes: Current persona: EUID=501 EGID=501
heroes: looking for HEROES_DATA_DIR or
HEROES_DATADIR...
heroes: ... not found.
heroes: looking for HEROES_PLUG_IN_DIR or
HEROES_PLUGIN_DIR or HEROES_PLUGINDIR ...
heroes: ... not found.
heroes: looking for HEROES_LOCALE_DIR or
HEROES_LOCALEDIR...
heroes: ... not found.
heroes: looking for HEROES_HOME_DIR,
HEROES_HOMEDIR or HOME...
heroes: ... found: /home/agt
heroes: looking for HEROES_PREFIX ...
heroes: ... not found.
heroes: directory /usr/local/share/heroes/levels found
heroes: reading configuration file:
/usr/local/share/heroes/etc/heroesrc ...
heroes: reading sound config file:
/usr/local/share/heroes/mod/sound.conf ...
heroes: ... done.
heroes: reading sound config file:
/usr/local/share/heroes/hqmod/sound.conf ...
heroes: ... done.
heroes: ... finished reading
/usr/local/share/heroes/etc/heroesrc.
heroes: user directory setup
heroes: Directory `/home/agt/.heroes' created.
heroes: opening /home/agt/.heroes/scores
heroes: switching to the user persona
heroes: Current persona: EUID=501 EGID=501
heroes: opening /home/agt/.heroes/savedgames
heroes: switching to the user persona
heroes: Current persona: EUID=501 EGID=501
heroes: switching to the user's USER persona
definitively
heroes: switching to the user's GROUP persona
definitively
heroes: Current persona: EUID=501 EGID=501
heroes: setup default extra directory
heroes: reading configuration file:
/home/agt/.heroes/heroesrc ...
heroes: ... could not open.
heroes: fopen: No such file or directory
heroes: parsing command line
heroes: randomize
heroes: reading level list from
/usr/local/share/heroes/levels/
heroes: scandir: No such file or directory
heroes: fopen: No such file or directory
heroes: switching to the system persona
heroes: Current persona: EUID=501 EGID=501
heroes: initialize SDL
heroes: opening audio at 44100 Hz 16 bit stereo,
2048 bytes audio buffer
heroes: opened audio at 44100 Hz 16 bit stereo,
2048 bytes audio buffer
heroes: set volume to 68/128
heroes: switching to the user persona
heroes: Current persona: EUID=501 EGID=501
heroes: switching to the system persona
heroes: Current persona: EUID=501 EGID=501
heroes: switching to the user persona
heroes: Current persona: EUID=501 EGID=501
heroes: -- game introduction --
heroes: loading sound track from alias INTRO
heroes: loading sound-track:
/usr/local/share/heroes/mod/intro.xm
heroes: start playing sound track
heroes: halt sound track playing
heroes: unload sound track
heroes: -- menu --
heroes: load random wrapped level
heroes: load level #45
heroes: Initialize rendering data
heroes: loading sound track from alias MENU
heroes: loading sound-track:
/usr/local/share/heroes/mod/menu.xm
heroes: start playing sound track
heroes: set volume to 68/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: Uninitialize rendering data
heroes: halt sound track playing
heroes: unload sound track
heroes: -- play game --
heroes: load level #0
heroes: Initialize rendering data
heroes: loading sound track from alias HEROES01
heroes: loading sound-track:
/usr/local/share/heroes/mod/heroes01.xm
heroes: start playing sound track
heroes: introduce game
heroes: game main loop
heroes: quit y/n menu
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: exit quit menu
heroes: game finished
heroes: Uninitialize rendering data
heroes: halt sound track playing
heroes: unload sound track
heroes: -- (back to) menu (from game) --
heroes: load random wrapped level
heroes: load level #21
heroes: Initialize rendering data
heroes: loading sound track from alias MENU
heroes: loading sound-track:
/usr/local/share/heroes/mod/menu.xm
heroes: start playing sound track
heroes: locking /home/agt/.heroes/scores
heroes: unlocking /home/agt/.heroes/scores
heroes: Uninitialize rendering data
heroes: halt sound track playing
heroes: unload sound track
heroes: closed audio
heroes: free userdir
$ cat .heroes/preferences | grep music_enable
heroes.sound.music_enable: 0
#######
I had the same problem with version 0.21. More
information and extra testing gladly provided if
requested. Thanks for your time !
----------------------------------------------------------------------
>Comment By: Jerome Zago (agt)
Date: 2003-11-14 12:31
Message:
Logged In: YES
user_id=25537
It was actually a SDL_mixer bug, now fixed in CVS. For more
details:
http://www.libsdl.org/pipermail/sdl/2003-November/057753.html
http://www.libsdl.org/pipermail/sdl/2003-November/057754.html
----------------------------------------------------------------------
Comment By: Jerome Zago (agt)
Date: 2003-11-09 12:54
Message:
Logged In: YES
user_id=25537
This might actually be a SDL_mixer bug. For more details:
http://www.libsdl.org/pipermail/sdl/2003-November/057679.html
http://www.libsdl.org/pipermail/sdl/2003-November/057749.html
----------------------------------------------------------------------
Comment By: Jerome Zago (agt)
Date: 2003-11-02 21:26
Message:
Logged In: YES
user_id=25537
And before you ask, I've also compiled SDL_mixer 1.2.5
(latest release) from scratch then linked heroes to it : same
problem !
----------------------------------------------------------------------
Comment By: Jerome Zago (agt)
Date: 2003-11-02 21:13
Message:
Logged In: YES
user_id=25537
Some extra debugging. It appears that opt.music is set
correctly in sound_menu() [menus.c] :
#######
$ rm -rf ~/.heroes/
$ diff -u menus.c{.orig,}
--- menus.c.orig 2003-11-02 21:27:04.000000000
+0100
+++ menus.c 2003-11-02 21:38:28.000000000 +0100
@@ -1152,6 +1152,8 @@
t = 0;
} while (t != HK_Enter || l != 4);
event_sfx (8);
+
+ dmsg(D_SOUND_TRACK, "[AGT] music: %d",
opt.music);
}
static void
#######
$ HEROES_DEBUG=SOUND_TRACK heroes -F -J -2 -i
[I go into "Options" / "Son" (Sound) then disable
"Musique" (Music). Then I enable it. Then I disable it]
heroes: Directory `/home/agt/.heroes' created.
heroes: fopen: No such file or directory
heroes: scandir: No such file or directory
heroes: fopen: No such file or directory
heroes: initialize SDL
heroes: opening audio at 44100 Hz 16 bit stereo, 2048
bytes audio buffer
heroes: opened audio at 44100 Hz 16 bit stereo, 2048
bytes audio buffer
heroes: set volume to 68/128
heroes: loading sound track from alias INTRO
heroes: loading sound-track:
/usr/local/share/heroes/mod/intro.xm
heroes: start playing sound track
heroes: halt sound track playing
heroes: unload sound track
heroes: loading sound track from alias MENU
heroes: loading sound-track:
/usr/local/share/heroes/mod/menu.xm
heroes: start playing sound track
heroes: set volume to 68/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: [AGT] music: 0
heroes: set volume to 68/128
heroes: set volume to 68/128
heroes: set volume to 68/128
heroes: set volume to 68/128
heroes: set volume to 68/128
heroes: set volume to 68/128
heroes: [AGT] music: 1
heroes: set volume to 68/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: [AGT] music: 0
heroes: halt sound track playing
heroes: unload sound track
heroes: closed audio
#######
Now let's check the volume by Mix_VolumeMusic(-1) when
the level/track is loaded :
#######
$ rm -rf ~/.heroes/
$ diff -u media/sdl_mixer/strack.c{.orig,}
--- media/sdl_mixer/strack.c.orig 2003-11-02
21:54:08.000000000 +0100
+++ media/sdl_mixer/strack.c 2003-11-02
21:56:09.000000000 +0100
@@ -162,6 +162,7 @@
dmsg (D_SOUND_TRACK, "start playing sound
track");
Mix_PlayMusic (module, -1);
sound_track_playing = 1;
+ dmsg (D_SOUND_TRACK, "[AGT] volume is %d",
Mix_VolumeMusic(-1));
}
}
#######
$ HEROES_DEBUG=SECTION:SOUND_TRACK heroes -F
-J -2 -i
[I go into "Options" / "Son" (Sound) then disable
"Musique" (Music). I go back then select "QuĂȘte"
(Quest)]
heroes: initialization
heroes: reading configuration file:
/usr/local/share/heroes/etc/heroesrc ...
heroes: reading sound config file:
/usr/local/share/heroes/mod/sound.conf ...
heroes: ... done.
heroes: reading sound config file:
/usr/local/share/heroes/hqmod/sound.conf ...
heroes: ... done.
heroes: ... finished reading
/usr/local/share/heroes/etc/heroesrc.
heroes: user directory setup
heroes: Directory `/home/agt/.heroes' created.
heroes: setup default extra directory
heroes: reading configuration file:
/home/agt/.heroes/heroesrc ...
heroes: ... could not open.
heroes: fopen: No such file or directory
heroes: reading level list from
/usr/local/share/heroes/levels/
heroes: scandir: No such file or directory
heroes: fopen: No such file or directory
heroes: initialize SDL
heroes: opening audio at 44100 Hz 16 bit stereo, 2048
bytes audio buffer
heroes: opened audio at 44100 Hz 16 bit stereo, 2048
bytes audio buffer
heroes: set volume to 68/128
heroes: -- game introduction --
heroes: loading sound track from alias INTRO
heroes: loading sound-track:
/usr/local/share/heroes/mod/intro.xm
heroes: start playing sound track
heroes: [AGT] volume is 68
heroes: halt sound track playing
heroes: unload sound track
heroes: -- menu --
heroes: load random wrapped level
heroes: load level #11
heroes: Initialize rendering data
heroes: loading sound track from alias MENU
heroes: loading sound-track:
/usr/local/share/heroes/mod/menu.xm
heroes: start playing sound track
heroes: [AGT] volume is 68
heroes: set volume to 68/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: [AGT] music: 0
heroes: Uninitialize rendering data
heroes: halt sound track playing
heroes: unload sound track
heroes: -- play game --
heroes: load level #0
heroes: Initialize rendering data
heroes: loading sound track from alias HEROES01
heroes: loading sound-track:
/usr/local/share/heroes/mod/heroes01.xm
heroes: start playing sound track
heroes: [AGT] volume is 0
heroes: introduce game
heroes: game main loop
heroes: quit y/n menu
heroes: set volume to 0/128
heroes: set volume to 0/128
heroes: exit quit menu
heroes: game finished
heroes: Uninitialize rendering data
heroes: halt sound track playing
heroes: unload sound track
heroes: -- (back to) menu (from game) --
heroes: load random wrapped level
heroes: load level #13
heroes: Initialize rendering data
heroes: loading sound track from alias MENU
heroes: loading sound-track:
/usr/local/share/heroes/mod/menu.xm
heroes: start playing sound track
heroes: [AGT] volume is 0
heroes: Uninitialize rendering data
heroes: halt sound track playing
heroes: unload sound track
heroes: closed audio
#######
I don't get it. Music volume is 0 but I still hear it when the
level starts ! Note that I have SDL_mixer 1.2.4 (Mandrake
package).
Ok, it's time to test SDL_mixer_demos.tar.gz from
http://jcatki.no-ip.org/SDL_mixer/. Mix_VolumeMusic()
seems to work here !
#######
$ make
cc -g -O2 -Wall -I/usr/include/SDL -D_REENTRANT -g
-O2 -Wall -L/usr/lib -lSDL -lpthread -lSDL_mixer sdlwav.c
-o sdlwav
$ ./sdlwav /usr/local/share/heroes/mod/heroes01.xm
[playing with the "up" and "down" keys, the sound &
graphics change accordingly...]
Opened audio at 44100 Hz 16 bit stereo, 512 bytes audio
buffer
#######
I'm confused. Time to go to bed...
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107982&aid=834693&group_id=7982
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/