#exult@irc.freenode.net logs for 12 Apr 2013 (GMT)

Archive Today Yesterday Tomorrow
Exult homepage

[05:46:16] <-- Marzo has left IRC (Ping timeout: 245 seconds)
[05:47:16] --> Marzo has joined #exult
[08:56:49] <Dominus> wjp, the background noises should be gone now
[08:59:36] <Dominus> I have an int->string problem again and just can't keep it in my head how these things work. In the commit I just did I would also like to test whether player->get_music_conversion(); is either mt32 or fakemt32
[09:00:35] <Dominus> so I need something like std::string conversion = player->get_music_conversion(); I just need to find how to make that int into a string...
[09:01:50] <wjp> why a string?
[09:02:33] <Dominus> I'm not sure how to compare it otherwise
[09:02:50] <wjp> compare it with what exactly?
[09:03:50] <sh4rm4> comparing strings is orders of magnitude slower than comparing numbers
[09:04:02] <wjp> sh4rm4: don't confuse the issue
[09:04:06] <Dominus> in if (player && (player->get_ogg_enabled() || player->get_midi_driver() == "mt32emu")) I want to add another || that checks whether player->get_music_conversion() is mt32 or fakemt32
[09:05:30] <Dominus> || player->get_music_conversion() == mt32 is not working so I thought I need to make a string first out of it
[09:05:37] <wjp> no, it's more subtle
[09:05:50] <sh4rm4> player->get_midi_driver_as_enum() == enum_mididriver_mt32emu
[09:06:37] <wjp> sh4rm4: that part is already handled
[09:07:45] <wjp> the relevant bit seems to be in init_device
[09:08:06] <wjp> that shows which constants correspond to which config strings
[09:08:38] <wjp> things like: if (s == "mt32") music_conversion = XMIDIFILE_CONVERT_NOCONVERSION;
[09:09:21] <wjp> so if you had mt32 in config/audio/midi/convert, get_music_conversion() will return XMIDIFILE_CONVERT_NOCONVERSION
[09:09:46] <wjp> (in audio/Midi.cc, by the way)
[09:10:58] <sh4rm4> btw, it seems strange that get_midi_driver is a method of player
[09:12:10] <Dominus> that was done just a bit higher in the code
[09:14:04] <Dominus> thanks wjp, I'll wrestle with it again later. need to prepare lunch now
[10:24:55] <-- RadoS has left IRC (Remote host closed the connection)
[10:34:32] --> RadoS has joined #exult
[11:36:40] <Dominus> wjp, didn't get it how to do it the get_music_conversion way. I added std::string s;
[11:36:41] <Dominus> config->value("config/audio/midi/convert", s, "gm");
[11:37:03] <Dominus> and if s == "mt32"
[11:37:31] <wjp> if (player->get_music_conversion() == XMIDIFILE_CONVERT_NOCONVERSION)
[11:38:13] <wjp> you may have to add an extra #include "audio/midi_drivers/XMidiFile.h" at the top
[11:38:21] <Dominus> ah
[11:38:40] <Dominus> because otherwise it gave me undeclared identifier with this
[11:39:20] <wjp> should it be music_conversion or effects_conversion?
[11:39:36] <Dominus> music
[11:39:43] <wjp> (disclaimer: I have no idea what I'm talking about)
[11:41:04] <Dominus> I think effects_conversion is only relevant if you enable midi-sfx
[11:42:33] <Dominus> yes
[12:00:31] <Dominus> damn it
[12:01:00] <Dominus> those effect tracks get still played all the time, even with the last commit
[12:13:52] --> TheCycoONE has joined #exult
[12:17:14] <Dominus> ah, Marzo has disabled the //Tests to see if track is playing the SFX tracks, possible
[12:17:28] <Dominus> a bit further down with an #if 0
[12:18:00] <Dominus> when I enable this again, the background tracks work correctly
[12:18:37] <Dominus> Marzo: any idea why you disabled this? (or wjp, do you have an idea?)
[14:33:12] <-- Marzo has left IRC (Ping timeout: 264 seconds)
[15:48:22] <Dominus> d'oh, of course it was disabled. if (player) covered all cases, no reason for an else. Now that I narrowed it down, we need the else again
[15:48:33] * Dominus is talking to himself
[16:09:28] <Dominus> so, three important issues down...
[16:14:42] <wjp> hurray :-)
[16:16:58] <Dominus> so wait a bit for more issues to pop up and then release (or first fix those issues :))
[19:27:36] <Dominus> well, maybe Colourless can pry himself away from secretly doing that scaler library and fix the sysex stuff and decide whether we want to load the external munt library instead of the build in one...
[19:27:46] * Dominus hides yet again :)
[20:56:13] <-- TheCycoONE has left IRC (Quit: And then there were n-1)
[21:02:32] <Dominus> case of the caltrops not causing damage to non party members and monsters
[21:03:21] <Dominus> in objs/egg.cc it only mentions actor for all kind of fields. so maybe that should be npcs as well?
[21:04:44] --> Marzo has joined #exult