IRC logs for #opendune on OFTC at 2012-02-02
            
00:37:03 <milkshake> ok if you are still here I compiled a binary that has asound and withit midi_alsa.c included but still same issue with midi :(
00:37:22 <milkshake> and no output to terminal with the changes we did to the file
00:37:24 <milkshake> files*
01:07:34 <glx> and no changes at all in the log ?
01:09:32 <milkshake> nope
01:11:17 <glx> can you paste configure output ?
01:11:37 <milkshake> sure
01:11:40 <milkshake> #devel
01:12:29 <glx> ?
01:12:53 <milkshake> http://pastebin.com/LKi8vgH1
01:16:35 <milkshake> does that look ok to you?
01:16:52 <glx> seems correct yes
01:18:04 <milkshake> any ideas?
01:18:17 <glx> no, sorry
01:18:40 <milkshake> do u know who would know?
01:21:54 <milkshake> u know the built in error messages midi_alsa.c where are they meant to output?
01:22:04 <milkshake> how would I get those to show up?
01:22:29 <glx> the Error() stuff ?
01:22:34 <milkshake> yes
01:23:38 <milkshake> it seems like it may be usefull
01:23:51 <glx> it should go to stderr, but you can edit src/os/error.c and change stderr to stdout at line 17
01:24:08 <milkshake> ok
01:24:32 <glx> then it will go to stdout like the "Thank you for playing Dune II." message
01:24:57 <milkshake> ok cool
01:25:07 <glx> as this message is clearly visible in the .out
01:25:12 <milkshake> ok
01:37:45 <milkshake> ok here is the output No valid MIDI output ports.
01:37:45 <milkshake> Please install and start Timidity++ like: timidity -iA
01:38:16 <milkshake> that strange though cos my script does start timidity just like that
01:38:49 <milkshake> its like it tries to access the ports before I have set them yo
01:38:55 <glx> ah that's progress :)
01:40:03 <glx> on my linux VM I need to use aconnect to "connect" midi port
01:40:43 <milkshake> aconnect?
01:41:01 <glx> an alsa tool
01:42:35 <milkshake> so you have to run aconnect inbetween timidity and opendune?
01:44:27 <glx> starting the VM to check
01:44:34 <milkshake> cheers
01:44:56 <milkshake> yeah for some reason its doing this No valid MIDI output ports.
01:44:56 <milkshake> Please install and start Timidity++ like: timidity -iA
01:44:56 <milkshake> Requested buffer size 32768, fragment size 8192
01:44:56 <milkshake> ALSA pcm 'default' set buffer size 32768, period size 8192 bytes
01:45:07 <milkshake> telling me to run it but then afterwards it runs it?
01:45:53 <glx> it just disable midi output, but that doesn't block opendune
01:46:35 <milkshake> ?
01:46:57 <milkshake> no I meant timidity starts stright after the message
01:47:03 <milkshake> no the game
01:47:05 <milkshake> not*
01:47:20 <glx> ha timidity must be started before the message
01:47:55 <milkshake> oh?
01:48:13 <glx> and the other messages are for voices
01:48:15 <milkshake> why does the message come first ?
01:48:34 <milkshake> what im confused
01:48:48 <milkshake> im my startup script timidity ports are opened before the game launches
01:49:15 <glx> install timidity message stops midi_init(), then dsp_init() is ran
01:49:31 <milkshake> ok?
01:49:47 <glx> and the ALSA pcm 'default' ... message comes from there
01:50:18 <milkshake> yeah the ALSA message is when midi is disabled i know that
01:50:36 <milkshake> im reffering to timidity offering midi ports before the game launches so why cant it find any?
01:57:17 <glx> hmm I don't have music either
01:58:12 <milkshake> strange
02:00:21 <glx> ok it doesn't find the right port
02:00:33 <milkshake> oh?
02:00:42 <milkshake> how is this fixed?
02:00:57 <glx> well it's a valid port but not the one I want
02:01:41 <milkshake> so do we need to change something?
02:04:33 *** glx_ has joined #openDune
02:04:50 <glx_> printf("%s\n", snd_seq_port_info_get_name(pinfo));
02:05:11 *** glx_ is now known as Guest1282
02:05:24 <milkshake> where do u want me to put that?
02:05:39 *** Guest1282 is now known as _glx
02:06:19 *** _glx is now known as glx_
02:06:59 <glx_> ok line 63 in src/audio/midi_alsa.c (clean trunk)
02:07:27 <glx_> between if strncmp and found =
02:09:18 <glx> that told me the found port
02:09:35 <milkshake> ok so thats making found = true; move to libe 64 right?
02:09:43 <glx> yes
02:10:04 <milkshake> ok and you dont want me to put it into error() instead so i get it in the outfile?
02:10:30 <glx> with printf it should be in outfile too
02:10:30 <milkshake> or will that not work?
02:10:34 <milkshake> ok
02:15:41 <milkshake> it doesnt output the ports for me?
02:16:08 <milkshake> in the outfile
02:16:20 <glx> hmm of course for you it doesn't output anything as it doesn't find any
02:16:36 <milkshake> ok gold that though
02:16:38 <milkshake> thought*
02:16:50 <milkshake> im gonna manually run it before starting the game
02:17:40 <milkshake> ok it says TiMidity port 0
02:17:52 <milkshake> but it freezes on the weswood logo
02:18:39 <milkshake> i started timidity first and it outputed this TiMidity starting in ALSA server mode
02:18:39 <milkshake> Opening sequencer port: 128:0 128:1 128:2 128:3
02:18:45 <milkshake> then the outfile said port 0
02:18:52 <milkshake> does that help?
02:19:03 <glx> ok so timidity is found
02:19:11 <milkshake> is it the right port?
02:19:15 <glx> the freeze is probably a timing issue
02:19:32 <milkshake> how to fix that :S
02:20:06 <glx> retry until it works, we still have timing issues
02:20:10 <milkshake> i did have to edit something in order to make it compile in the asound global libs, maybe that broke it
02:20:37 <glx> it's due to how dune2 works internally
02:20:49 <glx> it's a timer based application
02:21:07 <glx> while modern applications are event based
02:22:57 <milkshake> I had to edit out time.h cos it failed when compiling
02:23:03 <milkshake> is this what breaks it?
02:23:31 <milkshake> im guessing it is
02:23:38 <milkshake> ill un comment it and show u the error
02:24:27 <glx> ok I have music now (but it's a hack specific to my system)
02:24:41 <milkshake> did yours freeze?
02:24:46 <glx> no
02:24:51 <milkshake> ok hold on
02:25:31 <milkshake> ok here is the original compile error
02:25:35 <glx> but music is not smooth because it's a VM
02:25:53 <milkshake> http://pastebin.com/RguLvyNt
02:26:36 <glx> that's related to voices
02:26:49 <milkshake> what this? /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/include/alsa/global.h:144: error: redefinition of struct timespec
02:27:55 <glx> from /home/devel/Pandora/opendune/trunk/src/audio/dsp_alsa.c:7: <-- that's for voices
02:28:25 <milkshake> hmmm if I can fix that error without removing the time mechanics from the asla global.h then it might work?
02:30:40 <milkshake> its reffering to this
02:30:41 <milkshake> struct timespec {
02:30:41 <milkshake> time_t tv_sec; /* seconds */
02:30:41 <milkshake> long tv_nsec; /* nanoseconds */
02:30:41 <milkshake> };
02:30:52 <glx> I know the struct :)
02:31:09 <milkshake> so whats wrong with it?
02:31:29 <glx> but I don't see why it's redeclared
02:32:14 <milkshake> struct timespec is only found twice in that file
02:32:23 <milkshake> right neer each other
02:32:24 <milkshake> struct timespec {
02:32:24 <milkshake> time_t tv_sec; /* seconds */
02:32:24 <milkshake> long tv_nsec; /* nanoseconds */
02:32:24 <milkshake> };
02:32:24 <milkshake> #endif
02:32:29 <milkshake> typedef struct timeval snd_timestamp_t;
02:32:31 <milkshake> typedef struct timespec snd_htimestamp_t;
02:32:53 <milkshake> is it the dsp_alsa.c thats causing it to redeclare?
02:33:35 <glx> no, we don't include time.h there
02:33:53 <glx> looks like a broken alsa header
02:34:04 <milkshake> maybe its declaired both in asaoundlib.h?
02:34:14 <milkshake> and global.h
02:35:02 <milkshake> nope asoundlib.h is just full of includes
02:36:09 <glx> there are timeval and timespec in my global.h
02:36:36 <milkshake> it says its in function DSP_GetStatus?
02:37:03 <glx> no that's unrelated :)
02:37:07 <milkshake> oh ok
02:37:12 <milkshake> u can tell im rubbish at this stuff
02:37:50 <milkshake> i dont understand where its redefined?
02:38:59 <milkshake> im so lost at this point in time
02:39:08 <milkshake> do u have any clue as to why that error is there?
02:39:27 <glx> global.h includes time.h
02:39:42 <milkshake> yes it does
02:39:58 <glx> and redefine the structs if the platform is not a POSIX one
02:40:17 <milkshake> those if comments are commented out though
02:40:22 <milkshake> so it redefines them no matter what
02:40:36 <milkshake> if statements*
02:40:50 <milkshake> sorry no they are not
02:40:53 <glx> no they are preprocessor if
02:40:53 <milkshake> my bad
02:40:58 <milkshake> indeed
02:41:56 <milkshake> which of these stucts is important to the midi music?
02:42:54 <glx> try "configure CFLAGS:=-D_POSIX_SOURCE" with clean global.h
02:43:25 <milkshake> it is clean right now :) thats why i have the errors in the first palce :)
02:43:31 <milkshake> you mean clean trunk?
02:44:10 <glx> without clean trunk it should be ok :)
02:44:31 <glx> but a clean trunk should compile
02:45:06 <glx> though you'll lose Error output in your .out
02:46:06 <milkshake> nah i copied the edited error.c and midi_alsa.c back across :)
02:46:29 <milkshake> i tried it with this: ./configure --with-asound=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/lib/libasound.a CFLAGS:=-D_POSIX_SOURCE
02:46:31 <milkshake> it didnt work
02:46:43 <milkshake> do I quote anything?>
02:47:21 <glx> hmm ah I know
02:47:44 <glx> it's "CFLAGS:=-D_POSIX_SOURCE ./configure ..."
02:48:50 <glx> or use --CFLAGS=
02:48:59 <milkshake> CFLAGS:=-D_POSIX_SOURCE: command not found
02:49:27 <glx> use --CFLAGS then
02:49:30 <milkshake> Unknown option --CFLAGS:=-D_POSIX_SOURCE
02:49:33 <milkshake> lol
02:49:47 <glx> --CFLAGS= :)
02:49:51 <glx> not :=
02:49:56 <milkshake> ok
02:50:48 <milkshake> ok looks good lets see
02:51:20 <milkshake> here is the output if your interested in any warnings etc
02:51:21 <milkshake> http://pastebin.com/dfm84Gya
02:52:36 <glx> the code is full of warnings (especially win64 build ;) )
02:53:50 <milkshake> ok westwood logo freeze again :(
02:54:20 <milkshake> I wonder why its doing that?
02:54:25 <milkshake> you said timing?
02:54:34 <glx> deadlock basically
02:54:39 <milkshake> any way around it?
02:56:06 <milkshake> glx where in the world are u btw its 2.55am here i should go to bed soon :P
02:56:38 <glx> 1h right of you :)
02:56:47 <milkshake> europe somewhere
02:56:50 <glx> france
02:56:52 <milkshake> cool
02:57:10 <milkshake> so any ideas on how to fix it?
02:57:27 <glx> not really
02:58:17 <glx> set g_enableSoundMusic to false in src/config.c:17 for nom
02:58:25 <glx> *now
02:58:33 <milkshake> what does that do?
02:58:40 <glx> disable the music
02:58:55 <milkshake> lol i dont need that as long as I dont run timidity
02:59:06 <glx> true :)
02:59:19 <milkshake> what would u need to be able to find this timing bug?
02:59:27 <milkshake> is there anything I can set up to help
02:59:46 <glx> deadlocks are very hard to debug
02:59:56 <glx> we still have some
03:00:27 <milkshake> will they ever be fixed :P
03:00:51 <glx> one day we'll switch from timer based to event based
03:00:56 <glx> but it's not easy
03:01:03 <milkshake> but im assuming not in the near future?
03:01:46 <glx> indeed
03:01:55 <milkshake> is opendune still in active development?
03:02:41 <glx> not active, but not dead either
03:02:54 <milkshake> any idea when work will resume :P
03:03:02 <glx> only time will tell
03:03:23 <milkshake> well i hope its soon :) its a great game worthy of all your hard work
03:03:48 <glx> the first goal was to have a working 1:1 version
03:04:24 <milkshake> have you heard of the pandora before?
03:04:29 <glx> no
03:04:42 <milkshake> its a cool little handheld console/linux pc
03:04:46 <milkshake> www.openpandora.org
03:06:47 <glx> seems nice
03:07:09 <milkshake> its cool, i never used linux untill i got this, so im starting to get used to it
03:07:30 <milkshake> but i have no programming skills other than html,javascript and php
03:07:48 <milkshake> so compiling stuff that gives errors gives me a headache
03:13:11 <milkshake> anyway thanks for your help
03:13:14 <milkshake> night
03:13:20 <glx> gn
03:15:41 *** milkshake has quit IRC
03:16:33 *** glx_ has quit IRC
04:34:28 *** glx has quit IRC
14:12:08 *** glx has joined #openDune
14:12:08 *** ChanServ sets mode: +o glx
14:24:01 <glx> hello
21:06:23 *** milkshake has joined #openDune
23:43:31 *** milkshake has quit IRC