Thread: [tuxdroid-user] cvoicecontrol: strace microphone_config
Status: Beta
Brought to you by:
ks156
From: Florent T. <ft...@gm...> - 2007-03-28 19:45:36
|
Hi strace microphone_config open("/usr/share/terminfo/x/xterm", O_RDONLY) = 3 geteuid32() = 1000 setfsuid32(1000) = 1000 getegid32() = 1000 setfsgid32(1000) = 1000 read(3, "\32\1\34\0\35\0\17\0\235\1&\5", 12) = 12 read(3, "xterm|X11 terminal emulator\0", 28) = 28 read(3, "\0\1\0\0\1\0\0\0\1\0\0\0\0\1\1\0\0\0\0\0\0\0\1\0\0\1\0"..., 29) = 29 read(3, "\0", 1) = 1 read(3, "P\0\10\0\30\0\377\377\377\377\377\377\377\377\377\377\377"..., 30) = 30 read(3, "\0\0\4\0\6\0\10\0\31\0\36\0&\0*\0.\0\377\3779\0J\0L\0P"..., 826) = 826 lseek(3, 2, SEEK_CUR) = 928 read(3, "Z\0\7\0\r\0\33[%i%p1%d;%p2%dr\0\33[3g\0\33[H\33"..., 1318) = 1316 close(3) = 0 write(2, "Error opening terminal: xterm.\n", 31Error opening terminal: xterm. ) = 31 Any idea? This prevents using cvoicecontrol. If we manage to find a working cvoicecontrol config file, we could circumvent it; my guess is, /usr/share/terminfo/x/xterm has changed since cvoicecontrol release. |
From: Florent T. <ft...@gm...> - 2007-03-28 20:05:00
|
This very line shows that today's file is shorter: it attempts to read 1318 chars, and stops after 1316. read(3, "Z\0\7\0\r\0\33[%i%p1%d;%p2%dr\0\33[3g\0\33[H\33"..., 1318) = 1316 I crawled into the sources, but didn't find anywhere any info regarding the terminal :( |
From: Florent T. <ft...@gm...> - 2007-03-28 20:13:30
|
So... I tried something else: i opened microphone_config in Eterm... And it works ! Well, until you try writing the config file: *** glibc detected *** microphone_config: munmap_chunk(): invalid pointer: 0xbff26e91 *** ======= Backtrace: ========= x Calcux x x /lib/tls/i686/cmov/libc.so.6(__libc_free+0x18a)[0xb7e4eb4a] x Estimx x x microphone_config[0x804d967] x x x Exit x microphone_config[0x804e757] x x x x /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc)[0xb7dfd8cc] x x x x microphone_config(tcgetattr+0x69)[0x8049011] x x x x ======= Memory map: ======== x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x 08048000-08050000 r-xp 00000000 08:06 677410 /usr/bin/microphone_config x x 08050000-08051000 rwxp 00007000 08:06 677410 /usr/bin/microphone_config x x 08051000-08074000 rwxp 08051000 00:00 0 [heap] x x b7ddb000-b7de5000 r-xp 00000000 08:06 852035 /lib/libgcc_s.so.1 x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqb7de5000-b7de6000 rwxp 00009000 08:06 852035 /lib/libgcc_s.so.1 b7de6000-b7de8000 rwxp b7de6000 00:00 0 b7de8000-b7f15000 r-xp 00000000 08:06 852256 /lib/tls/i686/cmov/libc-2.4.so b7f15000-b7f17000 r-xp 0012c000 08:06 852256 /lib/tls/i686/cmov/libc-2.4.so b7f17000-b7f19000 rwxp 0012e000 08:06 852256 /lib/tls/i686/cmov/libc-2.4.so b7f19000-b7f1c000 rwxp b7f19000 00:00 0 b7f1c000-b7f4e000 r-xp 00000000 08:06 852621 /lib/libncurses.so.4.2 b7f4e000-b7f56000 rwxp 00031000 08:06 852621 /lib/libncurses.so.4.2 b7f56000-b7f5a000 rwxp b7f56000 00:00 0 b7f5a000-b7f7e000 r-xp 00000000 08:06 852260 /lib/tls/i686/cmov/libm-2.4.so b7f7e000-b7f80000 rwxp 00023000 08:06 852260 /lib/tls/i686/cmov/libm-2.4.so b7f91000-b7f93000 rwxp b7f91000 00:00 0 b7f93000-b7fac000 r-xp 00000000 08:06 851990 /lib/ld-2.4.so b7fac000-b7fae000 rwxp 00018000 08:06 851990 /lib/ld-2.4.so bfef3000-bff27000 rwxp bfef3000 00:00 0 [stack] ffffe000-fffff000 ---p 00000000 00:00 0 [vdso] Abandon (core dumped) Nice, isnt it... :( |
From: Florent T. <ft...@gm...> - 2007-03-28 20:52:44
|
It seems that the config file is the main problem, so when we get a working config file, we shall finally evaluate cvoice control. In microphone_config.c: 1153 /***** output configuration information to config file */ fprintf(f, "Mixer Device = %s\n", getMixer()); fprintf(f, "Audio Device = %s\n", getAudio()); fprintf(f, "Mic Level = %d\n", mic_level); fprintf(f, "IGain Level = %d\n", igain_level); fprintf(f, "Record Level = %d\n", rec_level); fprintf(f, "Stop Level = %d\n", stop_level); fprintf(f, "Silence Level = %d\n", silence_level); fprintf(f, "Channel Mean ="); for (i = 0; i < FEAT_VEC_SIZE; i++) fprintf(f, " %6.5f", channel_mean[i]); fprintf(f, "\n"); fclose(f); Maybe the method used to open the file / write into it is too old, and should be reimplemented. As we can see here, the file is pretty simple. Options: - find an existing config file and adjust it by hand - debug the program to find the stored values before writing and handwrite - rewrite the storing procedure |