#exult@irc.freenode.net logs for 26 Apr 2007 (GMT)

Archive Today Yesterday Tomorrow
Exult homepage

[00:13:00] <Pupnik> works, i'm just using system()
[00:18:52] <Pupnik> heh ok not good not good ata ll
[00:22:14] --> Marzo has joined #exult
[00:22:30] --- Marzo is now known as Marzo_away
[00:35:42] <Pupnik> well it's working now, but no repeating
[00:37:11] <Pupnik> also forking a ps to test for streamer playing every 0.5 seconds isn't cool
[00:43:43] <Pupnik> ok very lame imo
[00:44:55] <Pupnik> you shouldn't be constantly calling MyMidiPlayer::start_music(int num,bool repeat,std::string flex
[00:48:08] --- Marzo_away is now known as Marzo
[00:48:21] <Marzo> Pupnik: ogg_name.c_str() should do the trick
[00:48:35] <Pupnik> yeah it did :)
[00:48:44] <Marzo> :-)
[00:48:51] <Marzo> (still catching up on the logs)
[00:48:55] <Pupnik> unfortunately my external player doesn't do repeating
[00:49:44] <Marzo> Exult itself only repeats a song at most once, so it is not much of a loss
[00:49:47] <Pupnik> i am looking to figure out who is calling start_music() every 0.8 seconds or so
[00:49:51] <Pupnik> ahh ok
[00:50:14] <Marzo> Every 0.8 seconds?
[00:50:37] <Pupnik> yeah according to my couts it's getting called 1/second or more
[00:51:15] <Marzo> Weird
[00:51:16] <Pupnik> then i'm testing to see if it's playing already with a 'ps' syscall - very icky
[00:52:19] <Pupnik> eventually i or someone smarter should integrate the gstreamer call into Midi.cc and do a proper ogg/mp3 config and code branch etc... but that's a bit complicated for me
[00:52:58] <Pupnik> grep -ri start_music * |wc -l
[00:52:58] <Pupnik> 157
[00:53:01] <Pupnik> sheeez
[00:53:02] <Marzo> Out of curiosity: is it start_music(int, bool, string) or start_music(string, num, bool) which is being called so often?
[00:53:25] <Pupnik> int, bool, string
[00:54:05] <Pupnik> wait
[00:54:52] <Pupnik> yeah
[00:55:39] <Pupnik> hmm i am being stupid, it's ogg_play_track that's getting called, to be precise
[00:56:46] <Marzo> It doesn't matter much as ogg_play_track is only ever called from MyMidiPlayer::start_music
[00:56:52] <Pupnik> right
[00:57:17] <Pupnik> so i'm looking at the 157 locations that match start_music
[00:57:50] <Pupnik> or did i mess something up?
[00:57:54] --> Colourless has joined #Exult
[00:57:54] --- ChanServ gives channel operator status to Colourless
[00:57:54] <Pupnik> hi Colourless
[00:58:34] <Marzo> 157?
[00:58:57] <Marzo> I only get 40 hits here
[01:00:12] <Pupnik> ah there's start_music, and start_music_combat
[01:00:25] <Marzo> Oh, right
[01:00:47] <Marzo> And start_music_combat also calls start_music
[01:01:08] <Marzo> Were you in combat when you measured the ~1 call/second?
[01:01:32] <Pupnik> no in trinsic start of game
[01:01:44] <Pupnik> maybe it's because i didn't set oggmusic
[01:01:58] <Pupnik> there might be a test somewhere i missed
[01:02:18] <Pupnik> //Mix_Music *newmusic = Mix_LoadMUS(ogg_name.c_str());
[01:02:39] <Marzo> If <use_oggs> is set to yes in your Exult.cfg, oggs will be used no matter what you set for midi
[01:02:58] <Pupnik> yeah that's working
[01:03:32] <Marzo> What about that line of code?
[01:04:00] <Pupnik> well i commented-out the actual sdl ogg playback
[01:04:24] <Marzo> More or less what I meant is: why?
[01:05:10] <Pupnik> because a) this device has dsp-accelerated mp3 playback for 0% cpu drain and b) the sdl ogg playback is unimplemented on this platform
[01:05:35] <Marzo> Ah, ok
[01:05:43] <Pupnik> http://www.pastebin.ca/458718
[01:05:55] <Pupnik> there's the current hack to Midi.cc - around lines 840
[01:08:47] <Pupnik> trying to find who is calling start_music repeatedly now :)
[01:10:04] <Pupnik> so i'm adding a cout << "Start_MUSIC called gamewin 1398" << endl;
[01:10:12] <Pupnik> tyye debug message behind every start_music :)
[01:14:07] <Marzo> Out of curiosity: is there a message along the lines of 'Audio parameters might be: XX and YY' in stdout near all of the debug messages you added or only near some of them?
[01:14:41] <Pupnik> no don't think so - testing in a moment
[01:15:12] <Marzo> Ack, nevermind -- you have to compile with DEBUG defined for it to show
[01:17:25] <Pupnik> ok it's being called repeatedly from gamewin.cc line 210
[01:17:28] <Marzo> In any case, you don't need to add any debug messages to bggame.cc, sigame.cc, soundtest.cc or keyactions.cc
[01:17:37] <Pupnik> k
[01:18:22] <Pupnik> ok the curr-track test for //Not already playing music test is failing i think
[01:18:36] <Marzo> Those would be the background sound effects
[01:20:25] <Pupnik> yeah since i commented ou, it's not realizing that music is playing
[01:22:22] <Marzo> You will have to modify MyMidiPlayer::ogg_is_playing for that
[01:25:57] <Marzo> I don't know the API of the system you are programming for, but there should be a function that tells whether a music is playing
[01:27:25] <Marzo> Placing this call in the function I mentioned will probably be the least messy way to handle this
[01:28:08] <Pupnik> actually the code again that's calling the sfx background isn't looking at ogg_is_playing
[01:28:13] <Pupnik> not that i can tell
[01:28:32] <Marzo> It should
[01:28:38] <Pupnik> void Background_noise::handle_event
[01:28:52] <Pupnik> if (player && player->get_ogg_enabled()
[01:29:04] <Pupnik> if((curr_track == -1 || laststate != currentstate ) && Audio::get_ptr()->is_music_enabled())
[01:29:26] <Pupnik> if(curr_track == -1 || (curr_track >=4 && curr_track <=8) || curr_track == 52) //Not already playing music
[01:29:49] <Pupnik> those are the only tests - then it does tracknum selection
[01:29:52] <Marzo> Scroll down to "Audio::get_ptr()->start_music(tracknum,true);"
[01:30:10] <Pupnik> yeah that's the line that's calling it
[01:30:16] <Marzo> That bit then calls MyMidiPlayer::start_music
[01:30:29] <Marzo> And MyMidiPlayer::start_music calls ogg_is_playing()
[01:30:29] <Pupnik> over and over again :)
[01:32:14] <Marzo> (see midi.cc lines 105-108)
[01:32:26] <Pupnik> but i see that it will return if ogg_is_playing
[01:32:36] <Pupnik> yep :)
[01:32:57] <Marzo> Preciselly; it will return without ever calling ogg_play_track
[01:33:39] <Marzo> (which, IIRC, was the problem)
[01:33:55] <Pupnik> yeah i need a fast way to test whether ogg is playing
[01:34:35] <Marzo> Like I said, I don't know the API of the device you are using and so can't be of much help there :-(
[01:35:47] <Pupnik> well if i integrate the gstreamer libs into the source i can do it
[01:35:58] <Pupnik> but right now it's a call to an external program
[01:36:18] <Pupnik> i mean if i link them and add about 400 lines of code
[01:37:02] <Marzo> Linking it instead of calling the external problem would probably make it easier to make a patch
[01:37:13] <Marzo> (and who knows, maybe even get it into CVS)
[01:38:02] <Pupnik> maybe there's a way i can fork the process and get a return code when it's done
[01:38:22] <Pupnik> right now i am forking it with syscall(command&) and that spawns a shell and just puts it into the background
[01:39:01] <Pupnik> i could set ogg_is_playing to be a boolean true after i invoke the player, and upon detecting that the child has exited, set ogg_is_playing to false
[01:39:08] <Pupnik> maybe
[01:50:09] --- LordNAway is now known as Lord_Nightmare
[02:09:41] --> Kazin has joined #exult
[02:18:38] <-- Kazinstan has left IRC (Read error: 145 (Connection timed out))
[02:21:39] <Pupnik> looking at the forked_player.cc is educational
[02:49:45] --- Marzo is now known as Marzo_away
[03:44:08] --- Marzo_away is now known as Marzo
[03:44:19] <Marzo> Good night to all
[03:44:26] <-- Marzo has left IRC ("Marzo vanishes suddenly.")
[03:46:59] <Pupnik> hmm if ogg background is playing i don't get guardian laughter when entering ransacked hut
[03:52:59] <Pupnik> speaking of which, i do have some good free audio libraries, should be able to put together alternates for BG_SFX
[03:57:18] <Pupnik> oh now i got the laughter
[04:41:15] <Pupnik> ok intro music (both) starting properly, bg sounds starting and restarting
[05:00:01] <-- Kazin has left IRC ("fwaffwafwfaa")
[05:06:12] --> Kazin has joined #exult
[05:58:36] * Pupnik is having much fun 'playtesting' :)
[06:06:56] <-- Kirben has left IRC ("System Meltdown")
[07:28:09] --> Kirben has joined #exult
[07:28:10] --- ChanServ gives channel operator status to Kirben
[08:23:43] <-- Darke has left IRC (Read error: 104 (Connection reset by peer))
[08:39:44] --> Darke has joined #exult
[08:44:51] --> WorkMonk has joined #exult
[12:32:46] --> Pupnik_ has joined #exult
[12:43:06] <-- Pupnik has left IRC (Read error: 110 (Connection timed out))
[12:49:53] <-- Colourless has left IRC ("casts improved invisibility")
[12:56:04] --> Kazinstan has joined #exult
[13:11:10] <-- Kazin has left IRC (Read error: 110 (Connection timed out))
[13:23:49] <-- Darke has left IRC (Read error: 104 (Connection reset by peer))
[13:37:22] <Pupnik_> i'm seeing several 2-3 second pauses in trinsic and elsewhere
[13:37:31] <Pupnik_> not sure if this is A* pathing or not
[13:37:40] * Pupnik_ looks for the pathing debug define
[13:39:38] --> Darke has joined #exult
[13:42:20] --- Pupnik_ is now known as Pupnik
[14:23:34] <-- Baastuul has left IRC ("Oh, how I've dreamt of taps.")
[14:31:28] --> Baastuul has joined #exult
[14:43:59] <Pupnik> woot -O3 worked well for exult!
[14:44:14] <Pupnik> found the powf problem - it was getting linked in by mt32 midi
[14:53:45] <Pupnik> re the tablet UI: http://exult.sourceforge.net/forum/read.php?f=1&i=26287&t=26287
[14:54:03] <Pupnik> it would still be useful if a single tap on a non-object would run to it
[15:03:09] <-- Kirben has left IRC (Read error: 110 (Connection timed out))
[17:21:52] --> Dark-Star has joined #exult
[17:44:01] <Pupnik> heh, playing aklabeth on the 770 now
[18:49:35] <Pupnik> this is funny, origin's official site has the copy protection cheats
[18:49:37] <Pupnik> http://www.owo.com/archive/ultima7/coord.html
[19:59:01] <Pupnik> Mem: 62224 60176 2048
[19:59:06] <Pupnik> exult just fits :)
[19:59:32] <Pupnik> Mem: 60520K used, 1704K free, 0K shrd, 92K buff, 13116K cached
[20:00:20] <Pupnik> actually it only uses 12M
[21:24:20] <-- Dark-Star has left IRC ()
[22:09:37] <-- Pupnik has left IRC (Read error: 145 (Connection timed out))
[23:05:00] <-- Cahaan has left IRC ()
[23:08:20] --> Pupnik has joined #exult
[23:17:56] <Pupnik> just a status update on my mangling of your fine code
[23:20:05] <Pupnik> what i've got so far is an #ifdef'd set of substitute code for nokia in the exult.cc, ibuf8.cc, midi.cc and gamewin.cc
[23:20:13] <Pupnik> as well as a few makefile changes
[23:21:41] <Pupnik> playing of oggs is a special case, apparently
[23:22:15] <Pupnik> so the music for ogg playback is called differently, with different track numebers than straight MIDI tracks
[23:23:56] <Pupnik> at this point, i don't see how i could cleanly make a seperate module like forked_player.cc
[23:25:01] <Pupnik> for the time being it's not important to structure the hacks to make them upstream compatible
[23:26:03] <Pupnik> but also the nokias are probably more of a fringe user group than even the zaurus, though exact sales figures are unavailable
[23:30:19] <Pupnik> so for now i'll finish up the UI issues as quickly as i can
[23:31:05] <SB-X> i'm surprised that origin's site is still online
[23:31:31] <SB-X> the old archived pages
[23:32:00] <Pupnik> yeah
[23:32:38] <Pupnik> btw. i am old. Aklabeth was one of the first computer games i played.
[23:36:32] <Pupnik> so these old origin games are quite dear to my heart :)
[23:37:57] <Sevalecan> my first ultima was underworld
[23:38:40] <Pupnik> great game
[23:41:28] <Pupnik> i find it interesting how open source projects never create the quality of content that commercial games do