I have a Windows app that records from a microphone. For some reason, this fails. The application displays the error message "The driver cannot recognize the specified command", which I guess is the translation of MCIERR_UNRECOGNIZED_COMMAND. At the same time, Wine prints out:
fixme:mciwave:WAVE_mciRecord Should descend into data chunk. Please report.
Is this related, perhaps? I believe MCIERR_UNRECOGNIZED_COMMAND is returned from mci.c:MCI_ParseOptArgs. Running with WINEDEBUG=+mci gives:
trace:mci:mciSendCommandW => 00000000 trace:mci:mciSendStringW => 1/ 0 ((null)) trace:mci:mciSendStringW => 2/ 0 ((null)) trace:mci:mciSendStringW (L"save ArticleEditor "C:\Program Files\Studieknep\Tal\0000.wav"", (nil), 0, (nil)) trace:mci:mciSendStringW verb=L"save" on dev=L"articleeditor"; offset=1 trace:mci:MCI_ParseOptArgs args=L""c:\program files\studieknep\tal\0000.wav"" offset=1 trace:mci:MCI_ParseOptArgs cmd=L"save" inCst=N eid=0000 trace:mci:MCI_ParseOptArgs cmd=L"notify" inCst=N eid=0005 trace:mci:MCI_ParseOptArgs cmd=L"wait" inCst=N eid=0005 trace:mci:MCI_ParseOptArgs cmd=L"" inCst=N eid=0001 trace:mci:MCI_ParseOptArgs cmd=L"" inCst=N eid=0003 warn:mci:MCI_ParseOptArgs Optarg L""c:\program files\studieknep\tal\0000.wav"" not found
(I've activated the TRACE print in MCI_ParseOptArgs.)
Any ideas?
Regards,
Peter Åstrand wrote:
Any ideas?
does this help (lines in patch are likely to be wrapped)? A+
diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c index e73b5de..79aaafd 100644 --- a/dlls/winmm/mci.c +++ b/dlls/winmm/mci.c @@ -1093,7 +1093,7 @@ static DWORD MCI_ParseOptArgs(LPDWORD da }
if (strncmpiW(args, str, len) == 0 && - (args[len] == 0 || args[len] == ' ')) { + ((eid == MCI_STRING && len == 0) || args[len] == 0 || args[len] == ' ')) { /* store good values into data[] */ args += len; while (*args == ' ') args++;
On Mon, 21 Nov 2005, Eric Pouech wrote:
Peter Åstrand wrote:
Any ideas?
does this help (lines in patch are likely to be wrapped)?
Well, sort of. The error message is gone; MCIERR_UNRECOGNIZED_COMMAND is not returned any more.
However, something else is wrong: No recording file is saved. There should be a file called 0000.wav in the "Tal" directory, but no such file exists after recording. Here's the trace:
trace:mci:mciSendStringW (L"close ArticleEditor", (nil), 0, (nil)) trace:mci:mciSendStringW (L"open articleeditor wait", (nil), 0, (nil)) trace:mci:MCI_LoadMciDriver wDevID=0001 fixme:mci:MCI_LoadMciDriver Couldn't load driver for type L"ARTICLEEDITOR". If you don't have a windows installation accessible from Wine, you perhaps forgot to create a [mci] section in system.ini trace:mci:mciSendStringW (L"open "C:\Program Files\Studieknep\data\pcm\44.wav" alias ArticleEditor", (nil), 0, (nil)) trace:mci:MCI_LoadMciDriver wDevID=0001 trace:mci:mciSetDriverData (0001, 7c8ed780) trace:mci:MCI_LoadMciDriver Loaded driver 0x7c8e7c90 (L"WAVEAUDIO"), type is 522, cmdTable=0000ffff trace:mci:MCI_LoadMciDriver mcidev=1, uDevTyp=020A wDeviceID=0001 ! trace:mci:MCI_SetCommandTable (0x7fb2a89c, 0) trace:mci:MCI_IsCommandTableValid Dumping cmdTbl=0 [lpTable=0x7fb2a89c devType=0] trace:mci:MCI_GetCommandTable => 0 trace:mci:MCI_SetCommandTable (0x7fb2c720, 522) trace:mci:MCI_IsCommandTableValid Dumping cmdTbl=1 [lpTable=0x7fb2c720 devType=522] trace:mci:MCI_GetCommandTable => 1 trace:mci:mciSendStringW verb=L"open" on dev=L"c:\program files\studieknep\data\pcm\44.wav"; offset=2 trace:mci:MCI_ParseOptArgs args=L"alias articleeditor" offset=2 trace:mci:mciSendStringW [1, MCI_OPEN, 00000600, 00000000/(null) 00000000/(null) 00000000/(null) 7c8ec1ac/L"c:\program files\studieknep\data\pcm\44.wav" 7c8ec212/L"articleeditor" 00000000/(null)] trace:mci:mciGetDriverData (0001) trace:mci:mciSendStringW => 1/ 0 ((null)) trace:mci:mciSendStringW => 2/ 0 ((null)) trace:mci:mciSendStringW (L"record ArticleEditor", (nil), 0, (nil)) trace:mci:mciSendStringW verb=L"record" on dev=L"articleeditor"; offset=1 trace:mci:mciSendStringW [1, MCI_RECORD, 00000000, 00000000/(null) 00000000/(null) 00000000/(null) 00000000/(null) 00000000/(null) 00000000/(null)] trace:mci:mciGetDriverData (0001) trace:mci:mciSendStringW => 1/ 0 ((null)) trace:mci:mciSendStringW => 2/ 0 ((null)) trace:mci:mciSendCommandA (00000001, MCI_RECORD, 00000002, 7c8ed6c0) trace:mci:mciSendCommandW (00000001, MCI_RECORD, 00000002, 7c8ed6c0) trace:mci:mciGetDriverData (0001) fixme:mciwave:WAVE_mciRecord Should descend into data chunk. Please report. trace:mci:mciSendStringW (L"stop ArticleEditor", (nil), 0, (nil)) trace:mci:mciSendStringW verb=L"stop" on dev=L"articleeditor"; offset=1 trace:mci:mciSendStringW [1, MCI_STOP, 00000000, 00000000/(null) 00000000/(null) 00000000/(null) 00000000/(null) 00000000/(null) 00000000/(null)] trace:mci:mciGetDriverData (0001) trace:mci:mciSendCommandW => 00000000 trace:mci:mciSendStringW => 1/ 0 ((null)) trace:mci:mciSendStringW => 2/ 0 ((null)) trace:mci:mciSendStringW (L"save ArticleEditor "C:\Program Files\Studieknep\Tal\0000.wav"", (nil), 0, (nil)) trace:mci:mciSendStringW verb=L"save" on dev=L"articleeditor"; offset=1 trace:mci:MCI_ParseOptArgs args=L""c:\program files\studieknep\tal\0000.wav"" offset=1 trace:mci:MCI_ParseOptArgs args=L"\b798\7c96 " offset=1 trace:mci:mciSendStringW [1, MCI_SAVE, 00000100, 00000000/(null) 7c96b81c/L"\b798\7c96" 00000000/(null) 00000000/(null) 00000000/(null) 00000000/(null)] trace:mci:mciGetDriverData (0001) trace:mci:mciSendStringW => 1/ 0 ((null)) trace:mci:mciSendStringW => 2/ 0 ((null))
Does this look strange or normal?
Could it help with using one or several DLL files from Windows?
Regards,
Peter Åstrand wrote:
On Mon, 21 Nov 2005, Eric Pouech wrote:
Peter Åstrand wrote:
Any ideas?
does this help (lines in patch are likely to be wrapped)?
Well, sort of. The error message is gone; MCIERR_UNRECOGNIZED_COMMAND is not returned any more.
However, something else is wrong: No recording file is saved. There should be a file called 0000.wav in the "Tal" directory, but no such file exists after recording. Here's the trace:
trace:mci:MCI_ParseOptArgs args=L"\b798\7c96 " offset=1 trace:mci:mciSendStringW [1, MCI_SAVE, 00000100, 00000000/(null) 7c96b81c/L"\b798\7c96" 00000000/(null) 00000000/(null) 00000000/(null)
thats likely wrong
00000000/(null)]
Could it help with using one or several DLL files from Windows?
Regards,
a +mciwave,+mci trace would be appreciated
On Tue, 22 Nov 2005, Eric Pouech wrote:
Well, sort of. The error message is gone; MCIERR_UNRECOGNIZED_COMMAND is not returned any more.
However, something else is wrong: No recording file is saved. There should be a file called 0000.wav in the "Tal" directory, but no such file exists after recording. Here's the trace:
a +mciwave,+mci trace would be appreciated
Included below.
(If you want to try the application yourself, it's actually available from http://www.softogram.se/studieknepengelskademo.html. Some parts of the program is in Swedish, though. After starting the program, select one book in the list and press the button marked with "1". Press the microphone button to start recording, and then the square to stop.)
trace:mci:mciSendStringW (L"stop ArticleEditor", (nil), 0, (nil)) trace:mci:mciSendStringW (L"open articleeditor wait", (nil), 0, (nil)) trace:mci:MCI_LoadMciDriver wDevID=0001 fixme:mci:MCI_LoadMciDriver Couldn't load driver for type L"ARTICLEEDITOR". If you don't have a windows installation accessible from Wine, you perhaps forgot to create a [mci] section in system.ini trace:mci:mciSendStringW (L"close ArticleEditor", (nil), 0, (nil)) trace:mci:mciSendStringW (L"open articleeditor wait", (nil), 0, (nil)) trace:mci:MCI_LoadMciDriver wDevID=0001 fixme:mci:MCI_LoadMciDriver Couldn't load driver for type L"ARTICLEEDITOR". If you don't have a windows installation accessible from Wine, you perhaps forgot to create a [mci] section in system.ini trace:mci:mciSendStringW (L"close ArticleEditor", (nil), 0, (nil)) trace:mci:mciSendStringW (L"open articleeditor wait", (nil), 0, (nil)) trace:mci:MCI_LoadMciDriver wDevID=0001 fixme:mci:MCI_LoadMciDriver Couldn't load driver for type L"ARTICLEEDITOR". If you don't have a windows installation accessible from Wine, you perhaps forgot to create a [mci] section in system.ini trace:mci:mciSendStringW (L"open "C:\Program Files\Studieknep Engelska - Demo\data\pcm\44.wav" alias ArticleEditor", (nil), 0, (nil)) trace:mci:MCI_LoadMciDriver wDevID=0001 trace:mciwave:MCIWAVE_DriverProc (00000000, 0x7c8d7d00, 00000001, 00000000, 00000000) trace:mciwave:MCIWAVE_DriverProc (00000000, 0x7c8d7d00, 00000002, 00000000, 00000000) trace:mciwave:MCIWAVE_DriverProc (00000000, 0x7c8d7d00, 00000003, 00000000, 00000000) trace:mciwave:MCIWAVE_DriverProc (00000000, 0x7e7077d0, 00000003, 00000000, 7FC1E934) trace:mci:mciSetDriverData (0001, 7e7078e8) trace:mci:MCI_LoadMciDriver Loaded driver 0x7e7077d0 (L"WAVEAUDIO"), type is 522, cmdTable=0000ffff trace:mci:MCI_LoadMciDriver mcidev=1, uDevTyp=020A wDeviceID=0001 ! trace:mci:MCI_SetCommandTable (0x7fb1a89c, 0) trace:mci:MCI_IsCommandTableValid Dumping cmdTbl=0 [lpTable=0x7fb1a89c devType=0] trace:mci:MCI_GetCommandTable => 0 trace:mci:MCI_SetCommandTable (0x7fb1c720, 522) trace:mci:MCI_IsCommandTableValid Dumping cmdTbl=1 [lpTable=0x7fb1c720 devType=522] trace:mci:MCI_GetCommandTable => 1 trace:mci:mciSendStringW verb=L"open" on dev=L"c:\program files\studieknep engelska - demo\data\pcm\44.wav"; offset=2 trace:mci:MCI_ParseOptArgs args=L"alias articleeditor" offset=2 trace:mci:mciSendStringW [1, MCI_OPEN, 00000600, 00000000/(null) 00000000/(null) 00000000/(null) 7e70783c/L"c:\program files\studieknep engelska - demo\data\pcm\44.wav" 7e7078c2/L"articleeditor" 00000000/(null)] trace:mciwave:MCIWAVE_DriverProc (00000001, 0x7e7077d0, 00000801, 00000600, 7FC1EB0C) trace:mci:mciGetDriverData (0001) trace:mciwave:WAVE_mciOpen (0001, 00000600, 0x7fc1eb0c) trace:mciwave:WAVE_mciOpen wDevID=0001 (lpParams->wDeviceID=00000001) trace:mciwave:WAVE_mciOpen MCI_OPEN_ELEMENT L"c:\program files\studieknep engelska - demo\data\pcm\44.wav"! trace:mciwave:WAVE_mciOpen ParentChunk ckid=RIFF fccType=WAVE cksize=00000030 trace:mciwave:WAVE_mciReadFmt Chunk Found ckid=fmt fccType= cksize=00000010 trace:mciwave:WAVE_mciReadFmt wFormatTag=0001 ! trace:mciwave:WAVE_mciReadFmt nChannels=1 trace:mciwave:WAVE_mciReadFmt nSamplesPerSec=44100 trace:mciwave:WAVE_mciReadFmt nAvgBytesPerSec=88200 trace:mciwave:WAVE_mciReadFmt nBlockAlign=2 trace:mciwave:WAVE_mciReadFmt wBitsPerSample=16 ! trace:mciwave:WAVE_mciReadFmt Chunk Found ckid=data fccType= cksize=00000000 trace:mciwave:WAVE_mciReadFmt nChannels=1 nSamplesPerSec=44100 trace:mciwave:WAVE_mciOpen hFile=0x1 trace:mci:mciSendStringW => 1/ 0 ((null)) trace:mci:mciSendStringW => 2/ 0 ((null)) trace:mci:mciSendStringW (L"record ArticleEditor", (nil), 0, (nil)) trace:mci:mciSendStringW verb=L"record" on dev=L"articleeditor"; offset=1 trace:mci:mciSendStringW [1, MCI_RECORD, 00000000, 00000000/(null) 00000000/(null) 00000000/(null) 00000000/(null) 00000000/(null) 00000000/(null)] trace:mciwave:MCIWAVE_DriverProc (00000001, 0x7e7077d0, 0000080F, 00000000, 7FC1EB0C) trace:mci:mciGetDriverData (0001) trace:mciwave:WAVE_mciRecord (1, 00000000, 0x7fc1eb0c); trace:mci:mciSendStringW => 1/ 0 ((null)) trace:mci:mciSendStringW => 2/ 0 ((null)) trace:mciwave:MCI_SCAStarter In thread before async command (00000001,2063,00000000,7e707720) trace:mci:mciSendCommandA (00000001, MCI_RECORD, 00000002, 7e707720) trace:mci:mciSendCommandW (00000001, MCI_RECORD, 00000002, 7e707720) trace:mciwave:MCIWAVE_DriverProc (00000001, 0x7e7077d0, 0000080F, 00000002, 7E707720) trace:mci:mciGetDriverData (0001) trace:mciwave:WAVE_mciRecord (1, 00000002, 0x7e707720); fixme:mciwave:WAVE_mciRecord Should descend into data chunk. Please report. trace:mciwave:WAVE_mciRecord Recording from byte=0 to byte=4294967295 trace:mciwave:WAVE_mciRecord Can't open low level audio device 32 trace:mci:mciSendCommandW => 00000109 trace:mciwave:MCI_SCAStarter In thread after async command (00000001,2063,00000000,7e707720) trace:mci:mciSendStringW (L"stop ArticleEditor", (nil), 0, (nil)) trace:mci:mciSendStringW verb=L"stop" on dev=L"articleeditor"; offset=1 trace:mci:mciSendStringW [1, MCI_STOP, 00000000, 00000000/(null) 00000000/(null) 00000000/(null) 00000000/(null) 00000000/(null) 00000000/(null)] trace:mciwave:MCIWAVE_DriverProc (00000001, 0x7e7077d0, 00000808, 00000000, 7FC1EB18) trace:mci:mciGetDriverData (0001) trace:mciwave:WAVE_mciStop (1, 00000000, 0x7fc1eb18); trace:mci:mciSendStringW => 1/ 0 ((null)) trace:mci:mciSendStringW => 2/ 0 ((null)) trace:mci:mciSendStringW (L"save ArticleEditor "C:\Program Files\Studieknep Engelska - Demo\Tal\0000.wav"", (nil), 0, (nil)) trace:mci:mciSendStringW verb=L"save" on dev=L"articleeditor"; offset=1 trace:mci:MCI_ParseOptArgs args=L""c:\program files\studieknep engelska - demo\tal\0000.wav"" offset=1 trace:mci:mciSendStringW [1, MCI_SAVE, 00000100, 00000000/(null) 7c8dc178/L"c:\program files\studieknep engelska - demo\tal\0000.wav" 00000000/(null) 00000000/(null) 00000000/(null) 00000000/(null)] trace:mciwave:MCIWAVE_DriverProc (00000001, 0x7e7077d0, 00000813, 00000100, 7FC1EAFC) trace:mci:mciGetDriverData (0001) trace:mciwave:WAVE_mciSave 1, 00000100, 0x7fc1eafc); trace:mci:mciSendStringW => 1/ 0 ((null)) trace:mci:mciSendStringW => 2/ 0 ((null)) trace:mci:mciSendStringW (L"close ArticleEditor", (nil), 0, (nil)) trace:mci:mciSendStringW verb=L"close" on dev=L"articleeditor"; offset=1 trace:mci:mciSendStringW [1, MCI_CLOSE, 00000000, 00000000/(null) 00000000/(null) 00000000/(null) 00000000/(null) 00000000/(null) 00000000/(null)] trace:mci:MCI_Close (0001, 00000000, 0x7fc1f784) trace:mciwave:MCIWAVE_DriverProc (00000001, 0x7e7077d0, 00000802, 00000000, 7FC1F784) trace:mci:mciGetDriverData (0001) trace:mciwave:WAVE_mciClose (1, 00000000, 0x7fc1f784); trace:mciwave:MCIWAVE_DriverProc (00000001, 0x7e7077d0, 00000004, 00000000, 00000000) trace:mci:mciGetDriverData (0001) trace:mci:mciSetDriverData (0001, 00000000) trace:mciwave:MCIWAVE_DriverProc (FFFFFFFF, 0x7c8d7d00, 00000004, 00000000, 00000000) trace:mci:mciGetDriverData (ffffffff) warn:mci:mciGetDriverData Bad uDeviceID trace:mciwave:MCIWAVE_DriverProc (00000000, 0x7c8d7d00, 00000005, 00000000, 00000000) trace:mciwave:MCIWAVE_DriverProc (00000000, 0x7c8d7d00, 00000006, 00000000, 00000000) trace:mci:mciSendStringW => 1/ 0 ((null)) trace:mci:mciSendStringW => 2/ 0 ((null)) trace:mci:mciSendStringW (L"close ArticleEditor", (nil), 0, (nil)) trace:mci:mciSendStringW (L"open articleeditor wait", (nil), 0, (nil)) trace:mci:MCI_LoadMciDriver wDevID=0001 fixme:mci:MCI_LoadMciDriver Couldn't load driver for type L"ARTICLEEDITOR". If you don't have a windows installation accessible from Wine, you perhaps forgot to create a [mci] section in system.ini fixme:ole:CoRegisterMessageFilter stub trace:mci:MCI_Close (ffff, 00000002, (nil))
Regards,
Peter Åstrand wrote:
On Mon, 21 Nov 2005, Eric Pouech wrote:
Peter Åstrand wrote:
Any ideas?
does this help (lines in patch are likely to be wrapped)?
Well, sort of. The error message is gone; MCIERR_UNRECOGNIZED_COMMAND is not returned any more.
However, something else is wrong: No recording file is saved. There should be a file called 0000.wav in the "Tal" directory, but no such file exists after recording. Here's the trace:Windows?
the main point is that we're now opening the files readonly (for playback) instead of read/write, and we don't open them writable for record command. A+