1998-10-11 16:14:24 +02:00
|
|
|
/* -*- tab-width: 8; c-basic-offset: 4 -*- */
|
2002-06-01 01:06:46 +02:00
|
|
|
/*
|
1998-01-18 19:01:49 +01:00
|
|
|
* Sample Wine Driver for Open Sound System (featured in Linux and FreeBSD)
|
Release 940420
Wed Apr 20 14:53:35 1994 Bob Amstadt (bob@pooh)
* [tools/build.c] [if1632/call.S] [if1632/Imakefile]
Fixed bug for non-Linux systems.
Apr 18, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [windows/win.c]
Bug fixed in CreateWindowEx() : Now use SetMenu() for menubar setup.
New empty stub for function SetSysModalWindow().
* [misc/exec.c]
New empty stub for function ExitWindows().
* [objects/font.c]
New empty stub for function EnumFonts().
* New file [misc/property.c]
New functions RemoveProp(), GetProp(), SetProp() & EnumProps().
* New file [misc/shell.c]
New empty stubs for function RegisterShellProc(),
ShellExecute() & ShellProc().
* New files [loader/task.c] & [include/task.h]
Move functions GetWindowTask(), GetNumTask(), EnumTaskWindows()
from 'loader/library.c'.
* [if1632/user.c] [if1632/kernel.c]
Put Atoms functions entries.
* [controls/combo.c]
New functions DirDlgSelectComboBox() & DirDlgListComboBox().
* [controls/listbox.c]
New functions DirDlgSelect() & DirDlgList().
Sun Apr 17 20:57:59 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [objects/test.c]
GrayString() added.
* [if1632/callback.c]
CallGrayStringProc() added.
* [if1632/relay.c] [if1632/mmsystem.spec]
Added.
* [if1632/kernel.spec] [if1632/user.spec]
Added forgotten specs for atom functions.
Tue Apr 12 00:05:31 1994 Bob Amstadt (bob@pooh)
* misc/spy.c (SpyInit): Added more message types
* [windows/mdi.c] [include/mdi.h]
Maximizing and restoring child windows.
Tiling of child windows.
Mon Apr 11 20:48:28 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
* [windows/winpos.c]
Revert focus and activation to previous window when hiding a window.
* [windows/syscolor.c]
Implemented system color objects (brushes and pens created at
SetSysColor() time for better performance).
* [windows/graphics.c] [windows/nonclient.c] [controls/button.c]
Changed painting code to use system color objects.
* [windows/message.c]
New function MSG_InternalGetMessage() for internal messages
loops (e.g. for dialogs or menus).
* [windows/hook.c] [include/hook.h] (New files)
Beginning of the window hooks implementation.
* [windows/dialog.c]
Use new function MSG_InternalGetMessage() in DialogBox().
* [if1632/callback.c]
Added function CallHookProc().
Apr 11, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [windows/event.c]
Bug fix : WM_CHARs are sent to focused window like WM_KEY???.
* [misc/exec.c]
Nothing much more than a stub for LoadModule(), I saw there a lot
to be done in that corner, I will come back later ...
* [loader/library.c]
New functions GetWindowTask(), GetNumTask(), EnumTaskWindows()
and associated modules & tasks linked-lists.
(it's only an 'emerging bud', more to come next weeks).
* [loader/wine.c]
Use LoadLibrary() instead of LoadImage() for 'sysres.dll'.
* [control/menu.c]
You can now click outside menu region without problem.
Keyboard navig more smootly, even if a child has the focus.
Bug fix in InsertItem(), (bad linklist when insert point not found).
change Realloc for Free & Alloc in ModifyItem().
MF_STRING now set BLACK_PEN to fix bug of bad color of the underscores
done by DrawText(), (maybe it should done in DrawText() itself ?).
Sun Apr 10 14:06:08 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/profile.c]
.INI files will now be stored in / loaded from the windows dir
if no path is supplied.
* [if1632/kernel.spec]
Fixed GetDriveType's prototype.
* [if1632/winsock.spec] [include/winsock.h] [misc/winsocket.c]
Fixed prototypes: winsock uses a word as socket handle not an int.
* [misc/winsocket.c]
Added heap allocation for returned structures.
Added non-blocking WSAAsyncGetXbyY() functions as blocking ones.
* [loader/wine.c]
Added IsDLLLoaded(), used in LoadImage() to prevent loading
a dll multiple times.
Directory is added to wine's path when a fullpath is supplied when
starting wine.
LoadImage(): DLL filename used instead DLL's own internal name,
fixes 'Bad DLL name' errors.
Sat Apr 9 08:26:03 1994 David Metcalfe <david@prism.demon.co.uk>
* [controls/edit.c] [controls/widgets.c]
First release of edit control.
1994-04-21 03:20:00 +02:00
|
|
|
*
|
|
|
|
* Copyright 1994 Martin Ayotte
|
2000-06-24 19:54:43 +02:00
|
|
|
* 1999 Eric Pouech (async playing in waveOut/waveIn)
|
2000-05-10 00:35:47 +02:00
|
|
|
* 2000 Eric Pouech (loops in waveOut)
|
2002-10-07 20:23:40 +02:00
|
|
|
* 2002 Eric Pouech (full duplex)
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
*/
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
/*
|
|
|
|
* FIXME:
|
2001-12-21 21:28:43 +01:00
|
|
|
* pause in waveOut does not work correctly in loop mode
|
2003-03-04 03:11:21 +01:00
|
|
|
* Direct Sound Capture driver does not work (not complete yet)
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
*/
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
|
1999-04-11 14:16:24 +02:00
|
|
|
/*#define EMULATE_SB16*/
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
|
2002-08-26 23:49:42 +02:00
|
|
|
/* unless someone makes a wineserver kernel module, Unix pipes are faster than win32 events */
|
|
|
|
#define USE_PIPE_SYNC
|
|
|
|
|
|
|
|
/* an exact wodGetPosition is usually not worth the extra context switches,
|
|
|
|
* as we're going to have near fragment accuracy anyway */
|
2004-03-12 20:43:44 +01:00
|
|
|
#define EXACT_WODPOSITION
|
|
|
|
#define EXACT_WIDPOSITION
|
2002-08-26 23:49:42 +02:00
|
|
|
|
1999-10-31 03:07:54 +01:00
|
|
|
#include "config.h"
|
2003-08-30 00:12:15 +02:00
|
|
|
#include "wine/port.h"
|
1999-10-31 03:07:54 +01:00
|
|
|
|
1994-10-17 19:12:41 +01:00
|
|
|
#include <stdlib.h>
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
2000-02-10 20:03:02 +01:00
|
|
|
#include <stdio.h>
|
1999-02-28 13:27:56 +01:00
|
|
|
#include <string.h>
|
2002-08-17 02:43:16 +02:00
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
# include <unistd.h>
|
|
|
|
#endif
|
1998-03-15 21:29:56 +01:00
|
|
|
#include <errno.h>
|
1994-10-17 19:12:41 +01:00
|
|
|
#include <fcntl.h>
|
2002-05-22 03:55:18 +02:00
|
|
|
#ifdef HAVE_SYS_IOCTL_H
|
|
|
|
# include <sys/ioctl.h>
|
|
|
|
#endif
|
2000-07-15 23:33:38 +02:00
|
|
|
#ifdef HAVE_SYS_MMAN_H
|
|
|
|
# include <sys/mman.h>
|
|
|
|
#endif
|
2002-08-26 23:49:42 +02:00
|
|
|
#ifdef HAVE_SYS_POLL_H
|
|
|
|
# include <sys/poll.h>
|
|
|
|
#endif
|
|
|
|
|
2000-02-10 20:03:02 +01:00
|
|
|
#include "windef.h"
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "winbase.h"
|
2000-02-10 20:03:02 +01:00
|
|
|
#include "wingdi.h"
|
2000-06-24 14:55:33 +02:00
|
|
|
#include "winerror.h"
|
1999-01-01 19:57:33 +01:00
|
|
|
#include "wine/winuser16.h"
|
1999-09-05 18:44:38 +02:00
|
|
|
#include "mmddk.h"
|
2000-06-24 14:55:33 +02:00
|
|
|
#include "dsound.h"
|
|
|
|
#include "dsdriver.h"
|
1999-09-05 18:44:38 +02:00
|
|
|
#include "oss.h"
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
1994-10-17 19:12:41 +01:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(wave);
|
1999-04-19 16:56:29 +02:00
|
|
|
|
1999-12-04 04:58:37 +01:00
|
|
|
/* Allow 1% deviation for sample rates (some ES137x cards) */
|
1999-12-25 23:55:40 +01:00
|
|
|
#define NEAR_MATCH(rate1,rate2) (((100*((int)(rate1)-(int)(rate2)))/(rate1))==0)
|
1999-12-04 04:58:37 +01:00
|
|
|
|
1998-01-18 19:01:49 +01:00
|
|
|
#ifdef HAVE_OSS
|
1998-04-13 14:21:30 +02:00
|
|
|
|
2003-03-15 01:54:11 +01:00
|
|
|
#define MAX_WAVEDRV (6)
|
1994-07-07 18:23:58 +02:00
|
|
|
|
1999-04-11 14:16:24 +02:00
|
|
|
/* state diagram for waveOut writing:
|
|
|
|
*
|
1999-05-24 10:19:48 +02:00
|
|
|
* +---------+-------------+---------------+---------------------------------+
|
|
|
|
* | state | function | event | new state |
|
|
|
|
* +---------+-------------+---------------+---------------------------------+
|
|
|
|
* | | open() | | STOPPED |
|
|
|
|
* | PAUSED | write() | | PAUSED |
|
|
|
|
* | STOPPED | write() | <thrd create> | PLAYING |
|
|
|
|
* | PLAYING | write() | HEADER | PLAYING |
|
|
|
|
* | (other) | write() | <error> | |
|
|
|
|
* | (any) | pause() | PAUSING | PAUSED |
|
|
|
|
* | PAUSED | restart() | RESTARTING | PLAYING (if no thrd => STOPPED) |
|
|
|
|
* | (any) | reset() | RESETTING | STOPPED |
|
|
|
|
* | (any) | close() | CLOSING | CLOSED |
|
|
|
|
* +---------+-------------+---------------+---------------------------------+
|
1999-04-11 14:16:24 +02:00
|
|
|
*/
|
|
|
|
|
1999-05-24 10:19:48 +02:00
|
|
|
/* states of the playing device */
|
1999-04-11 14:16:24 +02:00
|
|
|
#define WINE_WS_PLAYING 0
|
|
|
|
#define WINE_WS_PAUSED 1
|
|
|
|
#define WINE_WS_STOPPED 2
|
1999-05-24 10:19:48 +02:00
|
|
|
#define WINE_WS_CLOSED 3
|
|
|
|
|
|
|
|
/* events to be send to device */
|
2001-12-14 23:44:29 +01:00
|
|
|
enum win_wm_message {
|
|
|
|
WINE_WM_PAUSING = WM_USER + 1, WINE_WM_RESTARTING, WINE_WM_RESETTING, WINE_WM_HEADER,
|
2003-03-07 21:37:25 +01:00
|
|
|
WINE_WM_UPDATE, WINE_WM_BREAKLOOP, WINE_WM_CLOSING, WINE_WM_STARTING, WINE_WM_STOPPING
|
2001-12-14 23:44:29 +01:00
|
|
|
};
|
1999-04-11 14:16:24 +02:00
|
|
|
|
2002-08-26 23:49:42 +02:00
|
|
|
#ifdef USE_PIPE_SYNC
|
|
|
|
#define SIGNAL_OMR(omr) do { int x = 0; write((omr)->msg_pipe[1], &x, sizeof(x)); } while (0)
|
|
|
|
#define CLEAR_OMR(omr) do { int x = 0; read((omr)->msg_pipe[0], &x, sizeof(x)); } while (0)
|
|
|
|
#define RESET_OMR(omr) do { } while (0)
|
|
|
|
#define WAIT_OMR(omr, sleep) \
|
|
|
|
do { struct pollfd pfd; pfd.fd = (omr)->msg_pipe[0]; \
|
|
|
|
pfd.events = POLLIN; poll(&pfd, 1, sleep); } while (0)
|
|
|
|
#else
|
|
|
|
#define SIGNAL_OMR(omr) do { SetEvent((omr)->msg_event); } while (0)
|
|
|
|
#define CLEAR_OMR(omr) do { } while (0)
|
|
|
|
#define RESET_OMR(omr) do { ResetEvent((omr)->msg_event); } while (0)
|
|
|
|
#define WAIT_OMR(omr, sleep) \
|
|
|
|
do { WaitForSingleObject((omr)->msg_event, sleep); } while (0)
|
|
|
|
#endif
|
|
|
|
|
2000-10-23 01:43:15 +02:00
|
|
|
typedef struct {
|
2001-12-14 23:44:29 +01:00
|
|
|
enum win_wm_message msg; /* message identifier */
|
|
|
|
DWORD param; /* parameter for this message */
|
|
|
|
HANDLE hEvent; /* if message is synchronous, handle of event for synchro */
|
2001-11-12 16:55:37 +01:00
|
|
|
} OSS_MSG;
|
|
|
|
|
2002-06-01 01:06:46 +02:00
|
|
|
/* implement an in-process message ring for better performance
|
2001-11-12 16:55:37 +01:00
|
|
|
* (compared to passing thru the server)
|
2001-12-14 23:44:29 +01:00
|
|
|
* this ring will be used by the input (resp output) record (resp playback) routine
|
2001-11-12 16:55:37 +01:00
|
|
|
*/
|
2003-06-04 22:28:04 +02:00
|
|
|
#define OSS_RING_BUFFER_INCREMENT 64
|
2001-11-12 16:55:37 +01:00
|
|
|
typedef struct {
|
2003-06-04 22:28:04 +02:00
|
|
|
int ring_buffer_size;
|
|
|
|
OSS_MSG * messages;
|
2001-11-12 16:55:37 +01:00
|
|
|
int msg_tosave;
|
|
|
|
int msg_toget;
|
2002-08-26 23:49:42 +02:00
|
|
|
#ifdef USE_PIPE_SYNC
|
|
|
|
int msg_pipe[2];
|
|
|
|
#else
|
2001-11-12 16:55:37 +01:00
|
|
|
HANDLE msg_event;
|
2002-08-26 23:49:42 +02:00
|
|
|
#endif
|
2001-11-12 16:55:37 +01:00
|
|
|
CRITICAL_SECTION msg_crst;
|
|
|
|
} OSS_MSG_RING;
|
2000-10-23 01:43:15 +02:00
|
|
|
|
2002-10-07 20:23:40 +02:00
|
|
|
typedef struct tagOSS_DEVICE {
|
2003-03-15 01:54:11 +01:00
|
|
|
char dev_name[32];
|
|
|
|
char mixer_name[32];
|
2002-10-07 20:23:40 +02:00
|
|
|
unsigned open_count;
|
|
|
|
WAVEOUTCAPSA out_caps;
|
2003-03-04 03:11:21 +01:00
|
|
|
WAVEINCAPSA in_caps;
|
|
|
|
DWORD in_caps_support;
|
2002-10-07 20:23:40 +02:00
|
|
|
unsigned open_access;
|
|
|
|
int fd;
|
|
|
|
DWORD owner_tid;
|
2003-01-16 01:19:04 +01:00
|
|
|
int sample_rate;
|
|
|
|
int stereo;
|
|
|
|
int format;
|
2002-10-07 20:23:40 +02:00
|
|
|
unsigned audio_fragment;
|
|
|
|
BOOL full_duplex;
|
2002-10-09 22:37:09 +02:00
|
|
|
BOOL bTriggerSupport;
|
2003-03-07 21:37:25 +01:00
|
|
|
BOOL bOutputEnabled;
|
|
|
|
BOOL bInputEnabled;
|
2003-03-15 01:54:11 +01:00
|
|
|
DSDRIVERDESC ds_desc;
|
|
|
|
DSDRIVERCAPS ds_caps;
|
|
|
|
DSCDRIVERCAPS dsc_caps;
|
|
|
|
GUID ds_guid;
|
|
|
|
GUID dsc_guid;
|
2002-10-07 20:23:40 +02:00
|
|
|
} OSS_DEVICE;
|
|
|
|
|
|
|
|
static OSS_DEVICE OSS_Devices[MAX_WAVEDRV];
|
|
|
|
|
1994-07-07 18:23:58 +02:00
|
|
|
typedef struct {
|
2002-10-07 20:23:40 +02:00
|
|
|
OSS_DEVICE* ossdev;
|
1999-05-24 10:19:48 +02:00
|
|
|
volatile int state; /* one of the WINE_WS_ manifest constants */
|
2001-12-14 23:44:29 +01:00
|
|
|
WAVEOPENDESC waveDesc;
|
|
|
|
WORD wFlags;
|
|
|
|
PCMWAVEFORMAT format;
|
2003-10-31 00:08:46 +01:00
|
|
|
DWORD volume;
|
2001-12-14 23:44:29 +01:00
|
|
|
|
|
|
|
/* OSS information */
|
1999-05-24 10:19:48 +02:00
|
|
|
DWORD dwFragmentSize; /* size of OSS buffer fragment */
|
2001-12-14 23:44:29 +01:00
|
|
|
DWORD dwBufferSize; /* size of whole OSS buffer in bytes */
|
2000-05-10 00:35:47 +02:00
|
|
|
LPWAVEHDR lpQueuePtr; /* start of queued WAVEHDRs (waiting to be notified) */
|
|
|
|
LPWAVEHDR lpPlayPtr; /* start of not yet fully played buffers */
|
2001-12-14 23:44:29 +01:00
|
|
|
DWORD dwPartialOffset; /* Offset of not yet written bytes in lpPlayPtr */
|
2001-11-09 21:26:59 +01:00
|
|
|
|
2000-05-10 00:35:47 +02:00
|
|
|
LPWAVEHDR lpLoopPtr; /* pointer of first buffer in loop, if any */
|
2001-02-12 02:24:18 +01:00
|
|
|
DWORD dwLoops; /* private copy of loop counter */
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2001-12-14 23:44:29 +01:00
|
|
|
DWORD dwPlayedTotal; /* number of bytes actually played since opening */
|
|
|
|
DWORD dwWrittenTotal; /* number of bytes written to OSS buffer since opening */
|
2002-08-26 23:49:42 +02:00
|
|
|
BOOL bNeedPost; /* whether audio still needs to be physically started */
|
1999-05-24 10:19:48 +02:00
|
|
|
|
|
|
|
/* synchronization stuff */
|
2001-11-12 16:55:37 +01:00
|
|
|
HANDLE hStartUpEvent;
|
1999-05-24 10:19:48 +02:00
|
|
|
HANDLE hThread;
|
|
|
|
DWORD dwThreadID;
|
2001-11-12 16:55:37 +01:00
|
|
|
OSS_MSG_RING msgRing;
|
1998-10-11 16:14:24 +02:00
|
|
|
} WINE_WAVEOUT;
|
1994-07-07 18:23:58 +02:00
|
|
|
|
|
|
|
typedef struct {
|
2002-10-07 20:23:40 +02:00
|
|
|
OSS_DEVICE* ossdev;
|
1999-04-11 14:16:24 +02:00
|
|
|
volatile int state;
|
1999-09-22 18:45:33 +02:00
|
|
|
DWORD dwFragmentSize; /* OpenSound '/dev/dsp' give us that size */
|
1998-10-11 16:14:24 +02:00
|
|
|
WAVEOPENDESC waveDesc;
|
|
|
|
WORD wFlags;
|
1999-04-11 14:16:24 +02:00
|
|
|
PCMWAVEFORMAT format;
|
2000-06-24 19:54:43 +02:00
|
|
|
LPWAVEHDR lpQueuePtr;
|
1998-10-11 16:14:24 +02:00
|
|
|
DWORD dwTotalRecorded;
|
2004-03-12 20:43:44 +01:00
|
|
|
DWORD dwTotalRead;
|
2000-06-24 19:54:43 +02:00
|
|
|
|
|
|
|
/* synchronization stuff */
|
|
|
|
HANDLE hThread;
|
|
|
|
DWORD dwThreadID;
|
2001-11-12 16:55:37 +01:00
|
|
|
HANDLE hStartUpEvent;
|
|
|
|
OSS_MSG_RING msgRing;
|
1998-10-11 16:14:24 +02:00
|
|
|
} WINE_WAVEIN;
|
1994-07-07 18:23:58 +02:00
|
|
|
|
2002-06-28 19:31:31 +02:00
|
|
|
static WINE_WAVEOUT WOutDev [MAX_WAVEDRV];
|
|
|
|
static WINE_WAVEIN WInDev [MAX_WAVEDRV];
|
|
|
|
static unsigned numOutDev;
|
|
|
|
static unsigned numInDev;
|
1998-10-11 16:14:24 +02:00
|
|
|
|
2000-06-24 14:55:33 +02:00
|
|
|
static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv);
|
2003-02-15 00:59:15 +01:00
|
|
|
static DWORD widDsCreate(UINT wDevID, PIDSCDRIVER* drv);
|
2003-03-15 01:54:11 +01:00
|
|
|
static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc);
|
|
|
|
static DWORD widDsDesc(UINT wDevID, PDSDRIVERDESC desc);
|
|
|
|
static DWORD wodDsGuid(UINT wDevID, LPGUID pGuid);
|
|
|
|
static DWORD widDsGuid(UINT wDevID, LPGUID pGuid);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2001-11-09 21:26:59 +01:00
|
|
|
/* These strings used only for tracing */
|
|
|
|
static const char *wodPlayerCmdString[] = {
|
|
|
|
"WINE_WM_PAUSING",
|
|
|
|
"WINE_WM_RESTARTING",
|
|
|
|
"WINE_WM_RESETTING",
|
2001-12-14 23:44:29 +01:00
|
|
|
"WINE_WM_HEADER",
|
|
|
|
"WINE_WM_UPDATE",
|
|
|
|
"WINE_WM_BREAKLOOP",
|
2002-01-12 22:15:08 +01:00
|
|
|
"WINE_WM_CLOSING",
|
2003-03-07 21:37:25 +01:00
|
|
|
"WINE_WM_STARTING",
|
|
|
|
"WINE_WM_STOPPING",
|
2001-12-14 23:44:29 +01:00
|
|
|
};
|
2000-06-24 14:55:33 +02:00
|
|
|
|
2003-03-07 21:37:25 +01:00
|
|
|
static int getEnables(OSS_DEVICE *ossdev)
|
|
|
|
{
|
|
|
|
return ( (ossdev->bOutputEnabled ? PCM_ENABLE_OUTPUT : 0) |
|
|
|
|
(ossdev->bInputEnabled ? PCM_ENABLE_INPUT : 0) );
|
|
|
|
}
|
|
|
|
|
2003-10-28 01:15:16 +01:00
|
|
|
static DWORD wdDevInterfaceSize(UINT wDevID, LPDWORD dwParam1)
|
|
|
|
{
|
|
|
|
TRACE("(%u, %p)\n", wDevID, dwParam1);
|
|
|
|
|
|
|
|
*dwParam1 = MultiByteToWideChar(CP_ACP, 0, OSS_Devices[wDevID].dev_name, -1,
|
|
|
|
NULL, 0 ) * sizeof(WCHAR);
|
|
|
|
return MMSYSERR_NOERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD wdDevInterface(UINT wDevID, PWCHAR dwParam1, DWORD dwParam2)
|
|
|
|
{
|
|
|
|
if (dwParam2 >= MultiByteToWideChar(CP_ACP, 0, OSS_Devices[wDevID].dev_name, -1,
|
|
|
|
NULL, 0 ) * sizeof(WCHAR))
|
|
|
|
{
|
|
|
|
MultiByteToWideChar(CP_ACP, 0, OSS_Devices[wDevID].dev_name, -1,
|
|
|
|
dwParam1, dwParam2 / sizeof(WCHAR));
|
|
|
|
return MMSYSERR_NOERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
return MMSYSERR_INVALPARAM;
|
|
|
|
}
|
|
|
|
|
1998-11-24 19:24:47 +01:00
|
|
|
/*======================================================================*
|
2000-10-23 01:43:15 +02:00
|
|
|
* Low level WAVE implementation *
|
1998-11-24 19:24:47 +01:00
|
|
|
*======================================================================*/
|
2002-06-28 19:31:31 +02:00
|
|
|
|
2002-10-07 20:23:40 +02:00
|
|
|
/******************************************************************
|
|
|
|
* OSS_RawOpenDevice
|
|
|
|
*
|
|
|
|
* Low level device opening (from values stored in ossdev)
|
|
|
|
*/
|
2003-01-08 00:08:05 +01:00
|
|
|
static DWORD OSS_RawOpenDevice(OSS_DEVICE* ossdev, int strict_format)
|
2002-10-07 20:23:40 +02:00
|
|
|
{
|
2003-01-16 01:19:04 +01:00
|
|
|
int fd, val, rc;
|
2003-03-15 01:54:11 +01:00
|
|
|
TRACE("(%p,%d)\n",ossdev,strict_format);
|
2002-10-07 20:23:40 +02:00
|
|
|
|
|
|
|
if ((fd = open(ossdev->dev_name, ossdev->open_access|O_NDELAY, 0)) == -1)
|
|
|
|
{
|
2002-10-09 22:37:09 +02:00
|
|
|
WARN("Couldn't open %s (%s)\n", ossdev->dev_name, strerror(errno));
|
|
|
|
return (errno == EBUSY) ? MMSYSERR_ALLOCATED : MMSYSERR_ERROR;
|
2002-10-07 20:23:40 +02:00
|
|
|
}
|
|
|
|
fcntl(fd, F_SETFD, 1); /* set close on exec flag */
|
|
|
|
/* turn full duplex on if it has been requested */
|
2003-03-15 01:54:11 +01:00
|
|
|
if (ossdev->open_access == O_RDWR && ossdev->full_duplex) {
|
|
|
|
rc = ioctl(fd, SNDCTL_DSP_SETDUPLEX, 0);
|
2003-04-05 07:09:57 +02:00
|
|
|
/* on *BSD, as full duplex is always enabled by default, this ioctl
|
|
|
|
* will fail with EINVAL
|
|
|
|
* so, we don't consider EINVAL an error here
|
|
|
|
*/
|
|
|
|
if (rc != 0 && errno != EINVAL) {
|
2003-03-15 01:54:11 +01:00
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_SETDUPLEX) failed (%s)\n", ossdev->dev_name, strerror(errno));
|
2003-05-11 05:30:51 +02:00
|
|
|
goto error2;
|
2003-03-15 01:54:11 +01:00
|
|
|
}
|
|
|
|
}
|
2002-06-28 19:31:31 +02:00
|
|
|
|
2003-03-15 01:54:11 +01:00
|
|
|
if (ossdev->audio_fragment) {
|
|
|
|
rc = ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &ossdev->audio_fragment);
|
|
|
|
if (rc != 0) {
|
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_SETFRAGMENT) failed (%s)\n", ossdev->dev_name, strerror(errno));
|
2003-05-11 05:30:51 +02:00
|
|
|
goto error2;
|
2003-03-15 01:54:11 +01:00
|
|
|
}
|
2002-10-07 20:23:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* First size and stereo then samplerate */
|
2003-01-16 01:19:04 +01:00
|
|
|
if (ossdev->format>=0)
|
2002-10-07 20:23:40 +02:00
|
|
|
{
|
|
|
|
val = ossdev->format;
|
2003-01-16 01:19:04 +01:00
|
|
|
rc = ioctl(fd, SNDCTL_DSP_SETFMT, &ossdev->format);
|
|
|
|
if (rc != 0 || val != ossdev->format) {
|
2003-01-08 00:08:05 +01:00
|
|
|
TRACE("Can't set format to %d (returned %d)\n", val, ossdev->format);
|
|
|
|
if (strict_format)
|
|
|
|
goto error;
|
2002-11-04 23:39:19 +01:00
|
|
|
}
|
2002-10-07 20:23:40 +02:00
|
|
|
}
|
2003-01-16 01:19:04 +01:00
|
|
|
if (ossdev->stereo>=0)
|
2002-10-07 20:23:40 +02:00
|
|
|
{
|
|
|
|
val = ossdev->stereo;
|
2003-01-16 01:19:04 +01:00
|
|
|
rc = ioctl(fd, SNDCTL_DSP_STEREO, &ossdev->stereo);
|
|
|
|
if (rc != 0 || val != ossdev->stereo) {
|
2003-01-08 00:08:05 +01:00
|
|
|
TRACE("Can't set stereo to %u (returned %d)\n", val, ossdev->stereo);
|
|
|
|
if (strict_format)
|
|
|
|
goto error;
|
2002-11-04 23:39:19 +01:00
|
|
|
}
|
2002-10-07 20:23:40 +02:00
|
|
|
}
|
2003-01-16 01:19:04 +01:00
|
|
|
if (ossdev->sample_rate>=0)
|
2002-10-07 20:23:40 +02:00
|
|
|
{
|
|
|
|
val = ossdev->sample_rate;
|
2003-01-16 01:19:04 +01:00
|
|
|
rc = ioctl(fd, SNDCTL_DSP_SPEED, &ossdev->sample_rate);
|
|
|
|
if (rc != 0 || !NEAR_MATCH(val, ossdev->sample_rate)) {
|
2003-01-08 00:08:05 +01:00
|
|
|
TRACE("Can't set sample_rate to %u (returned %d)\n", val, ossdev->sample_rate);
|
|
|
|
if (strict_format)
|
|
|
|
goto error;
|
2002-11-04 23:39:19 +01:00
|
|
|
}
|
2002-10-07 20:23:40 +02:00
|
|
|
}
|
2002-10-09 22:37:09 +02:00
|
|
|
ossdev->fd = fd;
|
2003-03-15 01:54:11 +01:00
|
|
|
|
|
|
|
if (ossdev->bTriggerSupport) {
|
|
|
|
int trigger;
|
|
|
|
rc = ioctl(fd, SNDCTL_DSP_GETTRIGGER, &trigger);
|
|
|
|
if (rc != 0) {
|
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_GETTRIGGER) failed (%s)\n",
|
|
|
|
ossdev->dev_name, strerror(errno));
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
|
|
|
|
ossdev->bOutputEnabled = ((trigger & PCM_ENABLE_OUTPUT) == PCM_ENABLE_OUTPUT);
|
|
|
|
ossdev->bInputEnabled = ((trigger & PCM_ENABLE_INPUT) == PCM_ENABLE_INPUT);
|
|
|
|
} else {
|
|
|
|
ossdev->bOutputEnabled = TRUE; /* OSS enables by default */
|
|
|
|
ossdev->bInputEnabled = TRUE; /* OSS enables by default */
|
|
|
|
}
|
2003-03-07 21:37:25 +01:00
|
|
|
|
2003-01-16 01:19:04 +01:00
|
|
|
return MMSYSERR_NOERROR;
|
2002-11-04 23:39:19 +01:00
|
|
|
|
|
|
|
error:
|
|
|
|
close(fd);
|
2003-01-16 01:19:04 +01:00
|
|
|
return WAVERR_BADFORMAT;
|
2003-11-04 05:20:47 +01:00
|
|
|
error2:
|
2003-05-11 05:30:51 +02:00
|
|
|
close(fd);
|
|
|
|
return MMSYSERR_ERROR;
|
2002-10-07 20:23:40 +02:00
|
|
|
}
|
2001-12-21 21:28:43 +01:00
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* OSS_OpenDevice
|
|
|
|
*
|
|
|
|
* since OSS has poor capabilities in full duplex, we try here to let a program
|
|
|
|
* open the device for both waveout and wavein streams...
|
|
|
|
* this is hackish, but it's the way OSS interface is done...
|
|
|
|
*/
|
2003-01-08 00:08:05 +01:00
|
|
|
static DWORD OSS_OpenDevice(OSS_DEVICE* ossdev, unsigned req_access,
|
|
|
|
int* frag, int strict_format,
|
|
|
|
int sample_rate, int stereo, int fmt)
|
2001-12-21 21:28:43 +01:00
|
|
|
{
|
2002-10-09 22:37:09 +02:00
|
|
|
DWORD ret;
|
2003-03-15 01:54:11 +01:00
|
|
|
TRACE("(%p,%u,%p,%d,%d,%d,%x)\n",ossdev,req_access,frag,strict_format,sample_rate,stereo,fmt);
|
2002-10-09 22:37:09 +02:00
|
|
|
|
2002-06-28 19:31:31 +02:00
|
|
|
if (ossdev->full_duplex && (req_access == O_RDONLY || req_access == O_WRONLY))
|
|
|
|
req_access = O_RDWR;
|
|
|
|
|
2002-10-07 20:23:40 +02:00
|
|
|
/* FIXME: this should be protected, and it also contains a race with OSS_CloseDevice */
|
2002-06-28 19:31:31 +02:00
|
|
|
if (ossdev->open_count == 0)
|
2001-12-21 21:28:43 +01:00
|
|
|
{
|
2002-06-28 19:31:31 +02:00
|
|
|
if (access(ossdev->dev_name, 0) != 0) return MMSYSERR_NODRIVER;
|
|
|
|
|
|
|
|
ossdev->audio_fragment = (frag) ? *frag : 0;
|
|
|
|
ossdev->sample_rate = sample_rate;
|
|
|
|
ossdev->stereo = stereo;
|
|
|
|
ossdev->format = fmt;
|
|
|
|
ossdev->open_access = req_access;
|
|
|
|
ossdev->owner_tid = GetCurrentThreadId();
|
2002-10-07 20:23:40 +02:00
|
|
|
|
2003-01-08 00:08:05 +01:00
|
|
|
if ((ret = OSS_RawOpenDevice(ossdev,strict_format)) != MMSYSERR_NOERROR) return ret;
|
2001-12-21 21:28:43 +01:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
else
|
2001-12-21 21:28:43 +01:00
|
|
|
{
|
2002-06-28 19:31:31 +02:00
|
|
|
/* check we really open with the same parameters */
|
|
|
|
if (ossdev->open_access != req_access)
|
2002-01-12 22:15:08 +01:00
|
|
|
{
|
2003-04-10 20:33:46 +02:00
|
|
|
ERR("FullDuplex: Mismatch in access. Your sound device is not full duplex capable.\n");
|
2002-06-28 19:31:31 +02:00
|
|
|
return WAVERR_BADFORMAT;
|
2002-01-12 22:15:08 +01:00
|
|
|
}
|
2003-03-15 01:54:11 +01:00
|
|
|
|
2003-04-10 20:33:46 +02:00
|
|
|
/* check if the audio parameters are the same */
|
|
|
|
if (ossdev->sample_rate != sample_rate ||
|
2002-06-28 19:31:31 +02:00
|
|
|
ossdev->stereo != stereo ||
|
|
|
|
ossdev->format != fmt)
|
|
|
|
{
|
2003-04-10 20:33:46 +02:00
|
|
|
/* This is not a fatal error because MSACM might do the remapping */
|
2002-06-28 19:31:31 +02:00
|
|
|
WARN("FullDuplex: mismatch in PCM parameters for input and output\n"
|
|
|
|
"OSS doesn't allow us different parameters\n"
|
|
|
|
"audio_frag(%x/%x) sample_rate(%d/%d) stereo(%d/%d) fmt(%d/%d)\n",
|
2002-08-09 03:02:25 +02:00
|
|
|
ossdev->audio_fragment, frag ? *frag : 0,
|
2002-06-28 19:31:31 +02:00
|
|
|
ossdev->sample_rate, sample_rate,
|
|
|
|
ossdev->stereo, stereo,
|
|
|
|
ossdev->format, fmt);
|
|
|
|
return WAVERR_BADFORMAT;
|
|
|
|
}
|
2003-04-10 20:33:46 +02:00
|
|
|
/* check if the fragment sizes are the same */
|
|
|
|
if (ossdev->audio_fragment != (frag ? *frag : 0) ) {
|
|
|
|
ERR("FullDuplex: Playback and Capture hardware acceleration levels are different.\n"
|
|
|
|
"Use: \"HardwareAcceleration\" = \"Emulation\" in the [dsound] section of your config file.\n");
|
|
|
|
return WAVERR_BADFORMAT;
|
|
|
|
}
|
2002-06-28 19:31:31 +02:00
|
|
|
if (GetCurrentThreadId() != ossdev->owner_tid)
|
2002-01-12 22:15:08 +01:00
|
|
|
{
|
|
|
|
WARN("Another thread is trying to access audio...\n");
|
2002-06-28 19:31:31 +02:00
|
|
|
return MMSYSERR_ERROR;
|
2002-01-12 22:15:08 +01:00
|
|
|
}
|
2001-12-21 21:28:43 +01:00
|
|
|
}
|
2002-01-12 22:15:08 +01:00
|
|
|
|
2002-06-28 19:31:31 +02:00
|
|
|
ossdev->open_count++;
|
2002-10-07 20:23:40 +02:00
|
|
|
|
2002-06-28 19:31:31 +02:00
|
|
|
return MMSYSERR_NOERROR;
|
2001-12-21 21:28:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* OSS_CloseDevice
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
2002-10-07 20:23:40 +02:00
|
|
|
static void OSS_CloseDevice(OSS_DEVICE* ossdev)
|
2001-12-21 21:28:43 +01:00
|
|
|
{
|
2003-03-15 01:54:11 +01:00
|
|
|
TRACE("(%p)\n",ossdev);
|
2003-01-16 02:16:46 +01:00
|
|
|
if (ossdev->open_count>0) {
|
|
|
|
ossdev->open_count--;
|
|
|
|
} else {
|
|
|
|
WARN("OSS_CloseDevice called too many times\n");
|
|
|
|
}
|
|
|
|
if (ossdev->open_count == 0)
|
2002-12-10 20:06:51 +01:00
|
|
|
{
|
|
|
|
/* reset the device before we close it in case it is in a bad state */
|
|
|
|
ioctl(ossdev->fd, SNDCTL_DSP_RESET, 0);
|
|
|
|
close(ossdev->fd);
|
|
|
|
}
|
2002-10-07 20:23:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* OSS_ResetDevice
|
|
|
|
*
|
|
|
|
* Resets the device. OSS Commercial requires the device to be closed
|
|
|
|
* after a SNDCTL_DSP_RESET ioctl call... this function implements
|
|
|
|
* this behavior...
|
2003-03-07 21:37:25 +01:00
|
|
|
* FIXME: This causes problems when doing full duplex so we really
|
|
|
|
* only reset when not doing full duplex. We need to do this better
|
|
|
|
* someday.
|
2002-10-07 20:23:40 +02:00
|
|
|
*/
|
2002-10-09 22:37:09 +02:00
|
|
|
static DWORD OSS_ResetDevice(OSS_DEVICE* ossdev)
|
2002-10-07 20:23:40 +02:00
|
|
|
{
|
2003-03-07 21:37:25 +01:00
|
|
|
DWORD ret = MMSYSERR_NOERROR;
|
2003-03-04 03:11:21 +01:00
|
|
|
int old_fd = ossdev->fd;
|
2003-03-07 21:37:25 +01:00
|
|
|
TRACE("(%p)\n", ossdev);
|
2002-10-09 22:37:09 +02:00
|
|
|
|
2003-03-07 21:37:25 +01:00
|
|
|
if (ossdev->open_count == 1) {
|
|
|
|
if (ioctl(ossdev->fd, SNDCTL_DSP_RESET, NULL) == -1)
|
|
|
|
{
|
|
|
|
perror("ioctl SNDCTL_DSP_RESET");
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
close(ossdev->fd);
|
|
|
|
ret = OSS_RawOpenDevice(ossdev, 1);
|
|
|
|
TRACE("Changing fd from %d to %d\n", old_fd, ossdev->fd);
|
|
|
|
} else
|
|
|
|
WARN("Not resetting device because it is in full duplex mode!\n");
|
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
return ret;
|
2001-12-21 21:28:43 +01:00
|
|
|
}
|
1994-07-07 18:23:58 +02:00
|
|
|
|
2003-01-11 23:47:51 +01:00
|
|
|
const static int win_std_oss_fmts[2]={AFMT_U8,AFMT_S16_LE};
|
|
|
|
const static int win_std_rates[5]={96000,48000,44100,22050,11025};
|
|
|
|
const static int win_std_formats[2][2][5]=
|
|
|
|
{{{WAVE_FORMAT_96M08, WAVE_FORMAT_48M08, WAVE_FORMAT_4M08,
|
|
|
|
WAVE_FORMAT_2M08, WAVE_FORMAT_1M08},
|
|
|
|
{WAVE_FORMAT_96S08, WAVE_FORMAT_48S08, WAVE_FORMAT_4S08,
|
|
|
|
WAVE_FORMAT_2S08, WAVE_FORMAT_1S08}},
|
|
|
|
{{WAVE_FORMAT_96M16, WAVE_FORMAT_48M16, WAVE_FORMAT_4M16,
|
|
|
|
WAVE_FORMAT_2M16, WAVE_FORMAT_1M16},
|
|
|
|
{WAVE_FORMAT_96S16, WAVE_FORMAT_48S16, WAVE_FORMAT_4S16,
|
|
|
|
WAVE_FORMAT_2S16, WAVE_FORMAT_1S16}},
|
|
|
|
};
|
|
|
|
|
2001-12-14 23:44:29 +01:00
|
|
|
/******************************************************************
|
2002-06-28 19:31:31 +02:00
|
|
|
* OSS_WaveOutInit
|
|
|
|
*
|
2001-12-14 23:44:29 +01:00
|
|
|
*
|
|
|
|
*/
|
2003-01-11 23:47:51 +01:00
|
|
|
static BOOL OSS_WaveOutInit(OSS_DEVICE* ossdev)
|
2000-05-10 00:35:47 +02:00
|
|
|
{
|
2003-01-11 23:47:51 +01:00
|
|
|
int rc,arg;
|
|
|
|
int f,c,r;
|
2003-03-15 01:54:11 +01:00
|
|
|
TRACE("(%p) %s\n", ossdev, ossdev->dev_name);
|
2000-05-10 00:35:47 +02:00
|
|
|
|
2003-01-16 01:19:04 +01:00
|
|
|
if (OSS_OpenDevice(ossdev, O_WRONLY, NULL, 0,-1,-1,-1) != 0) return FALSE;
|
2002-10-07 20:23:40 +02:00
|
|
|
ioctl(ossdev->fd, SNDCTL_DSP_RESET, 0);
|
2000-05-10 00:35:47 +02:00
|
|
|
|
2003-03-15 23:23:27 +01:00
|
|
|
#ifdef SOUND_MIXER_INFO
|
2003-03-17 01:00:53 +01:00
|
|
|
{
|
|
|
|
int mixer;
|
|
|
|
if ((mixer = open(ossdev->mixer_name, O_RDONLY|O_NDELAY)) >= 0) {
|
|
|
|
mixer_info info;
|
|
|
|
if (ioctl(mixer, SOUND_MIXER_INFO, &info) >= 0) {
|
|
|
|
strncpy(ossdev->ds_desc.szDesc, info.name, sizeof(info.name));
|
|
|
|
strcpy(ossdev->ds_desc.szDrvName, "wineoss.drv");
|
|
|
|
strncpy(ossdev->out_caps.szPname, info.name, sizeof(info.name));
|
|
|
|
TRACE("%s\n", ossdev->ds_desc.szDesc);
|
|
|
|
} else {
|
2003-12-31 19:58:07 +01:00
|
|
|
/* FreeBSD up to at least 5.2 provides this ioctl, but does not
|
|
|
|
* implement it properly, and there are probably similar issues
|
|
|
|
* on other platforms, so we warn but try to go ahead.
|
|
|
|
*/
|
|
|
|
WARN("%s: cannot read SOUND_MIXER_INFO!\n", ossdev->mixer_name);
|
2003-03-17 01:00:53 +01:00
|
|
|
}
|
2003-12-31 19:58:07 +01:00
|
|
|
close(mixer);
|
2003-03-17 01:00:53 +01:00
|
|
|
} else {
|
2003-08-30 00:12:15 +02:00
|
|
|
ERR("%s: %s\n", ossdev->mixer_name , strerror( errno ));
|
2003-03-17 01:00:53 +01:00
|
|
|
OSS_CloseDevice(ossdev);
|
|
|
|
return FALSE;
|
|
|
|
}
|
2003-03-15 01:54:11 +01:00
|
|
|
}
|
2003-03-15 23:23:27 +01:00
|
|
|
#endif /* SOUND_MIXER_INFO */
|
2003-03-15 01:54:11 +01:00
|
|
|
|
2003-01-08 00:08:05 +01:00
|
|
|
/* FIXME: some programs compare this string against the content of the
|
|
|
|
* registry for MM drivers. The names have to match in order for the
|
|
|
|
* program to work (e.g. MS win9x mplayer.exe)
|
2000-05-10 00:35:47 +02:00
|
|
|
*/
|
|
|
|
#ifdef EMULATE_SB16
|
2002-06-28 19:31:31 +02:00
|
|
|
ossdev->out_caps.wMid = 0x0002;
|
|
|
|
ossdev->out_caps.wPid = 0x0104;
|
|
|
|
strcpy(ossdev->out_caps.szPname, "SB16 Wave Out");
|
2000-05-10 00:35:47 +02:00
|
|
|
#else
|
2003-01-08 00:08:05 +01:00
|
|
|
ossdev->out_caps.wMid = 0x00FF; /* Manufac ID */
|
|
|
|
ossdev->out_caps.wPid = 0x0001; /* Product ID */
|
2000-05-10 00:35:47 +02:00
|
|
|
#endif
|
2002-06-28 19:31:31 +02:00
|
|
|
ossdev->out_caps.vDriverVersion = 0x0100;
|
2003-01-11 23:47:51 +01:00
|
|
|
ossdev->out_caps.wChannels = 1;
|
2002-06-28 19:31:31 +02:00
|
|
|
ossdev->out_caps.dwFormats = 0x00000000;
|
2003-01-11 23:47:51 +01:00
|
|
|
ossdev->out_caps.wReserved1 = 0;
|
2002-06-28 19:31:31 +02:00
|
|
|
ossdev->out_caps.dwSupport = WAVECAPS_VOLUME;
|
2002-08-09 03:02:25 +02:00
|
|
|
|
2003-03-15 01:54:11 +01:00
|
|
|
/* direct sound caps */
|
|
|
|
ossdev->ds_caps.dwFlags = 0;
|
|
|
|
ossdev->ds_caps.dwPrimaryBuffers = 1;
|
2003-09-03 21:28:20 +02:00
|
|
|
ossdev->ds_caps.dwMinSecondarySampleRate = DSBFREQUENCY_MIN;
|
|
|
|
ossdev->ds_caps.dwMaxSecondarySampleRate = DSBFREQUENCY_MAX;
|
|
|
|
|
2003-01-11 23:47:51 +01:00
|
|
|
if (WINE_TRACE_ON(wave)) {
|
|
|
|
/* Note that this only reports the formats supported by the hardware.
|
|
|
|
* The driver may support other formats and do the conversions in
|
|
|
|
* software which is why we don't use this value
|
|
|
|
*/
|
2004-02-06 06:20:14 +01:00
|
|
|
int oss_mask, oss_caps;
|
2003-01-11 23:47:51 +01:00
|
|
|
ioctl(ossdev->fd, SNDCTL_DSP_GETFMTS, &oss_mask);
|
2004-02-09 21:55:30 +01:00
|
|
|
TRACE("OSS dsp out mask=%08x ( ", oss_mask);
|
2004-02-06 06:20:14 +01:00
|
|
|
if (oss_mask & AFMT_MU_LAW) TRACE("AFMT_MU_LAW ");
|
|
|
|
if (oss_mask & AFMT_A_LAW) TRACE("AFMT_A_LAW ");
|
|
|
|
if (oss_mask & AFMT_IMA_ADPCM) TRACE("AFMT_IMA_ADPCM ");
|
|
|
|
if (oss_mask & AFMT_U8) TRACE("AFMT_U8 ");
|
|
|
|
if (oss_mask & AFMT_S16_LE) TRACE("AFMT_S16_LE ");
|
|
|
|
if (oss_mask & AFMT_S16_BE) TRACE("AFMT_S16_BE ");
|
|
|
|
if (oss_mask & AFMT_S8) TRACE("AFMT_S8 ");
|
|
|
|
if (oss_mask & AFMT_U16_LE) TRACE("AFMT_U16_LE ");
|
|
|
|
if (oss_mask & AFMT_U16_BE) TRACE("AFMT_U16_BE ");
|
|
|
|
if (oss_mask & AFMT_MPEG) TRACE("AFMT_MPEG ");
|
2004-02-12 00:57:17 +01:00
|
|
|
#ifdef AFMT_AC3
|
2004-02-06 06:20:14 +01:00
|
|
|
if (oss_mask & AFMT_AC3) TRACE("AFMT_AC3 ");
|
2004-02-12 00:57:17 +01:00
|
|
|
#endif
|
2004-02-06 06:20:14 +01:00
|
|
|
TRACE(")\n");
|
|
|
|
ioctl(ossdev->fd, SNDCTL_DSP_GETCAPS, &oss_caps);
|
|
|
|
TRACE("Caps=%08x\n",oss_caps);
|
|
|
|
TRACE("\tRevision: %d\n", oss_caps&DSP_CAP_REVISION);
|
|
|
|
TRACE("\tDuplex: %s\n", oss_caps & DSP_CAP_DUPLEX ? "true" : "false");
|
|
|
|
TRACE("\tRealtime: %s\n", oss_caps & DSP_CAP_REALTIME ? "true" : "false");
|
|
|
|
TRACE("\tBatch: %s\n", oss_caps & DSP_CAP_BATCH ? "true" : "false");
|
|
|
|
TRACE("\tCoproc: %s\n", oss_caps & DSP_CAP_COPROC ? "true" : "false");
|
|
|
|
TRACE("\tTrigger: %s\n", oss_caps & DSP_CAP_TRIGGER ? "true" : "false");
|
|
|
|
TRACE("\tMmap: %s\n", oss_caps & DSP_CAP_MMAP ? "true" : "false");
|
|
|
|
#ifdef DSP_CAP_MULTI
|
|
|
|
TRACE("\tMulti: %s\n", oss_caps & DSP_CAP_MULTI ? "true" : "false");
|
|
|
|
#endif
|
2004-02-09 21:55:30 +01:00
|
|
|
#ifdef DSP_CAP_BIND
|
2004-02-06 06:20:14 +01:00
|
|
|
TRACE("\tBind: %s\n", oss_caps & DSP_CAP_BIND ? "true" : "false");
|
2004-02-09 21:55:30 +01:00
|
|
|
#endif
|
2000-05-10 00:35:47 +02:00
|
|
|
}
|
2003-01-11 23:47:51 +01:00
|
|
|
|
|
|
|
/* We must first set the format and the stereo mode as some sound cards
|
|
|
|
* may support 44kHz mono but not 44kHz stereo. Also we must
|
|
|
|
* systematically check the return value of these ioctls as they will
|
|
|
|
* always succeed (see OSS Linux) but will modify the parameter to match
|
|
|
|
* whatever they support. The OSS specs also say we must first set the
|
|
|
|
* sample size, then the stereo and then the sample rate.
|
|
|
|
*/
|
|
|
|
for (f=0;f<2;f++) {
|
|
|
|
arg=win_std_oss_fmts[f];
|
|
|
|
rc=ioctl(ossdev->fd, SNDCTL_DSP_SAMPLESIZE, &arg);
|
2003-01-16 01:19:04 +01:00
|
|
|
if (rc!=0 || arg!=win_std_oss_fmts[f]) {
|
2003-03-15 01:54:11 +01:00
|
|
|
TRACE("DSP_SAMPLESIZE: rc=%d returned %d for %d\n",
|
2003-01-16 01:19:04 +01:00
|
|
|
rc,arg,win_std_oss_fmts[f]);
|
2003-01-11 23:47:51 +01:00
|
|
|
continue;
|
2003-01-16 01:19:04 +01:00
|
|
|
}
|
2003-03-15 01:54:11 +01:00
|
|
|
if (f == 0)
|
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_PRIMARY8BIT;
|
|
|
|
else if (f == 1)
|
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_PRIMARY16BIT;
|
2003-01-11 23:47:51 +01:00
|
|
|
|
|
|
|
for (c=0;c<2;c++) {
|
|
|
|
arg=c;
|
|
|
|
rc=ioctl(ossdev->fd, SNDCTL_DSP_STEREO, &arg);
|
2003-01-16 01:19:04 +01:00
|
|
|
if (rc!=0 || arg!=c) {
|
|
|
|
TRACE("DSP_STEREO: rc=%d returned %d for %d\n",rc,arg,c);
|
2003-01-11 23:47:51 +01:00
|
|
|
continue;
|
2003-01-16 01:19:04 +01:00
|
|
|
}
|
2003-03-15 01:54:11 +01:00
|
|
|
if (c == 0) {
|
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_PRIMARYMONO;
|
|
|
|
} else if (c==1) {
|
2003-01-11 23:47:51 +01:00
|
|
|
ossdev->out_caps.wChannels=2;
|
|
|
|
ossdev->out_caps.dwSupport|=WAVECAPS_LRVOLUME;
|
2003-03-15 01:54:11 +01:00
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_PRIMARYSTEREO;
|
2003-01-11 23:47:51 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
for (r=0;r<sizeof(win_std_rates)/sizeof(*win_std_rates);r++) {
|
|
|
|
arg=win_std_rates[r];
|
|
|
|
rc=ioctl(ossdev->fd, SNDCTL_DSP_SPEED, &arg);
|
|
|
|
TRACE("DSP_SPEED: rc=%d returned %d for %dx%dx%d\n",
|
|
|
|
rc,arg,win_std_rates[r],win_std_oss_fmts[f],c+1);
|
2003-09-25 22:23:52 +02:00
|
|
|
if (rc==0 && arg!=0 && NEAR_MATCH(arg,win_std_rates[r]))
|
2003-01-11 23:47:51 +01:00
|
|
|
ossdev->out_caps.dwFormats|=win_std_formats[f][c][r];
|
|
|
|
}
|
|
|
|
}
|
2000-05-10 00:35:47 +02:00
|
|
|
}
|
2003-01-11 23:47:51 +01:00
|
|
|
|
|
|
|
if (ioctl(ossdev->fd, SNDCTL_DSP_GETCAPS, &arg) == 0) {
|
|
|
|
TRACE("OSS dsp out caps=%08X\n", arg);
|
2003-04-26 04:09:20 +02:00
|
|
|
if (arg & DSP_CAP_TRIGGER)
|
|
|
|
ossdev->bTriggerSupport = TRUE;
|
2003-01-11 23:47:51 +01:00
|
|
|
if ((arg & DSP_CAP_REALTIME) && !(arg & DSP_CAP_BATCH)) {
|
|
|
|
ossdev->out_caps.dwSupport |= WAVECAPS_SAMPLEACCURATE;
|
|
|
|
}
|
|
|
|
/* well, might as well use the DirectSound cap flag for something */
|
|
|
|
if ((arg & DSP_CAP_TRIGGER) && (arg & DSP_CAP_MMAP) &&
|
2003-03-15 01:54:11 +01:00
|
|
|
!(arg & DSP_CAP_BATCH)) {
|
2003-01-11 23:47:51 +01:00
|
|
|
ossdev->out_caps.dwSupport |= WAVECAPS_DIRECTSOUND;
|
2003-03-15 01:54:11 +01:00
|
|
|
} else {
|
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_EMULDRIVER;
|
|
|
|
}
|
2004-02-13 22:10:21 +01:00
|
|
|
#ifdef DSP_CAP_MULTI /* not every oss has this */
|
|
|
|
/* check for hardware secondary buffer support (multi open) */
|
|
|
|
if ((arg & DSP_CAP_MULTI) &&
|
|
|
|
(ossdev->out_caps.dwSupport & WAVECAPS_DIRECTSOUND)) {
|
|
|
|
TRACE("hardware secondary buffer support available\n");
|
|
|
|
if (ossdev->ds_caps.dwFlags & DSCAPS_PRIMARY8BIT)
|
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_SECONDARY8BIT;
|
|
|
|
if (ossdev->ds_caps.dwFlags & DSCAPS_PRIMARY16BIT)
|
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_SECONDARY16BIT;
|
|
|
|
if (ossdev->ds_caps.dwFlags & DSCAPS_PRIMARYMONO)
|
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_SECONDARYMONO;
|
|
|
|
if (ossdev->ds_caps.dwFlags & DSCAPS_PRIMARYSTEREO)
|
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_SECONDARYSTEREO;
|
|
|
|
|
|
|
|
ossdev->ds_caps.dwMaxHwMixingAllBuffers = 16;
|
|
|
|
ossdev->ds_caps.dwMaxHwMixingStaticBuffers = 0;
|
|
|
|
ossdev->ds_caps.dwMaxHwMixingStreamingBuffers = 16;
|
|
|
|
|
|
|
|
ossdev->ds_caps.dwFreeHwMixingAllBuffers = 16;
|
|
|
|
ossdev->ds_caps.dwFreeHwMixingStaticBuffers = 0;
|
|
|
|
ossdev->ds_caps.dwFreeHwMixingStreamingBuffers = 16;
|
|
|
|
}
|
|
|
|
#endif
|
2000-05-10 00:35:47 +02:00
|
|
|
}
|
2002-10-07 20:23:40 +02:00
|
|
|
OSS_CloseDevice(ossdev);
|
2000-06-24 14:55:33 +02:00
|
|
|
TRACE("out dwFormats = %08lX, dwSupport = %08lX\n",
|
2003-01-11 23:47:51 +01:00
|
|
|
ossdev->out_caps.dwFormats, ossdev->out_caps.dwSupport);
|
2002-10-09 22:37:09 +02:00
|
|
|
return TRUE;
|
2002-06-28 19:31:31 +02:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2002-06-28 19:31:31 +02:00
|
|
|
/******************************************************************
|
|
|
|
* OSS_WaveInInit
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
2002-10-09 22:37:09 +02:00
|
|
|
static BOOL OSS_WaveInInit(OSS_DEVICE* ossdev)
|
2002-06-28 19:31:31 +02:00
|
|
|
{
|
2003-01-11 23:47:51 +01:00
|
|
|
int rc,arg;
|
|
|
|
int f,c,r;
|
2003-03-15 01:54:11 +01:00
|
|
|
TRACE("(%p) %s\n", ossdev, ossdev->dev_name);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2003-09-27 04:20:19 +02:00
|
|
|
if (OSS_OpenDevice(ossdev, O_RDONLY, NULL, 0,-1,-1,-1) != 0)
|
|
|
|
return FALSE;
|
|
|
|
|
2002-10-07 20:23:40 +02:00
|
|
|
ioctl(ossdev->fd, SNDCTL_DSP_RESET, 0);
|
2000-05-10 00:35:47 +02:00
|
|
|
|
2003-03-15 23:23:27 +01:00
|
|
|
#ifdef SOUND_MIXER_INFO
|
2003-03-17 01:00:53 +01:00
|
|
|
{
|
|
|
|
int mixer;
|
|
|
|
if ((mixer = open(ossdev->mixer_name, O_RDONLY|O_NDELAY)) >= 0) {
|
|
|
|
mixer_info info;
|
|
|
|
if (ioctl(mixer, SOUND_MIXER_INFO, &info) >= 0) {
|
|
|
|
strncpy(ossdev->in_caps.szPname, info.name, sizeof(info.name));
|
|
|
|
TRACE("%s\n", ossdev->ds_desc.szDesc);
|
|
|
|
} else {
|
2003-12-31 19:58:07 +01:00
|
|
|
/* FreeBSD up to at least 5.2 provides this ioctl, but does not
|
|
|
|
* implement it properly, and there are probably similar issues
|
|
|
|
* on other platforms, so we warn but try to go ahead.
|
|
|
|
*/
|
|
|
|
WARN("%s: cannot read SOUND_MIXER_INFO!\n", ossdev->mixer_name);
|
2003-03-17 01:00:53 +01:00
|
|
|
}
|
2003-12-31 19:58:07 +01:00
|
|
|
close(mixer);
|
2003-03-17 01:00:53 +01:00
|
|
|
} else {
|
2003-08-30 00:12:15 +02:00
|
|
|
ERR("%s: %s\n", ossdev->mixer_name, strerror(errno));
|
2003-03-17 01:00:53 +01:00
|
|
|
OSS_CloseDevice(ossdev);
|
|
|
|
return FALSE;
|
|
|
|
}
|
2003-03-15 01:54:11 +01:00
|
|
|
}
|
2003-03-15 23:23:27 +01:00
|
|
|
#endif /* SOUND_MIXER_INFO */
|
2003-03-15 01:54:11 +01:00
|
|
|
|
2003-01-11 23:47:51 +01:00
|
|
|
/* See comment in OSS_WaveOutInit */
|
2000-05-10 00:35:47 +02:00
|
|
|
#ifdef EMULATE_SB16
|
2002-06-28 19:31:31 +02:00
|
|
|
ossdev->in_caps.wMid = 0x0002;
|
|
|
|
ossdev->in_caps.wPid = 0x0004;
|
|
|
|
strcpy(ossdev->in_caps.szPname, "SB16 Wave In");
|
2000-05-10 00:35:47 +02:00
|
|
|
#else
|
2003-01-11 23:47:51 +01:00
|
|
|
ossdev->in_caps.wMid = 0x00FF; /* Manufac ID */
|
|
|
|
ossdev->in_caps.wPid = 0x0001; /* Product ID */
|
2000-05-10 00:35:47 +02:00
|
|
|
#endif
|
2002-06-28 19:31:31 +02:00
|
|
|
ossdev->in_caps.dwFormats = 0x00000000;
|
2003-01-11 23:47:51 +01:00
|
|
|
ossdev->in_caps.wChannels = 1;
|
|
|
|
ossdev->in_caps.wReserved1 = 0;
|
2000-05-10 00:35:47 +02:00
|
|
|
|
2003-03-15 01:54:11 +01:00
|
|
|
/* direct sound caps */
|
|
|
|
ossdev->dsc_caps.dwSize = sizeof(ossdev->dsc_caps);
|
|
|
|
ossdev->dsc_caps.dwFlags = 0;
|
|
|
|
ossdev->dsc_caps.dwFormats = 0x00000000;
|
|
|
|
ossdev->dsc_caps.dwChannels = 1;
|
|
|
|
|
2003-01-11 23:47:51 +01:00
|
|
|
if (WINE_TRACE_ON(wave)) {
|
|
|
|
/* Note that this only reports the formats supported by the hardware.
|
|
|
|
* The driver may support other formats and do the conversions in
|
|
|
|
* software which is why we don't use this value
|
|
|
|
*/
|
|
|
|
int oss_mask;
|
|
|
|
ioctl(ossdev->fd, SNDCTL_DSP_GETFMTS, &oss_mask);
|
|
|
|
TRACE("OSS dsp out mask=%08x\n", oss_mask);
|
2000-05-10 00:35:47 +02:00
|
|
|
}
|
2003-01-11 23:47:51 +01:00
|
|
|
|
|
|
|
/* See the comment in OSS_WaveOutInit */
|
|
|
|
for (f=0;f<2;f++) {
|
|
|
|
arg=win_std_oss_fmts[f];
|
|
|
|
rc=ioctl(ossdev->fd, SNDCTL_DSP_SAMPLESIZE, &arg);
|
2003-01-16 01:19:04 +01:00
|
|
|
if (rc!=0 || arg!=win_std_oss_fmts[f]) {
|
|
|
|
TRACE("DSP_SAMPLESIZE: rc=%d returned 0x%x for 0x%x\n",
|
|
|
|
rc,arg,win_std_oss_fmts[f]);
|
2003-01-11 23:47:51 +01:00
|
|
|
continue;
|
2003-01-16 01:19:04 +01:00
|
|
|
}
|
2003-01-11 23:47:51 +01:00
|
|
|
|
|
|
|
for (c=0;c<2;c++) {
|
|
|
|
arg=c;
|
|
|
|
rc=ioctl(ossdev->fd, SNDCTL_DSP_STEREO, &arg);
|
2003-01-16 01:19:04 +01:00
|
|
|
if (rc!=0 || arg!=c) {
|
|
|
|
TRACE("DSP_STEREO: rc=%d returned %d for %d\n",rc,arg,c);
|
2003-01-11 23:47:51 +01:00
|
|
|
continue;
|
2003-01-16 01:19:04 +01:00
|
|
|
}
|
2003-01-11 23:47:51 +01:00
|
|
|
if (c==1) {
|
|
|
|
ossdev->in_caps.wChannels=2;
|
2003-03-15 01:54:11 +01:00
|
|
|
ossdev->dsc_caps.dwChannels=2;
|
2003-01-11 23:47:51 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
for (r=0;r<sizeof(win_std_rates)/sizeof(*win_std_rates);r++) {
|
|
|
|
arg=win_std_rates[r];
|
|
|
|
rc=ioctl(ossdev->fd, SNDCTL_DSP_SPEED, &arg);
|
|
|
|
TRACE("DSP_SPEED: rc=%d returned %d for %dx%dx%d\n",rc,arg,win_std_rates[r],win_std_oss_fmts[f],c+1);
|
|
|
|
if (rc==0 && NEAR_MATCH(arg,win_std_rates[r]))
|
|
|
|
ossdev->in_caps.dwFormats|=win_std_formats[f][c][r];
|
2003-03-15 01:54:11 +01:00
|
|
|
ossdev->dsc_caps.dwFormats|=win_std_formats[f][c][r];
|
2003-01-11 23:47:51 +01:00
|
|
|
}
|
|
|
|
}
|
2000-05-10 00:35:47 +02:00
|
|
|
}
|
2003-01-11 23:47:51 +01:00
|
|
|
|
|
|
|
if (ioctl(ossdev->fd, SNDCTL_DSP_GETCAPS, &arg) == 0) {
|
|
|
|
TRACE("OSS dsp in caps=%08X\n", arg);
|
|
|
|
if (arg & DSP_CAP_TRIGGER)
|
|
|
|
ossdev->bTriggerSupport = TRUE;
|
2003-02-15 00:59:15 +01:00
|
|
|
if ((arg & DSP_CAP_TRIGGER) && (arg & DSP_CAP_MMAP) &&
|
2003-03-15 01:54:11 +01:00
|
|
|
!(arg & DSP_CAP_BATCH)) {
|
|
|
|
/* FIXME: enable the next statement if you want to work on the driver */
|
|
|
|
#if 0
|
2003-02-15 00:59:15 +01:00
|
|
|
ossdev->in_caps_support |= WAVECAPS_DIRECTSOUND;
|
2003-03-15 01:54:11 +01:00
|
|
|
#endif
|
|
|
|
}
|
2003-03-04 03:11:21 +01:00
|
|
|
if ((arg & DSP_CAP_REALTIME) && !(arg & DSP_CAP_BATCH))
|
|
|
|
ossdev->in_caps_support |= WAVECAPS_SAMPLEACCURATE;
|
2000-05-10 00:35:47 +02:00
|
|
|
}
|
2002-10-07 20:23:40 +02:00
|
|
|
OSS_CloseDevice(ossdev);
|
2002-06-28 19:31:31 +02:00
|
|
|
TRACE("in dwFormats = %08lX\n", ossdev->in_caps.dwFormats);
|
2002-10-09 22:37:09 +02:00
|
|
|
return TRUE;
|
2002-06-28 19:31:31 +02:00
|
|
|
}
|
2000-05-10 00:35:47 +02:00
|
|
|
|
2002-06-28 19:31:31 +02:00
|
|
|
/******************************************************************
|
|
|
|
* OSS_WaveFullDuplexInit
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
2002-10-07 20:23:40 +02:00
|
|
|
static void OSS_WaveFullDuplexInit(OSS_DEVICE* ossdev)
|
2002-06-28 19:31:31 +02:00
|
|
|
{
|
|
|
|
int caps;
|
2003-03-15 01:54:11 +01:00
|
|
|
TRACE("(%p)\n",ossdev);
|
2002-06-28 19:31:31 +02:00
|
|
|
|
2003-01-16 01:19:04 +01:00
|
|
|
if (OSS_OpenDevice(ossdev, O_RDWR, NULL, 0,-1,-1,-1) != 0) return;
|
2002-10-07 20:23:40 +02:00
|
|
|
if (ioctl(ossdev->fd, SNDCTL_DSP_GETCAPS, &caps) == 0)
|
2002-06-28 19:31:31 +02:00
|
|
|
{
|
|
|
|
ossdev->full_duplex = (caps & DSP_CAP_DUPLEX);
|
2001-12-21 21:28:43 +01:00
|
|
|
}
|
2002-10-07 20:23:40 +02:00
|
|
|
OSS_CloseDevice(ossdev);
|
2002-06-28 19:31:31 +02:00
|
|
|
}
|
|
|
|
|
2003-03-15 01:54:11 +01:00
|
|
|
#define INIT_GUID(guid, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
|
|
|
guid.Data1 = l; guid.Data2 = w1; guid.Data3 = w2; \
|
|
|
|
guid.Data4[0] = b1; guid.Data4[1] = b2; guid.Data4[2] = b3; \
|
|
|
|
guid.Data4[3] = b4; guid.Data4[4] = b5; guid.Data4[5] = b6; \
|
|
|
|
guid.Data4[6] = b7; guid.Data4[7] = b8;
|
2002-06-28 19:31:31 +02:00
|
|
|
/******************************************************************
|
|
|
|
* OSS_WaveInit
|
|
|
|
*
|
|
|
|
* Initialize internal structures from OSS information
|
|
|
|
*/
|
|
|
|
LONG OSS_WaveInit(void)
|
|
|
|
{
|
|
|
|
int i;
|
2003-03-15 01:54:11 +01:00
|
|
|
TRACE("()\n");
|
2002-06-28 19:31:31 +02:00
|
|
|
|
2003-03-15 01:54:11 +01:00
|
|
|
for (i = 0; i < MAX_WAVEDRV; ++i)
|
|
|
|
{
|
|
|
|
if (i == 0) {
|
|
|
|
sprintf((char *)OSS_Devices[i].dev_name, "/dev/dsp");
|
|
|
|
sprintf((char *)OSS_Devices[i].mixer_name, "/dev/mixer");
|
|
|
|
} else {
|
|
|
|
sprintf((char *)OSS_Devices[i].dev_name, "/dev/dsp%d", i);
|
|
|
|
sprintf((char *)OSS_Devices[i].mixer_name, "/dev/mixer%d", i);
|
|
|
|
}
|
|
|
|
|
2003-07-28 21:02:29 +02:00
|
|
|
INIT_GUID(OSS_Devices[i].ds_guid, 0xbd6dd71a, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
|
|
|
|
INIT_GUID(OSS_Devices[i].dsc_guid, 0xbd6dd71b, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
|
2003-03-15 01:54:11 +01:00
|
|
|
}
|
2002-08-09 03:02:25 +02:00
|
|
|
|
2003-04-10 20:33:46 +02:00
|
|
|
/* start with output devices */
|
2002-06-28 19:31:31 +02:00
|
|
|
for (i = 0; i < MAX_WAVEDRV; ++i)
|
2002-10-09 22:37:09 +02:00
|
|
|
{
|
|
|
|
if (OSS_WaveOutInit(&OSS_Devices[i]))
|
|
|
|
{
|
|
|
|
WOutDev[numOutDev].state = WINE_WS_CLOSED;
|
|
|
|
WOutDev[numOutDev].ossdev = &OSS_Devices[i];
|
2003-10-31 00:08:46 +01:00
|
|
|
WOutDev[numOutDev].volume = 0xffffffff;
|
2002-10-09 22:37:09 +02:00
|
|
|
numOutDev++;
|
|
|
|
}
|
|
|
|
}
|
2002-06-28 19:31:31 +02:00
|
|
|
|
2003-04-10 20:33:46 +02:00
|
|
|
/* then do input devices */
|
2002-06-28 19:31:31 +02:00
|
|
|
for (i = 0; i < MAX_WAVEDRV; ++i)
|
2002-10-09 22:37:09 +02:00
|
|
|
{
|
|
|
|
if (OSS_WaveInInit(&OSS_Devices[i]))
|
|
|
|
{
|
|
|
|
WInDev[numInDev].state = WINE_WS_CLOSED;
|
|
|
|
WInDev[numInDev].ossdev = &OSS_Devices[i];
|
|
|
|
numInDev++;
|
|
|
|
}
|
|
|
|
}
|
2002-06-28 19:31:31 +02:00
|
|
|
|
|
|
|
/* finish with the full duplex bits */
|
|
|
|
for (i = 0; i < MAX_WAVEDRV; i++)
|
2002-10-07 20:23:40 +02:00
|
|
|
OSS_WaveFullDuplexInit(&OSS_Devices[i]);
|
2001-12-21 21:28:43 +01:00
|
|
|
|
2000-05-10 00:35:47 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2001-12-14 23:44:29 +01:00
|
|
|
/******************************************************************
|
|
|
|
* OSS_InitRingMessage
|
|
|
|
*
|
|
|
|
* Initialize the ring of messages for passing between driver's caller and playback/record
|
|
|
|
* thread
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
*/
|
2001-11-12 16:55:37 +01:00
|
|
|
static int OSS_InitRingMessage(OSS_MSG_RING* omr)
|
|
|
|
{
|
|
|
|
omr->msg_toget = 0;
|
|
|
|
omr->msg_tosave = 0;
|
2002-08-26 23:49:42 +02:00
|
|
|
#ifdef USE_PIPE_SYNC
|
|
|
|
if (pipe(omr->msg_pipe) < 0) {
|
|
|
|
omr->msg_pipe[0] = -1;
|
|
|
|
omr->msg_pipe[1] = -1;
|
|
|
|
ERR("could not create pipe, error=%s\n", strerror(errno));
|
|
|
|
}
|
|
|
|
#else
|
2001-11-12 16:55:37 +01:00
|
|
|
omr->msg_event = CreateEventA(NULL, FALSE, FALSE, NULL);
|
2002-08-26 23:49:42 +02:00
|
|
|
#endif
|
2003-06-04 22:28:04 +02:00
|
|
|
omr->ring_buffer_size = OSS_RING_BUFFER_INCREMENT;
|
|
|
|
omr->messages = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,omr->ring_buffer_size * sizeof(OSS_MSG));
|
2001-11-12 16:55:37 +01:00
|
|
|
InitializeCriticalSection(&omr->msg_crst);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2001-12-21 21:28:43 +01:00
|
|
|
/******************************************************************
|
|
|
|
* OSS_DestroyRingMessage
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
static int OSS_DestroyRingMessage(OSS_MSG_RING* omr)
|
|
|
|
{
|
2002-08-26 23:49:42 +02:00
|
|
|
#ifdef USE_PIPE_SYNC
|
|
|
|
close(omr->msg_pipe[0]);
|
|
|
|
close(omr->msg_pipe[1]);
|
|
|
|
#else
|
2001-12-21 21:28:43 +01:00
|
|
|
CloseHandle(omr->msg_event);
|
2002-08-26 23:49:42 +02:00
|
|
|
#endif
|
2003-06-04 22:28:04 +02:00
|
|
|
HeapFree(GetProcessHeap(),0,omr->messages);
|
2001-12-21 21:28:43 +01:00
|
|
|
DeleteCriticalSection(&omr->msg_crst);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2001-12-14 23:44:29 +01:00
|
|
|
/******************************************************************
|
|
|
|
* OSS_AddRingMessage
|
|
|
|
*
|
|
|
|
* Inserts a new message into the ring (should be called from DriverProc derivated routines)
|
|
|
|
*/
|
|
|
|
static int OSS_AddRingMessage(OSS_MSG_RING* omr, enum win_wm_message msg, DWORD param, BOOL wait)
|
2001-11-12 16:55:37 +01:00
|
|
|
{
|
2002-01-12 22:15:08 +01:00
|
|
|
HANDLE hEvent = INVALID_HANDLE_VALUE;
|
2001-11-12 16:55:37 +01:00
|
|
|
|
|
|
|
EnterCriticalSection(&omr->msg_crst);
|
2003-06-04 22:28:04 +02:00
|
|
|
if ((omr->msg_toget == ((omr->msg_tosave + 1) % omr->ring_buffer_size)))
|
2001-11-12 16:55:37 +01:00
|
|
|
{
|
2003-12-12 06:55:26 +01:00
|
|
|
int old_ring_buffer_size = omr->ring_buffer_size;
|
2003-06-04 22:28:04 +02:00
|
|
|
omr->ring_buffer_size += OSS_RING_BUFFER_INCREMENT;
|
|
|
|
TRACE("omr->ring_buffer_size=%d\n",omr->ring_buffer_size);
|
|
|
|
omr->messages = HeapReAlloc(GetProcessHeap(),0,omr->messages, omr->ring_buffer_size * sizeof(OSS_MSG));
|
2003-12-12 06:55:26 +01:00
|
|
|
/* Now we need to rearrange the ring buffer so that the new
|
|
|
|
buffers just allocated are in between omr->msg_tosave and
|
|
|
|
omr->msg_toget.
|
|
|
|
*/
|
|
|
|
if (omr->msg_tosave < omr->msg_toget)
|
|
|
|
{
|
|
|
|
memmove(&(omr->messages[omr->msg_toget + OSS_RING_BUFFER_INCREMENT]),
|
|
|
|
&(omr->messages[omr->msg_toget]),
|
|
|
|
sizeof(OSS_MSG)*(old_ring_buffer_size - omr->msg_toget)
|
|
|
|
);
|
|
|
|
omr->msg_toget += OSS_RING_BUFFER_INCREMENT;
|
|
|
|
}
|
2001-11-12 16:55:37 +01:00
|
|
|
}
|
2002-01-12 22:15:08 +01:00
|
|
|
if (wait)
|
|
|
|
{
|
|
|
|
hEvent = CreateEventA(NULL, FALSE, FALSE, NULL);
|
|
|
|
if (hEvent == INVALID_HANDLE_VALUE)
|
|
|
|
{
|
|
|
|
ERR("can't create event !?\n");
|
|
|
|
LeaveCriticalSection(&omr->msg_crst);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (omr->msg_toget != omr->msg_tosave && omr->messages[omr->msg_toget].msg != WINE_WM_HEADER)
|
|
|
|
FIXME("two fast messages in the queue!!!!\n");
|
2001-11-12 16:55:37 +01:00
|
|
|
|
2002-01-12 22:15:08 +01:00
|
|
|
/* fast messages have to be added at the start of the queue */
|
2003-06-04 22:28:04 +02:00
|
|
|
omr->msg_toget = (omr->msg_toget + omr->ring_buffer_size - 1) % omr->ring_buffer_size;
|
2001-11-12 16:55:37 +01:00
|
|
|
|
2002-01-12 22:15:08 +01:00
|
|
|
omr->messages[omr->msg_toget].msg = msg;
|
|
|
|
omr->messages[omr->msg_toget].param = param;
|
|
|
|
omr->messages[omr->msg_toget].hEvent = hEvent;
|
|
|
|
}
|
|
|
|
else
|
2002-06-01 01:06:46 +02:00
|
|
|
{
|
2002-01-12 22:15:08 +01:00
|
|
|
omr->messages[omr->msg_tosave].msg = msg;
|
|
|
|
omr->messages[omr->msg_tosave].param = param;
|
|
|
|
omr->messages[omr->msg_tosave].hEvent = INVALID_HANDLE_VALUE;
|
2003-06-04 22:28:04 +02:00
|
|
|
omr->msg_tosave = (omr->msg_tosave + 1) % omr->ring_buffer_size;
|
2002-01-12 22:15:08 +01:00
|
|
|
}
|
2001-11-12 16:55:37 +01:00
|
|
|
LeaveCriticalSection(&omr->msg_crst);
|
|
|
|
/* signal a new message */
|
2002-08-26 23:49:42 +02:00
|
|
|
SIGNAL_OMR(omr);
|
2001-11-12 16:55:37 +01:00
|
|
|
if (wait)
|
|
|
|
{
|
2002-01-12 22:15:08 +01:00
|
|
|
/* wait for playback/record thread to have processed the message */
|
2001-12-21 21:28:43 +01:00
|
|
|
WaitForSingleObject(hEvent, INFINITE);
|
|
|
|
CloseHandle(hEvent);
|
2001-11-12 16:55:37 +01:00
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2001-12-14 23:44:29 +01:00
|
|
|
/******************************************************************
|
|
|
|
* OSS_RetrieveRingMessage
|
|
|
|
*
|
|
|
|
* Get a message from the ring. Should be called by the playback/record thread.
|
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
static int OSS_RetrieveRingMessage(OSS_MSG_RING* omr,
|
2001-12-14 23:44:29 +01:00
|
|
|
enum win_wm_message *msg, DWORD *param, HANDLE *hEvent)
|
2001-11-12 16:55:37 +01:00
|
|
|
{
|
|
|
|
EnterCriticalSection(&omr->msg_crst);
|
|
|
|
|
|
|
|
if (omr->msg_toget == omr->msg_tosave) /* buffer empty ? */
|
|
|
|
{
|
|
|
|
LeaveCriticalSection(&omr->msg_crst);
|
|
|
|
return 0;
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2001-11-12 16:55:37 +01:00
|
|
|
*msg = omr->messages[omr->msg_toget].msg;
|
|
|
|
omr->messages[omr->msg_toget].msg = 0;
|
|
|
|
*param = omr->messages[omr->msg_toget].param;
|
|
|
|
*hEvent = omr->messages[omr->msg_toget].hEvent;
|
2003-06-04 22:28:04 +02:00
|
|
|
omr->msg_toget = (omr->msg_toget + 1) % omr->ring_buffer_size;
|
2002-08-26 23:49:42 +02:00
|
|
|
CLEAR_OMR(omr);
|
2001-11-12 16:55:37 +01:00
|
|
|
LeaveCriticalSection(&omr->msg_crst);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2003-03-04 03:11:21 +01:00
|
|
|
/******************************************************************
|
|
|
|
* OSS_PeekRingMessage
|
|
|
|
*
|
|
|
|
* Peek at a message from the ring but do not remove it.
|
|
|
|
* Should be called by the playback/record thread.
|
|
|
|
*/
|
|
|
|
static int OSS_PeekRingMessage(OSS_MSG_RING* omr,
|
|
|
|
enum win_wm_message *msg,
|
|
|
|
DWORD *param, HANDLE *hEvent)
|
|
|
|
{
|
|
|
|
EnterCriticalSection(&omr->msg_crst);
|
|
|
|
|
|
|
|
if (omr->msg_toget == omr->msg_tosave) /* buffer empty ? */
|
|
|
|
{
|
|
|
|
LeaveCriticalSection(&omr->msg_crst);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
*msg = omr->messages[omr->msg_toget].msg;
|
|
|
|
*param = omr->messages[omr->msg_toget].param;
|
|
|
|
*hEvent = omr->messages[omr->msg_toget].hEvent;
|
|
|
|
LeaveCriticalSection(&omr->msg_crst);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
1999-04-11 14:16:24 +02:00
|
|
|
/*======================================================================*
|
2000-10-23 01:43:15 +02:00
|
|
|
* Low level WAVE OUT implementation *
|
1999-04-11 14:16:24 +02:00
|
|
|
*======================================================================*/
|
|
|
|
|
|
|
|
/**************************************************************************
|
2001-12-14 23:44:29 +01:00
|
|
|
* wodNotifyClient [internal]
|
1999-04-11 14:16:24 +02:00
|
|
|
*/
|
2001-12-14 23:44:29 +01:00
|
|
|
static DWORD wodNotifyClient(WINE_WAVEOUT* wwo, WORD wMsg, DWORD dwParam1, DWORD dwParam2)
|
1999-04-11 14:16:24 +02:00
|
|
|
{
|
2003-11-14 22:03:24 +01:00
|
|
|
TRACE("wMsg = 0x%04x (%s) dwParm1 = %04lX dwParam2 = %04lX\n", wMsg,
|
|
|
|
wMsg == WOM_OPEN ? "WOM_OPEN" : wMsg == WOM_CLOSE ? "WOM_CLOSE" :
|
|
|
|
wMsg == WOM_DONE ? "WOM_DONE" : "Unknown", dwParam1, dwParam2);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2001-12-14 23:44:29 +01:00
|
|
|
switch (wMsg) {
|
|
|
|
case WOM_OPEN:
|
|
|
|
case WOM_CLOSE:
|
|
|
|
case WOM_DONE:
|
2002-06-01 01:06:46 +02:00
|
|
|
if (wwo->wFlags != DCB_NULL &&
|
2002-08-09 03:02:25 +02:00
|
|
|
!DriverCallback(wwo->waveDesc.dwCallback, wwo->wFlags,
|
|
|
|
(HDRVR)wwo->waveDesc.hWave, wMsg,
|
|
|
|
wwo->waveDesc.dwInstance, dwParam1, dwParam2)) {
|
2001-12-14 23:44:29 +01:00
|
|
|
WARN("can't notify client !\n");
|
|
|
|
return MMSYSERR_ERROR;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
2001-12-21 21:28:43 +01:00
|
|
|
FIXME("Unknown callback message %u\n", wMsg);
|
2001-12-14 23:44:29 +01:00
|
|
|
return MMSYSERR_INVALPARAM;
|
2001-11-09 21:26:59 +01:00
|
|
|
}
|
2001-12-14 23:44:29 +01:00
|
|
|
return MMSYSERR_NOERROR;
|
2001-11-09 21:26:59 +01:00
|
|
|
}
|
|
|
|
|
2001-12-14 23:44:29 +01:00
|
|
|
/**************************************************************************
|
|
|
|
* wodUpdatePlayedTotal [internal]
|
|
|
|
*
|
|
|
|
*/
|
2001-12-21 21:28:43 +01:00
|
|
|
static BOOL wodUpdatePlayedTotal(WINE_WAVEOUT* wwo, audio_buf_info* info)
|
2001-12-14 23:44:29 +01:00
|
|
|
{
|
2001-12-21 21:28:43 +01:00
|
|
|
audio_buf_info dspspace;
|
|
|
|
if (!info) info = &dspspace;
|
|
|
|
|
2002-10-07 20:23:40 +02:00
|
|
|
if (ioctl(wwo->ossdev->fd, SNDCTL_DSP_GETOSPACE, info) < 0) {
|
2003-03-15 01:54:11 +01:00
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_GETOSPACE) failed (%s)\n", wwo->ossdev->dev_name, strerror(errno));
|
2001-12-21 21:28:43 +01:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
wwo->dwPlayedTotal = wwo->dwWrittenTotal - (wwo->dwBufferSize - info->bytes);
|
|
|
|
return TRUE;
|
2001-12-14 23:44:29 +01:00
|
|
|
}
|
2001-11-09 21:26:59 +01:00
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
* wodPlayer_BeginWaveHdr [internal]
|
|
|
|
*
|
|
|
|
* Makes the specified lpWaveHdr the currently playing wave header.
|
|
|
|
* If the specified wave header is a begin loop and we're not already in
|
|
|
|
* a loop, setup the loop.
|
|
|
|
*/
|
2001-12-14 23:44:29 +01:00
|
|
|
static void wodPlayer_BeginWaveHdr(WINE_WAVEOUT* wwo, LPWAVEHDR lpWaveHdr)
|
2001-11-09 21:26:59 +01:00
|
|
|
{
|
2001-12-14 23:44:29 +01:00
|
|
|
wwo->lpPlayPtr = lpWaveHdr;
|
2001-11-09 21:26:59 +01:00
|
|
|
|
2001-12-14 23:44:29 +01:00
|
|
|
if (!lpWaveHdr) return;
|
2001-11-09 21:26:59 +01:00
|
|
|
|
|
|
|
if (lpWaveHdr->dwFlags & WHDR_BEGINLOOP) {
|
|
|
|
if (wwo->lpLoopPtr) {
|
|
|
|
WARN("Already in a loop. Discarding loop on this header (%p)\n", lpWaveHdr);
|
|
|
|
} else {
|
|
|
|
TRACE("Starting loop (%ldx) with %p\n", lpWaveHdr->dwLoops, lpWaveHdr);
|
|
|
|
wwo->lpLoopPtr = lpWaveHdr;
|
|
|
|
/* Windows does not touch WAVEHDR.dwLoops,
|
|
|
|
* so we need to make an internal copy */
|
|
|
|
wwo->dwLoops = lpWaveHdr->dwLoops;
|
1999-04-11 14:16:24 +02:00
|
|
|
}
|
2001-11-09 21:26:59 +01:00
|
|
|
}
|
2001-12-14 23:44:29 +01:00
|
|
|
wwo->dwPartialOffset = 0;
|
2001-11-09 21:26:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
* wodPlayer_PlayPtrNext [internal]
|
|
|
|
*
|
|
|
|
* Advance the play pointer to the next waveheader, looping if required.
|
|
|
|
*/
|
|
|
|
static LPWAVEHDR wodPlayer_PlayPtrNext(WINE_WAVEOUT* wwo)
|
|
|
|
{
|
2001-12-14 23:44:29 +01:00
|
|
|
LPWAVEHDR lpWaveHdr = wwo->lpPlayPtr;
|
2001-11-09 21:26:59 +01:00
|
|
|
|
2001-12-14 23:44:29 +01:00
|
|
|
wwo->dwPartialOffset = 0;
|
2001-11-09 21:26:59 +01:00
|
|
|
if ((lpWaveHdr->dwFlags & WHDR_ENDLOOP) && wwo->lpLoopPtr) {
|
|
|
|
/* We're at the end of a loop, loop if required */
|
|
|
|
if (--wwo->dwLoops > 0) {
|
|
|
|
wwo->lpPlayPtr = wwo->lpLoopPtr;
|
|
|
|
} else {
|
|
|
|
/* Handle overlapping loops correctly */
|
|
|
|
if (wwo->lpLoopPtr != lpWaveHdr && (lpWaveHdr->dwFlags & WHDR_BEGINLOOP)) {
|
|
|
|
FIXME("Correctly handled case ? (ending loop buffer also starts a new loop)\n");
|
|
|
|
/* shall we consider the END flag for the closing loop or for
|
|
|
|
* the opening one or for both ???
|
|
|
|
* code assumes for closing loop only
|
|
|
|
*/
|
|
|
|
} else {
|
2001-12-14 23:44:29 +01:00
|
|
|
lpWaveHdr = lpWaveHdr->lpNext;
|
|
|
|
}
|
|
|
|
wwo->lpLoopPtr = NULL;
|
|
|
|
wodPlayer_BeginWaveHdr(wwo, lpWaveHdr);
|
1999-04-11 14:16:24 +02:00
|
|
|
}
|
2001-11-09 21:26:59 +01:00
|
|
|
} else {
|
|
|
|
/* We're not in a loop. Advance to the next wave header */
|
2001-12-14 23:44:29 +01:00
|
|
|
wodPlayer_BeginWaveHdr(wwo, lpWaveHdr = lpWaveHdr->lpNext);
|
2001-11-09 21:26:59 +01:00
|
|
|
}
|
2001-12-14 23:44:29 +01:00
|
|
|
|
2001-11-09 21:26:59 +01:00
|
|
|
return lpWaveHdr;
|
|
|
|
}
|
1999-09-27 15:33:05 +02:00
|
|
|
|
2001-11-09 21:26:59 +01:00
|
|
|
/**************************************************************************
|
|
|
|
* wodPlayer_DSPWait [internal]
|
2002-06-01 01:06:46 +02:00
|
|
|
* Returns the number of milliseconds to wait for the DSP buffer to write
|
2002-01-12 22:15:08 +01:00
|
|
|
* one fragment.
|
2001-11-09 21:26:59 +01:00
|
|
|
*/
|
2002-01-12 22:15:08 +01:00
|
|
|
static DWORD wodPlayer_DSPWait(const WINE_WAVEOUT *wwo)
|
2001-11-09 21:26:59 +01:00
|
|
|
{
|
2002-01-12 22:15:08 +01:00
|
|
|
/* time for one fragment to be played */
|
|
|
|
return wwo->dwFragmentSize * 1000 / wwo->format.wf.nAvgBytesPerSec;
|
2001-11-09 21:26:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
* wodPlayer_NotifyWait [internal]
|
|
|
|
* Returns the number of milliseconds to wait before attempting to notify
|
|
|
|
* completion of the specified wavehdr.
|
|
|
|
* This is based on the number of bytes remaining to be written in the
|
|
|
|
* wave.
|
|
|
|
*/
|
2001-12-14 23:44:29 +01:00
|
|
|
static DWORD wodPlayer_NotifyWait(const WINE_WAVEOUT* wwo, LPWAVEHDR lpWaveHdr)
|
2001-11-09 21:26:59 +01:00
|
|
|
{
|
|
|
|
DWORD dwMillis;
|
2000-05-10 00:35:47 +02:00
|
|
|
|
2001-12-14 23:44:29 +01:00
|
|
|
if (lpWaveHdr->reserved < wwo->dwPlayedTotal) {
|
|
|
|
dwMillis = 1;
|
2001-11-09 21:26:59 +01:00
|
|
|
} else {
|
2001-12-14 23:44:29 +01:00
|
|
|
dwMillis = (lpWaveHdr->reserved - wwo->dwPlayedTotal) * 1000 / wwo->format.wf.nAvgBytesPerSec;
|
|
|
|
if (!dwMillis) dwMillis = 1;
|
2001-11-09 21:26:59 +01:00
|
|
|
}
|
2000-05-10 00:35:47 +02:00
|
|
|
|
2001-11-09 21:26:59 +01:00
|
|
|
return dwMillis;
|
|
|
|
}
|
2000-05-10 00:35:47 +02:00
|
|
|
|
2001-11-12 16:55:37 +01:00
|
|
|
|
2001-11-09 21:26:59 +01:00
|
|
|
/**************************************************************************
|
|
|
|
* wodPlayer_WriteMaxFrags [internal]
|
|
|
|
* Writes the maximum number of bytes possible to the DSP and returns
|
2002-04-01 23:02:49 +02:00
|
|
|
* TRUE iff the current playPtr has been fully played
|
2001-11-09 21:26:59 +01:00
|
|
|
*/
|
2002-04-01 23:02:49 +02:00
|
|
|
static BOOL wodPlayer_WriteMaxFrags(WINE_WAVEOUT* wwo, DWORD* bytes)
|
2001-11-09 21:26:59 +01:00
|
|
|
{
|
2002-04-01 23:02:49 +02:00
|
|
|
DWORD dwLength = wwo->lpPlayPtr->dwBufferLength - wwo->dwPartialOffset;
|
|
|
|
DWORD toWrite = min(dwLength, *bytes);
|
|
|
|
int written;
|
|
|
|
BOOL ret = FALSE;
|
2001-12-14 23:44:29 +01:00
|
|
|
|
2002-06-01 01:06:46 +02:00
|
|
|
TRACE("Writing wavehdr %p.%lu[%lu]/%lu\n",
|
2002-04-01 23:02:49 +02:00
|
|
|
wwo->lpPlayPtr, wwo->dwPartialOffset, wwo->lpPlayPtr->dwBufferLength, toWrite);
|
|
|
|
|
|
|
|
if (toWrite > 0)
|
|
|
|
{
|
2002-10-07 20:23:40 +02:00
|
|
|
written = write(wwo->ossdev->fd, wwo->lpPlayPtr->lpData + wwo->dwPartialOffset, toWrite);
|
2002-04-01 23:02:49 +02:00
|
|
|
if (written <= 0) return FALSE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
written = 0;
|
2001-12-14 23:44:29 +01:00
|
|
|
|
|
|
|
if (written >= dwLength) {
|
|
|
|
/* If we wrote all current wavehdr, skip to the next one */
|
|
|
|
wodPlayer_PlayPtrNext(wwo);
|
2002-04-01 23:02:49 +02:00
|
|
|
ret = TRUE;
|
2001-12-14 23:44:29 +01:00
|
|
|
} else {
|
|
|
|
/* Remove the amount written */
|
|
|
|
wwo->dwPartialOffset += written;
|
1999-04-11 14:16:24 +02:00
|
|
|
}
|
2001-12-14 23:44:29 +01:00
|
|
|
*bytes -= written;
|
|
|
|
wwo->dwWrittenTotal += written;
|
2003-11-14 22:03:24 +01:00
|
|
|
TRACE("dwWrittenTotal=%lu\n", wwo->dwWrittenTotal);
|
2002-04-01 23:02:49 +02:00
|
|
|
return ret;
|
1999-04-11 14:16:24 +02:00
|
|
|
}
|
|
|
|
|
2000-10-23 01:43:15 +02:00
|
|
|
|
1999-04-11 14:16:24 +02:00
|
|
|
/**************************************************************************
|
2001-11-09 21:26:59 +01:00
|
|
|
* wodPlayer_NotifyCompletions [internal]
|
1999-04-11 14:16:24 +02:00
|
|
|
*
|
2001-11-09 21:26:59 +01:00
|
|
|
* Notifies and remove from queue all wavehdrs which have been played to
|
|
|
|
* the speaker (ie. they have cleared the OSS buffer). If force is true,
|
|
|
|
* we notify all wavehdrs and remove them all from the queue even if they
|
|
|
|
* are unplayed or part of a loop.
|
1999-04-11 14:16:24 +02:00
|
|
|
*/
|
2001-12-14 23:44:29 +01:00
|
|
|
static DWORD wodPlayer_NotifyCompletions(WINE_WAVEOUT* wwo, BOOL force)
|
1999-04-11 14:16:24 +02:00
|
|
|
{
|
|
|
|
LPWAVEHDR lpWaveHdr;
|
2000-05-10 00:35:47 +02:00
|
|
|
|
2001-11-09 21:26:59 +01:00
|
|
|
/* Start from lpQueuePtr and keep notifying until:
|
|
|
|
* - we hit an unwritten wavehdr
|
|
|
|
* - we hit the beginning of a running loop
|
|
|
|
* - we hit a wavehdr which hasn't finished playing
|
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
while ((lpWaveHdr = wwo->lpQueuePtr) &&
|
|
|
|
(force ||
|
2001-12-14 23:44:29 +01:00
|
|
|
(lpWaveHdr != wwo->lpPlayPtr &&
|
|
|
|
lpWaveHdr != wwo->lpLoopPtr &&
|
|
|
|
lpWaveHdr->reserved <= wwo->dwPlayedTotal))) {
|
2000-05-10 00:35:47 +02:00
|
|
|
|
2000-06-20 22:18:09 +02:00
|
|
|
wwo->lpQueuePtr = lpWaveHdr->lpNext;
|
|
|
|
|
2000-05-10 00:35:47 +02:00
|
|
|
lpWaveHdr->dwFlags &= ~WHDR_INQUEUE;
|
|
|
|
lpWaveHdr->dwFlags |= WHDR_DONE;
|
|
|
|
|
2001-12-14 23:44:29 +01:00
|
|
|
wodNotifyClient(wwo, WOM_DONE, (DWORD)lpWaveHdr, 0);
|
1999-04-11 14:16:24 +02:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
return (lpWaveHdr && lpWaveHdr != wwo->lpPlayPtr && lpWaveHdr != wwo->lpLoopPtr) ?
|
2001-12-14 23:44:29 +01:00
|
|
|
wodPlayer_NotifyWait(wwo, lpWaveHdr) : INFINITE;
|
1999-04-11 14:16:24 +02:00
|
|
|
}
|
|
|
|
|
1999-05-24 10:19:48 +02:00
|
|
|
/**************************************************************************
|
|
|
|
* wodPlayer_Reset [internal]
|
|
|
|
*
|
|
|
|
* wodPlayer helper. Resets current output stream.
|
|
|
|
*/
|
2001-12-14 23:44:29 +01:00
|
|
|
static void wodPlayer_Reset(WINE_WAVEOUT* wwo, BOOL reset)
|
1999-05-24 10:19:48 +02:00
|
|
|
{
|
2001-12-21 21:28:43 +01:00
|
|
|
wodUpdatePlayedTotal(wwo, NULL);
|
1999-05-24 10:19:48 +02:00
|
|
|
/* updates current notify list */
|
2001-12-14 23:44:29 +01:00
|
|
|
wodPlayer_NotifyCompletions(wwo, FALSE);
|
1999-05-24 10:19:48 +02:00
|
|
|
|
|
|
|
/* flush all possible output */
|
2002-10-09 22:37:09 +02:00
|
|
|
if (OSS_ResetDevice(wwo->ossdev) != MMSYSERR_NOERROR)
|
2002-10-07 20:23:40 +02:00
|
|
|
{
|
1999-05-24 10:19:48 +02:00
|
|
|
wwo->hThread = 0;
|
|
|
|
wwo->state = WINE_WS_STOPPED;
|
|
|
|
ExitThread(-1);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (reset) {
|
2002-01-12 22:15:08 +01:00
|
|
|
enum win_wm_message msg;
|
|
|
|
DWORD param;
|
|
|
|
HANDLE ev;
|
|
|
|
|
|
|
|
/* remove any buffer */
|
2001-12-14 23:44:29 +01:00
|
|
|
wodPlayer_NotifyCompletions(wwo, TRUE);
|
2000-05-10 00:35:47 +02:00
|
|
|
|
|
|
|
wwo->lpPlayPtr = wwo->lpQueuePtr = wwo->lpLoopPtr = NULL;
|
1999-05-24 10:19:48 +02:00
|
|
|
wwo->state = WINE_WS_STOPPED;
|
2001-12-21 21:28:43 +01:00
|
|
|
wwo->dwPlayedTotal = wwo->dwWrittenTotal = 0;
|
|
|
|
/* Clear partial wavehdr */
|
|
|
|
wwo->dwPartialOffset = 0;
|
2002-01-12 22:15:08 +01:00
|
|
|
|
|
|
|
/* remove any existing message in the ring */
|
|
|
|
EnterCriticalSection(&wwo->msgRing.msg_crst);
|
|
|
|
/* return all pending headers in queue */
|
|
|
|
while (OSS_RetrieveRingMessage(&wwo->msgRing, &msg, ¶m, &ev))
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
if (msg != WINE_WM_HEADER)
|
2002-01-12 22:15:08 +01:00
|
|
|
{
|
|
|
|
FIXME("shouldn't have headers left\n");
|
|
|
|
SetEvent(ev);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
((LPWAVEHDR)param)->dwFlags &= ~WHDR_INQUEUE;
|
|
|
|
((LPWAVEHDR)param)->dwFlags |= WHDR_DONE;
|
|
|
|
|
|
|
|
wodNotifyClient(wwo, WOM_DONE, param, 0);
|
|
|
|
}
|
2002-08-26 23:49:42 +02:00
|
|
|
RESET_OMR(&wwo->msgRing);
|
2002-01-12 22:15:08 +01:00
|
|
|
LeaveCriticalSection(&wwo->msgRing.msg_crst);
|
1999-05-24 10:19:48 +02:00
|
|
|
} else {
|
2001-12-21 21:28:43 +01:00
|
|
|
if (wwo->lpLoopPtr) {
|
|
|
|
/* complicated case, not handled yet (could imply modifying the loop counter */
|
|
|
|
FIXME("Pausing while in loop isn't correctly handled yet, except strange results\n");
|
|
|
|
wwo->lpPlayPtr = wwo->lpLoopPtr;
|
|
|
|
wwo->dwPartialOffset = 0;
|
|
|
|
wwo->dwWrittenTotal = wwo->dwPlayedTotal; /* this is wrong !!! */
|
|
|
|
} else {
|
|
|
|
LPWAVEHDR ptr;
|
|
|
|
DWORD sz = wwo->dwPartialOffset;
|
|
|
|
|
|
|
|
/* reset all the data as if we had written only up to lpPlayedTotal bytes */
|
|
|
|
/* compute the max size playable from lpQueuePtr */
|
|
|
|
for (ptr = wwo->lpQueuePtr; ptr != wwo->lpPlayPtr; ptr = ptr->lpNext) {
|
|
|
|
sz += ptr->dwBufferLength;
|
|
|
|
}
|
|
|
|
/* because the reset lpPlayPtr will be lpQueuePtr */
|
|
|
|
if (wwo->dwWrittenTotal > wwo->dwPlayedTotal + sz) ERR("grin\n");
|
|
|
|
wwo->dwPartialOffset = sz - (wwo->dwWrittenTotal - wwo->dwPlayedTotal);
|
|
|
|
wwo->dwWrittenTotal = wwo->dwPlayedTotal;
|
|
|
|
wwo->lpPlayPtr = wwo->lpQueuePtr;
|
|
|
|
}
|
1999-05-24 10:19:48 +02:00
|
|
|
wwo->state = WINE_WS_PAUSED;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-11-09 21:26:59 +01:00
|
|
|
/**************************************************************************
|
|
|
|
* wodPlayer_ProcessMessages [internal]
|
|
|
|
*/
|
2001-12-14 23:44:29 +01:00
|
|
|
static void wodPlayer_ProcessMessages(WINE_WAVEOUT* wwo)
|
1999-04-11 14:16:24 +02:00
|
|
|
{
|
2001-11-09 21:26:59 +01:00
|
|
|
LPWAVEHDR lpWaveHdr;
|
2001-12-14 23:44:29 +01:00
|
|
|
enum win_wm_message msg;
|
2000-10-23 01:43:15 +02:00
|
|
|
DWORD param;
|
2001-11-12 16:55:37 +01:00
|
|
|
HANDLE ev;
|
2001-11-09 21:26:59 +01:00
|
|
|
|
2001-11-12 16:55:37 +01:00
|
|
|
while (OSS_RetrieveRingMessage(&wwo->msgRing, &msg, ¶m, &ev)) {
|
2001-12-14 23:44:29 +01:00
|
|
|
TRACE("Received %s %lx\n", wodPlayerCmdString[msg - WM_USER - 1], param);
|
2001-11-09 21:26:59 +01:00
|
|
|
switch (msg) {
|
|
|
|
case WINE_WM_PAUSING:
|
2001-12-14 23:44:29 +01:00
|
|
|
wodPlayer_Reset(wwo, FALSE);
|
2001-11-12 16:55:37 +01:00
|
|
|
SetEvent(ev);
|
2001-11-09 21:26:59 +01:00
|
|
|
break;
|
|
|
|
case WINE_WM_RESTARTING:
|
2002-06-01 01:06:46 +02:00
|
|
|
if (wwo->state == WINE_WS_PAUSED)
|
2002-04-23 00:35:30 +02:00
|
|
|
{
|
|
|
|
wwo->state = WINE_WS_PLAYING;
|
|
|
|
}
|
2001-11-12 16:55:37 +01:00
|
|
|
SetEvent(ev);
|
2001-11-09 21:26:59 +01:00
|
|
|
break;
|
|
|
|
case WINE_WM_HEADER:
|
|
|
|
lpWaveHdr = (LPWAVEHDR)param;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2001-11-09 21:26:59 +01:00
|
|
|
/* insert buffer at the end of queue */
|
2000-10-23 01:43:15 +02:00
|
|
|
{
|
2001-11-09 21:26:59 +01:00
|
|
|
LPWAVEHDR* wh;
|
|
|
|
for (wh = &(wwo->lpQueuePtr); *wh; wh = &((*wh)->lpNext));
|
|
|
|
*wh = lpWaveHdr;
|
2000-10-23 01:43:15 +02:00
|
|
|
}
|
2001-12-14 23:44:29 +01:00
|
|
|
if (!wwo->lpPlayPtr)
|
|
|
|
wodPlayer_BeginWaveHdr(wwo,lpWaveHdr);
|
2001-11-09 21:26:59 +01:00
|
|
|
if (wwo->state == WINE_WS_STOPPED)
|
|
|
|
wwo->state = WINE_WS_PLAYING;
|
|
|
|
break;
|
|
|
|
case WINE_WM_RESETTING:
|
2001-12-14 23:44:29 +01:00
|
|
|
wodPlayer_Reset(wwo, TRUE);
|
2001-11-12 16:55:37 +01:00
|
|
|
SetEvent(ev);
|
2001-11-09 21:26:59 +01:00
|
|
|
break;
|
2001-12-14 23:44:29 +01:00
|
|
|
case WINE_WM_UPDATE:
|
2001-12-21 21:28:43 +01:00
|
|
|
wodUpdatePlayedTotal(wwo, NULL);
|
2001-12-14 23:44:29 +01:00
|
|
|
SetEvent(ev);
|
|
|
|
break;
|
|
|
|
case WINE_WM_BREAKLOOP:
|
|
|
|
if (wwo->state == WINE_WS_PLAYING && wwo->lpLoopPtr != NULL) {
|
|
|
|
/* ensure exit at end of current loop */
|
|
|
|
wwo->dwLoops = 1;
|
|
|
|
}
|
|
|
|
SetEvent(ev);
|
|
|
|
break;
|
2001-11-09 21:26:59 +01:00
|
|
|
case WINE_WM_CLOSING:
|
|
|
|
/* sanity check: this should not happen since the device must have been reset before */
|
|
|
|
if (wwo->lpQueuePtr || wwo->lpPlayPtr) ERR("out of sync\n");
|
|
|
|
wwo->hThread = 0;
|
|
|
|
wwo->state = WINE_WS_CLOSED;
|
2001-11-12 16:55:37 +01:00
|
|
|
SetEvent(ev);
|
2001-11-09 21:26:59 +01:00
|
|
|
ExitThread(0);
|
|
|
|
/* shouldn't go here */
|
|
|
|
default:
|
|
|
|
FIXME("unknown message %d\n", msg);
|
|
|
|
break;
|
2000-10-23 01:43:15 +02:00
|
|
|
}
|
2001-11-09 21:26:59 +01:00
|
|
|
}
|
|
|
|
}
|
2000-10-23 01:43:15 +02:00
|
|
|
|
2001-11-09 21:26:59 +01:00
|
|
|
/**************************************************************************
|
|
|
|
* wodPlayer_FeedDSP [internal]
|
|
|
|
* Feed as much sound data as we can into the DSP and return the number of
|
|
|
|
* milliseconds before it will be necessary to feed the DSP again.
|
|
|
|
*/
|
2001-12-14 23:44:29 +01:00
|
|
|
static DWORD wodPlayer_FeedDSP(WINE_WAVEOUT* wwo)
|
2001-11-09 21:26:59 +01:00
|
|
|
{
|
|
|
|
audio_buf_info dspspace;
|
2001-12-14 23:44:29 +01:00
|
|
|
DWORD availInQ;
|
2001-11-09 21:26:59 +01:00
|
|
|
|
2001-12-21 21:28:43 +01:00
|
|
|
wodUpdatePlayedTotal(wwo, &dspspace);
|
|
|
|
availInQ = dspspace.bytes;
|
2001-12-14 23:44:29 +01:00
|
|
|
TRACE("fragments=%d/%d, fragsize=%d, bytes=%d\n",
|
2002-08-26 23:49:42 +02:00
|
|
|
dspspace.fragments, dspspace.fragstotal, dspspace.fragsize, dspspace.bytes);
|
2001-11-09 21:26:59 +01:00
|
|
|
|
2002-12-15 03:59:13 +01:00
|
|
|
/* input queue empty and output buffer with less than one fragment to play
|
|
|
|
* actually some cards do not play the fragment before the last if this one is partially feed
|
|
|
|
* so we need to test for full the availability of 2 fragments
|
|
|
|
*/
|
|
|
|
if (!wwo->lpPlayPtr && wwo->dwBufferSize < availInQ + 2 * wwo->dwFragmentSize &&
|
|
|
|
!wwo->bNeedPost) {
|
2002-08-26 23:49:42 +02:00
|
|
|
TRACE("Run out of wavehdr:s...\n");
|
2001-12-14 23:44:29 +01:00
|
|
|
return INFINITE;
|
2001-11-09 21:26:59 +01:00
|
|
|
}
|
|
|
|
|
2001-12-14 23:44:29 +01:00
|
|
|
/* no more room... no need to try to feed */
|
2002-01-12 22:15:08 +01:00
|
|
|
if (dspspace.fragments != 0) {
|
|
|
|
/* Feed from partial wavehdr */
|
|
|
|
if (wwo->lpPlayPtr && wwo->dwPartialOffset != 0) {
|
|
|
|
wodPlayer_WriteMaxFrags(wwo, &availInQ);
|
|
|
|
}
|
2001-11-09 21:26:59 +01:00
|
|
|
|
2002-01-12 22:15:08 +01:00
|
|
|
/* Feed wavehdrs until we run out of wavehdrs or DSP space */
|
2002-04-01 23:02:49 +02:00
|
|
|
if (wwo->dwPartialOffset == 0 && wwo->lpPlayPtr) {
|
|
|
|
do {
|
2002-06-01 01:06:46 +02:00
|
|
|
TRACE("Setting time to elapse for %p to %lu\n",
|
2002-04-01 23:02:49 +02:00
|
|
|
wwo->lpPlayPtr, wwo->dwWrittenTotal + wwo->lpPlayPtr->dwBufferLength);
|
2002-01-12 22:15:08 +01:00
|
|
|
/* note the value that dwPlayedTotal will return when this wave finishes playing */
|
|
|
|
wwo->lpPlayPtr->reserved = wwo->dwWrittenTotal + wwo->lpPlayPtr->dwBufferLength;
|
2002-04-01 23:02:49 +02:00
|
|
|
} while (wodPlayer_WriteMaxFrags(wwo, &availInQ) && wwo->lpPlayPtr && availInQ > 0);
|
2002-01-12 22:15:08 +01:00
|
|
|
}
|
2002-08-26 23:49:42 +02:00
|
|
|
|
|
|
|
if (wwo->bNeedPost) {
|
|
|
|
/* OSS doesn't start before it gets either 2 fragments or a SNDCTL_DSP_POST;
|
|
|
|
* if it didn't get one, we give it the other */
|
|
|
|
if (wwo->dwBufferSize < availInQ + 2 * wwo->dwFragmentSize)
|
2002-10-07 20:23:40 +02:00
|
|
|
ioctl(wwo->ossdev->fd, SNDCTL_DSP_POST, 0);
|
2002-08-26 23:49:42 +02:00
|
|
|
wwo->bNeedPost = FALSE;
|
|
|
|
}
|
2001-11-09 21:26:59 +01:00
|
|
|
}
|
|
|
|
|
2002-01-12 22:15:08 +01:00
|
|
|
return wodPlayer_DSPWait(wwo);
|
2001-11-09 21:26:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
* wodPlayer [internal]
|
|
|
|
*/
|
|
|
|
static DWORD CALLBACK wodPlayer(LPVOID pmt)
|
|
|
|
{
|
|
|
|
WORD uDevID = (DWORD)pmt;
|
|
|
|
WINE_WAVEOUT* wwo = (WINE_WAVEOUT*)&WOutDev[uDevID];
|
2001-12-14 23:44:29 +01:00
|
|
|
DWORD dwNextFeedTime = INFINITE; /* Time before DSP needs feeding */
|
|
|
|
DWORD dwNextNotifyTime = INFINITE; /* Time before next wave completion */
|
|
|
|
DWORD dwSleepTime;
|
|
|
|
|
|
|
|
wwo->state = WINE_WS_STOPPED;
|
|
|
|
SetEvent(wwo->hStartUpEvent);
|
|
|
|
|
|
|
|
for (;;) {
|
|
|
|
/** Wait for the shortest time before an action is required. If there
|
|
|
|
* are no pending actions, wait forever for a command.
|
|
|
|
*/
|
|
|
|
dwSleepTime = min(dwNextFeedTime, dwNextNotifyTime);
|
|
|
|
TRACE("waiting %lums (%lu,%lu)\n", dwSleepTime, dwNextFeedTime, dwNextNotifyTime);
|
2002-08-26 23:49:42 +02:00
|
|
|
WAIT_OMR(&wwo->msgRing, dwSleepTime);
|
2001-12-14 23:44:29 +01:00
|
|
|
wodPlayer_ProcessMessages(wwo);
|
|
|
|
if (wwo->state == WINE_WS_PLAYING) {
|
|
|
|
dwNextFeedTime = wodPlayer_FeedDSP(wwo);
|
|
|
|
dwNextNotifyTime = wodPlayer_NotifyCompletions(wwo, FALSE);
|
2002-08-26 23:49:42 +02:00
|
|
|
if (dwNextFeedTime == INFINITE) {
|
|
|
|
/* FeedDSP ran out of data, but before flushing, */
|
|
|
|
/* check that a notification didn't give us more */
|
|
|
|
wodPlayer_ProcessMessages(wwo);
|
|
|
|
if (!wwo->lpPlayPtr) {
|
|
|
|
TRACE("flushing\n");
|
2002-10-07 20:23:40 +02:00
|
|
|
ioctl(wwo->ossdev->fd, SNDCTL_DSP_SYNC, 0);
|
2002-08-26 23:49:42 +02:00
|
|
|
wwo->dwPlayedTotal = wwo->dwWrittenTotal;
|
2002-12-15 03:59:13 +01:00
|
|
|
dwNextNotifyTime = wodPlayer_NotifyCompletions(wwo, FALSE);
|
|
|
|
} else {
|
2002-08-26 23:49:42 +02:00
|
|
|
TRACE("recovering\n");
|
|
|
|
dwNextFeedTime = wodPlayer_FeedDSP(wwo);
|
|
|
|
}
|
|
|
|
}
|
2001-11-09 21:26:59 +01:00
|
|
|
} else {
|
2001-12-14 23:44:29 +01:00
|
|
|
dwNextFeedTime = dwNextNotifyTime = INFINITE;
|
1999-05-24 10:19:48 +02:00
|
|
|
}
|
1999-04-11 14:16:24 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1994-07-07 18:23:58 +02:00
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* wodGetDevCaps [internal]
|
|
|
|
*/
|
1999-09-22 18:45:33 +02:00
|
|
|
static DWORD wodGetDevCaps(WORD wDevID, LPWAVEOUTCAPSA lpCaps, DWORD dwSize)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u, %p, %lu);\n", wDevID, lpCaps, dwSize);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1998-10-11 16:14:24 +02:00
|
|
|
if (lpCaps == NULL) return MMSYSERR_NOTENABLED;
|
2002-08-09 03:02:25 +02:00
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numOutDev) {
|
|
|
|
TRACE("numOutDev reached !\n");
|
1999-04-11 14:16:24 +02:00
|
|
|
return MMSYSERR_BADDEVICEID;
|
|
|
|
}
|
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
memcpy(lpCaps, &WOutDev[wDevID].ossdev->out_caps, min(dwSize, sizeof(*lpCaps)));
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOERROR;
|
1994-07-07 18:23:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* wodOpen [internal]
|
|
|
|
*/
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
2000-08-25 23:33:45 +02:00
|
|
|
int audio_fragment;
|
2000-06-24 19:54:43 +02:00
|
|
|
WINE_WAVEOUT* wwo;
|
2001-11-09 21:26:59 +01:00
|
|
|
audio_buf_info info;
|
2002-06-28 19:31:31 +02:00
|
|
|
DWORD ret;
|
1999-05-24 10:19:48 +02:00
|
|
|
|
2003-05-11 05:30:51 +02:00
|
|
|
TRACE("(%u, %p[cb=%08lx], %08lX);\n", wDevID, lpDesc, lpDesc->dwCallback, dwFlags);
|
1998-10-11 16:14:24 +02:00
|
|
|
if (lpDesc == NULL) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("Invalid Parameter !\n");
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_INVALPARAM;
|
|
|
|
}
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numOutDev) {
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("MAX_WAVOUTDRV reached !\n");
|
1999-04-11 14:16:24 +02:00
|
|
|
return MMSYSERR_BADDEVICEID;
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
1999-05-24 10:19:48 +02:00
|
|
|
|
1999-04-18 11:30:54 +02:00
|
|
|
/* only PCM format is supported so far... */
|
|
|
|
if (lpDesc->lpFormat->wFormatTag != WAVE_FORMAT_PCM ||
|
|
|
|
lpDesc->lpFormat->nChannels == 0 ||
|
|
|
|
lpDesc->lpFormat->nSamplesPerSec == 0) {
|
2002-06-01 01:06:46 +02:00
|
|
|
WARN("Bad format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n",
|
1999-04-18 11:30:54 +02:00
|
|
|
lpDesc->lpFormat->wFormatTag, lpDesc->lpFormat->nChannels,
|
|
|
|
lpDesc->lpFormat->nSamplesPerSec);
|
|
|
|
return WAVERR_BADFORMAT;
|
|
|
|
}
|
|
|
|
|
1999-09-22 18:45:33 +02:00
|
|
|
if (dwFlags & WAVE_FORMAT_QUERY) {
|
2002-06-01 01:06:46 +02:00
|
|
|
TRACE("Query format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n",
|
1999-09-22 18:45:33 +02:00
|
|
|
lpDesc->lpFormat->wFormatTag, lpDesc->lpFormat->nChannels,
|
|
|
|
lpDesc->lpFormat->nSamplesPerSec);
|
1999-04-18 11:30:54 +02:00
|
|
|
return MMSYSERR_NOERROR;
|
1999-09-22 18:45:33 +02:00
|
|
|
}
|
1999-04-18 11:30:54 +02:00
|
|
|
|
2000-06-24 19:54:43 +02:00
|
|
|
wwo = &WOutDev[wDevID];
|
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
if ((dwFlags & WAVE_DIRECTSOUND) &&
|
|
|
|
!(wwo->ossdev->out_caps.dwSupport & WAVECAPS_DIRECTSOUND))
|
2000-08-25 23:33:45 +02:00
|
|
|
/* not supported, ignore it */
|
|
|
|
dwFlags &= ~WAVE_DIRECTSOUND;
|
2000-06-24 14:55:33 +02:00
|
|
|
|
|
|
|
if (dwFlags & WAVE_DIRECTSOUND) {
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wwo->ossdev->out_caps.dwSupport & WAVECAPS_SAMPLEACCURATE)
|
2000-12-21 21:20:34 +01:00
|
|
|
/* we have realtime DirectSound, fragments just waste our time,
|
|
|
|
* but a large buffer is good, so choose 64KB (32 * 2^11) */
|
|
|
|
audio_fragment = 0x0020000B;
|
|
|
|
else
|
|
|
|
/* to approximate realtime, we must use small fragments,
|
|
|
|
* let's try to fragment the above 64KB (256 * 2^8) */
|
|
|
|
audio_fragment = 0x01000008;
|
2000-06-24 14:55:33 +02:00
|
|
|
} else {
|
2003-11-04 05:20:47 +01:00
|
|
|
/* A wave device must have a worst case latency of 10 ms so calculate
|
|
|
|
* the largest fragment size less than 10 ms long.
|
2000-06-24 14:55:33 +02:00
|
|
|
*/
|
2003-11-04 05:20:47 +01:00
|
|
|
int fsize = lpDesc->lpFormat->nAvgBytesPerSec / 100; /* 10 ms chunk */
|
|
|
|
int shift = 0;
|
|
|
|
while ((1 << shift) <= fsize)
|
|
|
|
shift++;
|
|
|
|
shift--;
|
|
|
|
audio_fragment = 0x00100000 + shift; /* 16 fragments of 2^shift */
|
2000-06-24 14:55:33 +02:00
|
|
|
}
|
2003-11-04 05:20:47 +01:00
|
|
|
|
|
|
|
TRACE("using %d %d byte fragments (%ld ms)\n", audio_fragment >> 16,
|
|
|
|
1 << (audio_fragment & 0xffff),
|
|
|
|
((1 << (audio_fragment & 0xffff)) * 1000) / lpDesc->lpFormat->nAvgBytesPerSec);
|
|
|
|
|
2002-10-07 20:23:40 +02:00
|
|
|
if (wwo->state != WINE_WS_CLOSED) return MMSYSERR_ALLOCATED;
|
2002-06-28 19:31:31 +02:00
|
|
|
/* we want to be able to mmap() the device, which means it must be opened readable,
|
|
|
|
* otherwise mmap() will fail (at least under Linux) */
|
2002-10-07 20:23:40 +02:00
|
|
|
ret = OSS_OpenDevice(wwo->ossdev,
|
2002-06-28 19:31:31 +02:00
|
|
|
(dwFlags & WAVE_DIRECTSOUND) ? O_RDWR : O_WRONLY,
|
2003-01-08 00:08:05 +01:00
|
|
|
&audio_fragment,
|
|
|
|
(dwFlags & WAVE_DIRECTSOUND) ? 0 : 1,
|
|
|
|
lpDesc->lpFormat->nSamplesPerSec,
|
2002-06-28 19:31:31 +02:00
|
|
|
(lpDesc->lpFormat->nChannels > 1) ? 1 : 0,
|
2002-08-09 03:02:25 +02:00
|
|
|
(lpDesc->lpFormat->wBitsPerSample == 16)
|
2002-06-28 19:31:31 +02:00
|
|
|
? AFMT_S16_LE : AFMT_U8);
|
2003-01-16 01:19:04 +01:00
|
|
|
if ((ret==MMSYSERR_NOERROR) && (dwFlags & WAVE_DIRECTSOUND)) {
|
2003-01-08 00:08:05 +01:00
|
|
|
lpDesc->lpFormat->nSamplesPerSec=wwo->ossdev->sample_rate;
|
|
|
|
lpDesc->lpFormat->nChannels=(wwo->ossdev->stereo ? 2 : 1);
|
|
|
|
lpDesc->lpFormat->wBitsPerSample=(wwo->ossdev->format == AFMT_U8 ? 8 : 16);
|
|
|
|
lpDesc->lpFormat->nBlockAlign=lpDesc->lpFormat->nChannels*lpDesc->lpFormat->wBitsPerSample/8;
|
|
|
|
lpDesc->lpFormat->nAvgBytesPerSec=lpDesc->lpFormat->nSamplesPerSec*lpDesc->lpFormat->nBlockAlign;
|
|
|
|
TRACE("OSS_OpenDevice returned this format: %ldx%dx%d\n",
|
|
|
|
lpDesc->lpFormat->nSamplesPerSec,
|
|
|
|
lpDesc->lpFormat->wBitsPerSample,
|
|
|
|
lpDesc->lpFormat->nChannels);
|
|
|
|
}
|
2002-06-28 19:31:31 +02:00
|
|
|
if (ret != 0) return ret;
|
2002-10-07 20:23:40 +02:00
|
|
|
wwo->state = WINE_WS_STOPPED;
|
2002-06-28 19:31:31 +02:00
|
|
|
|
|
|
|
wwo->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK);
|
|
|
|
|
|
|
|
memcpy(&wwo->waveDesc, lpDesc, sizeof(WAVEOPENDESC));
|
|
|
|
memcpy(&wwo->format, lpDesc->lpFormat, sizeof(PCMWAVEFORMAT));
|
1999-09-22 18:45:33 +02:00
|
|
|
|
2002-06-28 19:31:31 +02:00
|
|
|
if (wwo->format.wBitsPerSample == 0) {
|
|
|
|
WARN("Resetting zeroed wBitsPerSample\n");
|
|
|
|
wwo->format.wBitsPerSample = 8 *
|
|
|
|
(wwo->format.wf.nAvgBytesPerSec /
|
|
|
|
wwo->format.wf.nSamplesPerSec) /
|
|
|
|
wwo->format.wf.nChannels;
|
|
|
|
}
|
2001-11-09 21:26:59 +01:00
|
|
|
/* Read output space info for future reference */
|
2002-10-07 20:23:40 +02:00
|
|
|
if (ioctl(wwo->ossdev->fd, SNDCTL_DSP_GETOSPACE, &info) < 0) {
|
2003-03-15 01:54:11 +01:00
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_GETOSPACE) failed (%s)\n", wwo->ossdev->dev_name, strerror(errno));
|
2002-10-07 20:23:40 +02:00
|
|
|
OSS_CloseDevice(wwo->ossdev);
|
|
|
|
wwo->state = WINE_WS_CLOSED;
|
2000-08-25 23:33:45 +02:00
|
|
|
return MMSYSERR_NOTENABLED;
|
|
|
|
}
|
2001-11-09 21:26:59 +01:00
|
|
|
|
|
|
|
/* Check that fragsize is correct per our settings above */
|
|
|
|
if ((info.fragsize > 1024) && (LOWORD(audio_fragment) <= 10)) {
|
2001-03-21 04:37:33 +01:00
|
|
|
/* we've tried to set 1K fragments or less, but it didn't work */
|
2001-11-09 21:26:59 +01:00
|
|
|
ERR("fragment size set failed, size is now %d\n", info.fragsize);
|
2001-03-21 04:37:33 +01:00
|
|
|
MESSAGE("Your Open Sound System driver did not let us configure small enough sound fragments.\n");
|
|
|
|
MESSAGE("This may cause delays and other problems in audio playback with certain applications.\n");
|
|
|
|
}
|
1999-04-18 11:30:54 +02:00
|
|
|
|
2001-11-09 21:26:59 +01:00
|
|
|
/* Remember fragsize and total buffer size for future use */
|
|
|
|
wwo->dwFragmentSize = info.fragsize;
|
|
|
|
wwo->dwBufferSize = info.fragstotal * info.fragsize;
|
2001-12-14 23:44:29 +01:00
|
|
|
wwo->dwPlayedTotal = 0;
|
|
|
|
wwo->dwWrittenTotal = 0;
|
2002-08-26 23:49:42 +02:00
|
|
|
wwo->bNeedPost = TRUE;
|
2001-11-12 16:55:37 +01:00
|
|
|
|
|
|
|
OSS_InitRingMessage(&wwo->msgRing);
|
2000-10-23 01:43:15 +02:00
|
|
|
|
2003-01-15 01:44:50 +01:00
|
|
|
wwo->hStartUpEvent = CreateEventA(NULL, FALSE, FALSE, NULL);
|
|
|
|
wwo->hThread = CreateThread(NULL, 0, wodPlayer, (LPVOID)(DWORD)wDevID, 0, &(wwo->dwThreadID));
|
|
|
|
WaitForSingleObject(wwo->hStartUpEvent, INFINITE);
|
|
|
|
CloseHandle(wwo->hStartUpEvent);
|
2001-11-12 16:55:37 +01:00
|
|
|
wwo->hStartUpEvent = INVALID_HANDLE_VALUE;
|
1999-05-24 10:19:48 +02:00
|
|
|
|
2002-06-01 01:06:46 +02:00
|
|
|
TRACE("fd=%d fragmentSize=%ld\n",
|
2002-10-07 20:23:40 +02:00
|
|
|
wwo->ossdev->fd, wwo->dwFragmentSize);
|
2000-06-24 19:54:43 +02:00
|
|
|
if (wwo->dwFragmentSize % wwo->format.wf.nBlockAlign)
|
2000-05-10 00:35:47 +02:00
|
|
|
ERR("Fragment doesn't contain an integral number of data blocks\n");
|
1999-04-18 11:30:54 +02:00
|
|
|
|
2002-06-01 01:06:46 +02:00
|
|
|
TRACE("wBitsPerSample=%u, nAvgBytesPerSec=%lu, nSamplesPerSec=%lu, nChannels=%u nBlockAlign=%u!\n",
|
|
|
|
wwo->format.wBitsPerSample, wwo->format.wf.nAvgBytesPerSec,
|
2000-06-24 19:54:43 +02:00
|
|
|
wwo->format.wf.nSamplesPerSec, wwo->format.wf.nChannels,
|
|
|
|
wwo->format.wf.nBlockAlign);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2001-12-14 23:44:29 +01:00
|
|
|
return wodNotifyClient(wwo, WOM_OPEN, 0L, 0L);
|
1994-07-07 18:23:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* wodClose [internal]
|
|
|
|
*/
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
static DWORD wodClose(WORD wDevID)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
2000-06-24 19:54:43 +02:00
|
|
|
DWORD ret = MMSYSERR_NOERROR;
|
|
|
|
WINE_WAVEOUT* wwo;
|
|
|
|
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u);\n", wDevID);
|
2002-08-09 03:02:25 +02:00
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numOutDev || WOutDev[wDevID].state == WINE_WS_CLOSED) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("bad device ID !\n");
|
1999-04-11 14:16:24 +02:00
|
|
|
return MMSYSERR_BADDEVICEID;
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2000-06-24 19:54:43 +02:00
|
|
|
wwo = &WOutDev[wDevID];
|
|
|
|
if (wwo->lpQueuePtr) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("buffers still playing !\n");
|
1999-04-11 14:16:24 +02:00
|
|
|
ret = WAVERR_STILLPLAYING;
|
|
|
|
} else {
|
2001-11-12 16:55:37 +01:00
|
|
|
if (wwo->hThread != INVALID_HANDLE_VALUE) {
|
|
|
|
OSS_AddRingMessage(&wwo->msgRing, WINE_WM_CLOSING, 0, TRUE);
|
2000-06-24 14:55:33 +02:00
|
|
|
}
|
1999-05-24 10:19:48 +02:00
|
|
|
|
2001-12-21 21:28:43 +01:00
|
|
|
OSS_DestroyRingMessage(&wwo->msgRing);
|
|
|
|
|
2002-10-07 20:23:40 +02:00
|
|
|
OSS_CloseDevice(wwo->ossdev);
|
|
|
|
wwo->state = WINE_WS_CLOSED;
|
2000-06-24 19:54:43 +02:00
|
|
|
wwo->dwFragmentSize = 0;
|
2001-12-14 23:44:29 +01:00
|
|
|
ret = wodNotifyClient(wwo, WOM_CLOSE, 0L, 0L);
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
1999-04-11 14:16:24 +02:00
|
|
|
return ret;
|
1994-07-07 18:23:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* wodWrite [internal]
|
2002-06-01 01:06:46 +02:00
|
|
|
*
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
*/
|
|
|
|
static DWORD wodWrite(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-11 14:16:24 +02:00
|
|
|
/* first, do the sanity checks... */
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numOutDev || WOutDev[wDevID].state == WINE_WS_CLOSED) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("bad dev ID !\n");
|
1999-04-11 14:16:24 +02:00
|
|
|
return MMSYSERR_BADDEVICEID;
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
|
|
|
if (lpWaveHdr->lpData == NULL || !(lpWaveHdr->dwFlags & WHDR_PREPARED))
|
1999-04-11 14:16:24 +02:00
|
|
|
return WAVERR_UNPREPARED;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
|
|
|
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
1999-04-11 14:16:24 +02:00
|
|
|
return WAVERR_STILLPLAYING;
|
1999-05-24 10:19:48 +02:00
|
|
|
|
2000-06-20 22:18:09 +02:00
|
|
|
lpWaveHdr->dwFlags &= ~WHDR_DONE;
|
|
|
|
lpWaveHdr->dwFlags |= WHDR_INQUEUE;
|
|
|
|
lpWaveHdr->lpNext = 0;
|
|
|
|
|
2003-01-07 20:43:02 +01:00
|
|
|
if ((lpWaveHdr->dwBufferLength & (WOutDev[wDevID].format.wf.nBlockAlign - 1)) != 0)
|
2002-06-28 19:31:31 +02:00
|
|
|
{
|
2003-01-07 20:43:02 +01:00
|
|
|
WARN("WaveHdr length isn't a multiple of the PCM block size: %ld %% %d\n",lpWaveHdr->dwBufferLength,WOutDev[wDevID].format.wf.nBlockAlign);
|
2002-06-28 19:31:31 +02:00
|
|
|
lpWaveHdr->dwBufferLength &= ~(WOutDev[wDevID].format.wf.nBlockAlign - 1);
|
|
|
|
}
|
|
|
|
|
2001-11-12 16:55:37 +01:00
|
|
|
OSS_AddRingMessage(&WOutDev[wDevID].msgRing, WINE_WM_HEADER, (DWORD)lpWaveHdr, FALSE);
|
1999-05-24 10:19:48 +02:00
|
|
|
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOERROR;
|
1994-07-07 18:23:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* wodPrepare [internal]
|
|
|
|
*/
|
|
|
|
static DWORD wodPrepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
2002-08-09 03:02:25 +02:00
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numOutDev) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("bad device ID !\n");
|
1999-04-11 14:16:24 +02:00
|
|
|
return MMSYSERR_BADDEVICEID;
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1998-10-11 16:14:24 +02:00
|
|
|
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
|
|
|
return WAVERR_STILLPLAYING;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1998-10-11 16:14:24 +02:00
|
|
|
lpWaveHdr->dwFlags |= WHDR_PREPARED;
|
|
|
|
lpWaveHdr->dwFlags &= ~WHDR_DONE;
|
|
|
|
return MMSYSERR_NOERROR;
|
1994-07-07 18:23:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* wodUnprepare [internal]
|
|
|
|
*/
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
static DWORD wodUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
2002-08-09 03:02:25 +02:00
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numOutDev) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("bad device ID !\n");
|
1999-04-11 14:16:24 +02:00
|
|
|
return MMSYSERR_BADDEVICEID;
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1998-10-11 16:14:24 +02:00
|
|
|
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
|
|
|
return WAVERR_STILLPLAYING;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1998-10-11 16:14:24 +02:00
|
|
|
lpWaveHdr->dwFlags &= ~WHDR_PREPARED;
|
|
|
|
lpWaveHdr->dwFlags |= WHDR_DONE;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-11 14:16:24 +02:00
|
|
|
return MMSYSERR_NOERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
* wodPause [internal]
|
|
|
|
*/
|
|
|
|
static DWORD wodPause(WORD wDevID)
|
|
|
|
{
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u);!\n", wDevID);
|
2002-08-09 03:02:25 +02:00
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numOutDev || WOutDev[wDevID].state == WINE_WS_CLOSED) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("bad device ID !\n");
|
1999-04-11 14:16:24 +02:00
|
|
|
return MMSYSERR_BADDEVICEID;
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2001-11-12 16:55:37 +01:00
|
|
|
OSS_AddRingMessage(&WOutDev[wDevID].msgRing, WINE_WM_PAUSING, 0, TRUE);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOERROR;
|
1994-07-07 18:23:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* wodRestart [internal]
|
|
|
|
*/
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
static DWORD wodRestart(WORD wDevID)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u);\n", wDevID);
|
2002-08-09 03:02:25 +02:00
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numOutDev || WOutDev[wDevID].state == WINE_WS_CLOSED) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("bad device ID !\n");
|
1999-04-11 14:16:24 +02:00
|
|
|
return MMSYSERR_BADDEVICEID;
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2002-04-23 00:35:30 +02:00
|
|
|
OSS_AddRingMessage(&WOutDev[wDevID].msgRing, WINE_WM_RESTARTING, 0, TRUE);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1998-10-11 16:14:24 +02:00
|
|
|
/* FIXME: is NotifyClient with WOM_DONE right ? (Comet Busters 1.3.3 needs this notification) */
|
|
|
|
/* FIXME: Myst crashes with this ... hmm -MM
|
2001-12-14 23:44:29 +01:00
|
|
|
return wodNotifyClient(wwo, WOM_DONE, 0L, 0L);
|
1998-10-11 16:14:24 +02:00
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOERROR;
|
1994-07-07 18:23:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* wodReset [internal]
|
|
|
|
*/
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
static DWORD wodReset(WORD wDevID)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u);\n", wDevID);
|
2002-08-09 03:02:25 +02:00
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numOutDev || WOutDev[wDevID].state == WINE_WS_CLOSED) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("bad device ID !\n");
|
1999-04-11 14:16:24 +02:00
|
|
|
return MMSYSERR_BADDEVICEID;
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2001-11-12 16:55:37 +01:00
|
|
|
OSS_AddRingMessage(&WOutDev[wDevID].msgRing, WINE_WM_RESETTING, 0, TRUE);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOERROR;
|
1994-07-07 18:23:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* wodGetPosition [internal]
|
|
|
|
*/
|
1999-09-22 18:45:33 +02:00
|
|
|
static DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
2000-06-24 19:54:43 +02:00
|
|
|
int time;
|
|
|
|
DWORD val;
|
|
|
|
WINE_WAVEOUT* wwo;
|
1999-05-24 10:19:48 +02:00
|
|
|
|
|
|
|
TRACE("(%u, %p, %lu);\n", wDevID, lpTime, uSize);
|
2002-08-09 03:02:25 +02:00
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numOutDev || WOutDev[wDevID].state == WINE_WS_CLOSED) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("bad device ID !\n");
|
1999-04-11 14:16:24 +02:00
|
|
|
return MMSYSERR_BADDEVICEID;
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2004-03-12 20:43:44 +01:00
|
|
|
if (lpTime == NULL) {
|
|
|
|
WARN("invalid parameter: lpTime == NULL\n");
|
|
|
|
return MMSYSERR_INVALPARAM;
|
|
|
|
}
|
1999-05-24 10:19:48 +02:00
|
|
|
|
2000-06-24 19:54:43 +02:00
|
|
|
wwo = &WOutDev[wDevID];
|
2002-08-26 23:49:42 +02:00
|
|
|
#ifdef EXACT_WODPOSITION
|
2004-03-12 20:43:44 +01:00
|
|
|
if (wwo->ossdev->out_caps.dwSupport & WAVECAPS_SAMPLEACCURATE)
|
|
|
|
OSS_AddRingMessage(&wwo->msgRing, WINE_WM_UPDATE, 0, TRUE);
|
2002-08-26 23:49:42 +02:00
|
|
|
#endif
|
2001-12-14 23:44:29 +01:00
|
|
|
val = wwo->dwPlayedTotal;
|
1999-05-24 10:19:48 +02:00
|
|
|
|
2002-06-01 01:06:46 +02:00
|
|
|
TRACE("wType=%04X wBitsPerSample=%u nSamplesPerSec=%lu nChannels=%u nAvgBytesPerSec=%lu\n",
|
|
|
|
lpTime->wType, wwo->format.wBitsPerSample,
|
|
|
|
wwo->format.wf.nSamplesPerSec, wwo->format.wf.nChannels,
|
|
|
|
wwo->format.wf.nAvgBytesPerSec);
|
2001-11-09 21:26:59 +01:00
|
|
|
TRACE("dwPlayedTotal=%lu\n", val);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-11 14:16:24 +02:00
|
|
|
switch (lpTime->wType) {
|
1998-10-11 16:14:24 +02:00
|
|
|
case TIME_BYTES:
|
1999-05-24 10:19:48 +02:00
|
|
|
lpTime->u.cb = val;
|
|
|
|
TRACE("TIME_BYTES=%lu\n", lpTime->u.cb);
|
1998-10-11 16:14:24 +02:00
|
|
|
break;
|
|
|
|
case TIME_SAMPLES:
|
2001-12-14 23:44:29 +01:00
|
|
|
lpTime->u.sample = val * 8 / wwo->format.wBitsPerSample /wwo->format.wf.nChannels;
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("TIME_SAMPLES=%lu\n", lpTime->u.sample);
|
1998-10-11 16:14:24 +02:00
|
|
|
break;
|
|
|
|
case TIME_SMPTE:
|
2000-06-24 19:54:43 +02:00
|
|
|
time = val / (wwo->format.wf.nAvgBytesPerSec / 1000);
|
2003-10-09 21:45:39 +02:00
|
|
|
lpTime->u.smpte.hour = time / (60 * 60 * 1000);
|
|
|
|
time -= lpTime->u.smpte.hour * (60 * 60 * 1000);
|
|
|
|
lpTime->u.smpte.min = time / (60 * 1000);
|
|
|
|
time -= lpTime->u.smpte.min * (60 * 1000);
|
|
|
|
lpTime->u.smpte.sec = time / 1000;
|
|
|
|
time -= lpTime->u.smpte.sec * 1000;
|
|
|
|
lpTime->u.smpte.frame = time * 30 / 1000;
|
1998-10-11 16:14:24 +02:00
|
|
|
lpTime->u.smpte.fps = 30;
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("TIME_SMPTE=%02u:%02u:%02u:%02u\n",
|
1998-10-11 16:14:24 +02:00
|
|
|
lpTime->u.smpte.hour, lpTime->u.smpte.min,
|
|
|
|
lpTime->u.smpte.sec, lpTime->u.smpte.frame);
|
|
|
|
break;
|
|
|
|
default:
|
1999-05-24 10:19:48 +02:00
|
|
|
FIXME("Format %d not supported ! use TIME_MS !\n", lpTime->wType);
|
1998-10-11 16:14:24 +02:00
|
|
|
lpTime->wType = TIME_MS;
|
|
|
|
case TIME_MS:
|
2000-06-24 19:54:43 +02:00
|
|
|
lpTime->u.ms = val / (wwo->format.wf.nAvgBytesPerSec / 1000);
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("TIME_MS=%lu\n", lpTime->u.ms);
|
1998-10-11 16:14:24 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
return MMSYSERR_NOERROR;
|
1994-07-07 18:23:58 +02:00
|
|
|
}
|
|
|
|
|
2001-12-14 23:44:29 +01:00
|
|
|
/**************************************************************************
|
|
|
|
* wodBreakLoop [internal]
|
|
|
|
*/
|
|
|
|
static DWORD wodBreakLoop(WORD wDevID)
|
|
|
|
{
|
|
|
|
TRACE("(%u);\n", wDevID);
|
2002-08-09 03:02:25 +02:00
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numOutDev || WOutDev[wDevID].state == WINE_WS_CLOSED) {
|
2001-12-14 23:44:29 +01:00
|
|
|
WARN("bad device ID !\n");
|
|
|
|
return MMSYSERR_BADDEVICEID;
|
|
|
|
}
|
|
|
|
OSS_AddRingMessage(&WOutDev[wDevID].msgRing, WINE_WM_BREAKLOOP, 0, TRUE);
|
|
|
|
return MMSYSERR_NOERROR;
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
Release 941122
Sun Nov 20 18:30:06 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
* [controls/scroll.c] [include/scroll.h]
Rewritten most of scroll-bar code for better Windows look & feel.
Implemented EnableScrollBar().
Preliminary keyboard support.
* [objects/bitblt.c]
Fixed BadMatch error for BitBlt() and StretchBlt() when reading
bits from outside the visible region.
* [objects/oembitmap.c] [include/bitmaps/obm_*]
Use XPM symbolic colors to load bitmaps. This allows the colors
of the bitmaps to depend on the system colors.
* [tools/make_debug]
Made the make_debug script more robust.
* [windows/dialog.c]
Fixed CheckRadioButton().
* [windows/nonclient.c]
A few changes to scroll-bar drawing and tracking.
* [windows/winpos.c]
Renamed NextWindowFromPoint() to WINPOS_NextWindowFromPoint() to
avoid confusion, and optimized it somewhat.
Nov 19, 94 Martin Ayotte (wine@trgcorp.mksinfo.qc.ca)
* [misc/audio.c]
* [misc/mcianim.c]
more coding but nothing spectacular.
* [misc/mmaux.c]
some coding to access '/dev/mixer'.
* [misc/midi.c]
some coding to read .MID files, but it's not playing yet.
Sun Nov 13 19:31:03 1994 James Youngman (mbcstjy@afs.man.ac.uk)
* [objects/dib.c]
Reimplemented DIB_SetImageBits_RLE8() so that it would cope with
bitmaps which don't end 0x00, 0x02 (previously it blew up). This
includes some bitmaps output by Paint Shop Pro. Implementation is
possibly now too lax. Please see the notes on the function about
why.
* [controls/desktop.c]
The desktop pattern should be painted if the wallpaper doesn't
cover the whole screen width OR the whole screen height.
Sun Nov 13 00:07:11 MET 1994 Erik Bos <erik@xs4all.nl>
* [objects/dib.c]
Small bug in DIB_SetImageBits() fixed, bitmaps in 16,24 bpp
now work.
* [loader/ne_resource.c] [include/resource.h]
Some cleanup.
Thu Nov 10 20:44:58 1994 Martin von Loewis (martin@cs.csufresno.edu)
* [Configure]
[rc/sysres.rc]
Primitive compile-time support for multiple languages
* [rc/sysres_De.rc]
New file
* [loader/resource.c]
LoadBitmap: Recognize end of sysresbm properly
* [rc/Imakefile]
Rules to compile resources simplified, dependencies changed
* [rc/sysresbm.rc]
Don't use sysresbm if using XPM
* [windows/dialog.c]
CreateDialogIndirectParam: Reverse Z-order of controls
* [windows/message.c]
MSG_TranslateMouseMsg: Fix HTTRANSPARENT handling
* [windows/winpos.c]
NextWindowFromPoint: New function
* [controls/button.c]
WM_NCHITTEST: Group Box is HTTRANSPARENT
BUTTON_CheckAutoRadioButton: New function
BM_SETCHECK: Added call to BUTTON_CheckAutoRadioButton
Mon Nov 7 11:20:26 1994 Paul Falstad (pf@zoof.cts.com)
* [objects/text.c]
Fix hang when using DrawText(..., DT_WORDBREAK) with a word that
is too long to break.
* [objects/font.c]
Don't assume helvetica if there is no font family; let the other
font attributes decide what font to use.
* [controls/widgets.c]
Listboxes and combo boxes need to be notified of double-clicks.
* [controls/listbox.c]
[include/listbox.h]
scrolling to bottom of list box should display last item at the
bottom, not at the top.
list boxes need to allocate a separate heap for their item data,
rather than using the user heap. Otherwise, it's very easy to run
out of memory for list box items.
removed redundant code in ListBoxAddString(). Implemented simple
version of LBS_SORT.
Don't put [.] in the list box when using DDL_DIRECTORY.
* [controls/combo.c]
Combos should pass CBS_SORT onto their list box.
* [windows/win.c]
If window creation is aborted, remove the window from the
linked lists.
* [controls/static.c]
static controls with SS_ICON were always returning 0 from
WM_NCCREATE.
Make sure static controls have text to draw before drawing it.
1994-11-22 17:31:29 +01:00
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* wodGetVolume [internal]
|
|
|
|
*/
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
static DWORD wodGetVolume(WORD wDevID, LPDWORD lpdwVol)
|
Release 941122
Sun Nov 20 18:30:06 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
* [controls/scroll.c] [include/scroll.h]
Rewritten most of scroll-bar code for better Windows look & feel.
Implemented EnableScrollBar().
Preliminary keyboard support.
* [objects/bitblt.c]
Fixed BadMatch error for BitBlt() and StretchBlt() when reading
bits from outside the visible region.
* [objects/oembitmap.c] [include/bitmaps/obm_*]
Use XPM symbolic colors to load bitmaps. This allows the colors
of the bitmaps to depend on the system colors.
* [tools/make_debug]
Made the make_debug script more robust.
* [windows/dialog.c]
Fixed CheckRadioButton().
* [windows/nonclient.c]
A few changes to scroll-bar drawing and tracking.
* [windows/winpos.c]
Renamed NextWindowFromPoint() to WINPOS_NextWindowFromPoint() to
avoid confusion, and optimized it somewhat.
Nov 19, 94 Martin Ayotte (wine@trgcorp.mksinfo.qc.ca)
* [misc/audio.c]
* [misc/mcianim.c]
more coding but nothing spectacular.
* [misc/mmaux.c]
some coding to access '/dev/mixer'.
* [misc/midi.c]
some coding to read .MID files, but it's not playing yet.
Sun Nov 13 19:31:03 1994 James Youngman (mbcstjy@afs.man.ac.uk)
* [objects/dib.c]
Reimplemented DIB_SetImageBits_RLE8() so that it would cope with
bitmaps which don't end 0x00, 0x02 (previously it blew up). This
includes some bitmaps output by Paint Shop Pro. Implementation is
possibly now too lax. Please see the notes on the function about
why.
* [controls/desktop.c]
The desktop pattern should be painted if the wallpaper doesn't
cover the whole screen width OR the whole screen height.
Sun Nov 13 00:07:11 MET 1994 Erik Bos <erik@xs4all.nl>
* [objects/dib.c]
Small bug in DIB_SetImageBits() fixed, bitmaps in 16,24 bpp
now work.
* [loader/ne_resource.c] [include/resource.h]
Some cleanup.
Thu Nov 10 20:44:58 1994 Martin von Loewis (martin@cs.csufresno.edu)
* [Configure]
[rc/sysres.rc]
Primitive compile-time support for multiple languages
* [rc/sysres_De.rc]
New file
* [loader/resource.c]
LoadBitmap: Recognize end of sysresbm properly
* [rc/Imakefile]
Rules to compile resources simplified, dependencies changed
* [rc/sysresbm.rc]
Don't use sysresbm if using XPM
* [windows/dialog.c]
CreateDialogIndirectParam: Reverse Z-order of controls
* [windows/message.c]
MSG_TranslateMouseMsg: Fix HTTRANSPARENT handling
* [windows/winpos.c]
NextWindowFromPoint: New function
* [controls/button.c]
WM_NCHITTEST: Group Box is HTTRANSPARENT
BUTTON_CheckAutoRadioButton: New function
BM_SETCHECK: Added call to BUTTON_CheckAutoRadioButton
Mon Nov 7 11:20:26 1994 Paul Falstad (pf@zoof.cts.com)
* [objects/text.c]
Fix hang when using DrawText(..., DT_WORDBREAK) with a word that
is too long to break.
* [objects/font.c]
Don't assume helvetica if there is no font family; let the other
font attributes decide what font to use.
* [controls/widgets.c]
Listboxes and combo boxes need to be notified of double-clicks.
* [controls/listbox.c]
[include/listbox.h]
scrolling to bottom of list box should display last item at the
bottom, not at the top.
list boxes need to allocate a separate heap for their item data,
rather than using the user heap. Otherwise, it's very easy to run
out of memory for list box items.
removed redundant code in ListBoxAddString(). Implemented simple
version of LBS_SORT.
Don't put [.] in the list box when using DDL_DIRECTORY.
* [controls/combo.c]
Combos should pass CBS_SORT onto their list box.
* [windows/win.c]
If window creation is aborted, remove the window from the
linked lists.
* [controls/static.c]
static controls with SS_ICON were always returning 0 from
WM_NCCREATE.
Make sure static controls have text to draw before drawing it.
1994-11-22 17:31:29 +01:00
|
|
|
{
|
1998-10-11 16:14:24 +02:00
|
|
|
int mixer;
|
1999-05-24 10:19:48 +02:00
|
|
|
int volume;
|
|
|
|
DWORD left, right;
|
2003-10-31 00:08:46 +01:00
|
|
|
DWORD last_left, last_right;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u, %p);\n", wDevID, lpdwVol);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
|
|
|
if (lpdwVol == NULL)
|
1999-04-11 14:16:24 +02:00
|
|
|
return MMSYSERR_NOTENABLED;
|
2003-03-07 21:37:25 +01:00
|
|
|
if (wDevID >= numOutDev)
|
|
|
|
return MMSYSERR_INVALPARAM;
|
2002-06-28 19:31:31 +02:00
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
if ((mixer = open(WOutDev[wDevID].ossdev->mixer_name, O_RDONLY|O_NDELAY)) < 0) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("mixer device not available !\n");
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOTENABLED;
|
|
|
|
}
|
|
|
|
if (ioctl(mixer, SOUND_MIXER_READ_PCM, &volume) == -1) {
|
2004-01-27 01:01:43 +01:00
|
|
|
WARN("ioctl(%s, SOUND_MIXER_READ_PCM) failed (%s)\n", WOutDev[wDevID].ossdev->mixer_name, strerror(errno));
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOTENABLED;
|
|
|
|
}
|
|
|
|
close(mixer);
|
1999-05-24 10:19:48 +02:00
|
|
|
left = LOBYTE(volume);
|
|
|
|
right = HIBYTE(volume);
|
|
|
|
TRACE("left=%ld right=%ld !\n", left, right);
|
2003-10-31 00:08:46 +01:00
|
|
|
last_left = (LOWORD(WOutDev[wDevID].volume) * 100) / 0xFFFFl;
|
|
|
|
last_right = (HIWORD(WOutDev[wDevID].volume) * 100) / 0xFFFFl;
|
|
|
|
TRACE("last_left=%ld last_right=%ld !\n", last_left, last_right);
|
|
|
|
if (last_left == left && last_right == right)
|
|
|
|
*lpdwVol = WOutDev[wDevID].volume;
|
|
|
|
else
|
|
|
|
*lpdwVol = ((left * 0xFFFFl) / 100) + (((right * 0xFFFFl) / 100) << 16);
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOERROR;
|
Release 941122
Sun Nov 20 18:30:06 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
* [controls/scroll.c] [include/scroll.h]
Rewritten most of scroll-bar code for better Windows look & feel.
Implemented EnableScrollBar().
Preliminary keyboard support.
* [objects/bitblt.c]
Fixed BadMatch error for BitBlt() and StretchBlt() when reading
bits from outside the visible region.
* [objects/oembitmap.c] [include/bitmaps/obm_*]
Use XPM symbolic colors to load bitmaps. This allows the colors
of the bitmaps to depend on the system colors.
* [tools/make_debug]
Made the make_debug script more robust.
* [windows/dialog.c]
Fixed CheckRadioButton().
* [windows/nonclient.c]
A few changes to scroll-bar drawing and tracking.
* [windows/winpos.c]
Renamed NextWindowFromPoint() to WINPOS_NextWindowFromPoint() to
avoid confusion, and optimized it somewhat.
Nov 19, 94 Martin Ayotte (wine@trgcorp.mksinfo.qc.ca)
* [misc/audio.c]
* [misc/mcianim.c]
more coding but nothing spectacular.
* [misc/mmaux.c]
some coding to access '/dev/mixer'.
* [misc/midi.c]
some coding to read .MID files, but it's not playing yet.
Sun Nov 13 19:31:03 1994 James Youngman (mbcstjy@afs.man.ac.uk)
* [objects/dib.c]
Reimplemented DIB_SetImageBits_RLE8() so that it would cope with
bitmaps which don't end 0x00, 0x02 (previously it blew up). This
includes some bitmaps output by Paint Shop Pro. Implementation is
possibly now too lax. Please see the notes on the function about
why.
* [controls/desktop.c]
The desktop pattern should be painted if the wallpaper doesn't
cover the whole screen width OR the whole screen height.
Sun Nov 13 00:07:11 MET 1994 Erik Bos <erik@xs4all.nl>
* [objects/dib.c]
Small bug in DIB_SetImageBits() fixed, bitmaps in 16,24 bpp
now work.
* [loader/ne_resource.c] [include/resource.h]
Some cleanup.
Thu Nov 10 20:44:58 1994 Martin von Loewis (martin@cs.csufresno.edu)
* [Configure]
[rc/sysres.rc]
Primitive compile-time support for multiple languages
* [rc/sysres_De.rc]
New file
* [loader/resource.c]
LoadBitmap: Recognize end of sysresbm properly
* [rc/Imakefile]
Rules to compile resources simplified, dependencies changed
* [rc/sysresbm.rc]
Don't use sysresbm if using XPM
* [windows/dialog.c]
CreateDialogIndirectParam: Reverse Z-order of controls
* [windows/message.c]
MSG_TranslateMouseMsg: Fix HTTRANSPARENT handling
* [windows/winpos.c]
NextWindowFromPoint: New function
* [controls/button.c]
WM_NCHITTEST: Group Box is HTTRANSPARENT
BUTTON_CheckAutoRadioButton: New function
BM_SETCHECK: Added call to BUTTON_CheckAutoRadioButton
Mon Nov 7 11:20:26 1994 Paul Falstad (pf@zoof.cts.com)
* [objects/text.c]
Fix hang when using DrawText(..., DT_WORDBREAK) with a word that
is too long to break.
* [objects/font.c]
Don't assume helvetica if there is no font family; let the other
font attributes decide what font to use.
* [controls/widgets.c]
Listboxes and combo boxes need to be notified of double-clicks.
* [controls/listbox.c]
[include/listbox.h]
scrolling to bottom of list box should display last item at the
bottom, not at the top.
list boxes need to allocate a separate heap for their item data,
rather than using the user heap. Otherwise, it's very easy to run
out of memory for list box items.
removed redundant code in ListBoxAddString(). Implemented simple
version of LBS_SORT.
Don't put [.] in the list box when using DDL_DIRECTORY.
* [controls/combo.c]
Combos should pass CBS_SORT onto their list box.
* [windows/win.c]
If window creation is aborted, remove the window from the
linked lists.
* [controls/static.c]
static controls with SS_ICON were always returning 0 from
WM_NCCREATE.
Make sure static controls have text to draw before drawing it.
1994-11-22 17:31:29 +01:00
|
|
|
}
|
|
|
|
|
1994-07-07 18:23:58 +02:00
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* wodSetVolume [internal]
|
|
|
|
*/
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
static DWORD wodSetVolume(WORD wDevID, DWORD dwParam)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
1998-10-11 16:14:24 +02:00
|
|
|
int mixer;
|
|
|
|
int volume;
|
1999-05-24 10:19:48 +02:00
|
|
|
DWORD left, right;
|
|
|
|
|
|
|
|
TRACE("(%u, %08lX);\n", wDevID, dwParam);
|
|
|
|
|
|
|
|
left = (LOWORD(dwParam) * 100) / 0xFFFFl;
|
|
|
|
right = (HIWORD(dwParam) * 100) / 0xFFFFl;
|
|
|
|
volume = left + (right << 8);
|
2002-08-09 03:02:25 +02:00
|
|
|
|
2003-09-19 02:10:51 +02:00
|
|
|
if (wDevID >= numOutDev) {
|
|
|
|
WARN("invalid parameter: wDevID > %d\n", numOutDev);
|
|
|
|
return MMSYSERR_INVALPARAM;
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
if ((mixer = open(WOutDev[wDevID].ossdev->mixer_name, O_WRONLY|O_NDELAY)) < 0) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("mixer device not available !\n");
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOTENABLED;
|
|
|
|
}
|
1994-07-07 18:23:58 +02:00
|
|
|
if (ioctl(mixer, SOUND_MIXER_WRITE_PCM, &volume) == -1) {
|
2003-03-15 01:54:11 +01:00
|
|
|
WARN("ioctl(%s, SOUND_MIXER_WRITE_PCM) failed (%s)\n", WOutDev[wDevID].ossdev->mixer_name, strerror(errno));
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOTENABLED;
|
2000-06-24 19:54:43 +02:00
|
|
|
} else {
|
|
|
|
TRACE("volume=%04x\n", (unsigned)volume);
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
|
|
|
close(mixer);
|
2003-10-31 00:08:46 +01:00
|
|
|
|
|
|
|
/* save requested volume */
|
|
|
|
WOutDev[wDevID].volume = dwParam;
|
|
|
|
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOERROR;
|
1994-07-07 18:23:58 +02:00
|
|
|
}
|
|
|
|
|
Release 940420
Wed Apr 20 14:53:35 1994 Bob Amstadt (bob@pooh)
* [tools/build.c] [if1632/call.S] [if1632/Imakefile]
Fixed bug for non-Linux systems.
Apr 18, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [windows/win.c]
Bug fixed in CreateWindowEx() : Now use SetMenu() for menubar setup.
New empty stub for function SetSysModalWindow().
* [misc/exec.c]
New empty stub for function ExitWindows().
* [objects/font.c]
New empty stub for function EnumFonts().
* New file [misc/property.c]
New functions RemoveProp(), GetProp(), SetProp() & EnumProps().
* New file [misc/shell.c]
New empty stubs for function RegisterShellProc(),
ShellExecute() & ShellProc().
* New files [loader/task.c] & [include/task.h]
Move functions GetWindowTask(), GetNumTask(), EnumTaskWindows()
from 'loader/library.c'.
* [if1632/user.c] [if1632/kernel.c]
Put Atoms functions entries.
* [controls/combo.c]
New functions DirDlgSelectComboBox() & DirDlgListComboBox().
* [controls/listbox.c]
New functions DirDlgSelect() & DirDlgList().
Sun Apr 17 20:57:59 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [objects/test.c]
GrayString() added.
* [if1632/callback.c]
CallGrayStringProc() added.
* [if1632/relay.c] [if1632/mmsystem.spec]
Added.
* [if1632/kernel.spec] [if1632/user.spec]
Added forgotten specs for atom functions.
Tue Apr 12 00:05:31 1994 Bob Amstadt (bob@pooh)
* misc/spy.c (SpyInit): Added more message types
* [windows/mdi.c] [include/mdi.h]
Maximizing and restoring child windows.
Tiling of child windows.
Mon Apr 11 20:48:28 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
* [windows/winpos.c]
Revert focus and activation to previous window when hiding a window.
* [windows/syscolor.c]
Implemented system color objects (brushes and pens created at
SetSysColor() time for better performance).
* [windows/graphics.c] [windows/nonclient.c] [controls/button.c]
Changed painting code to use system color objects.
* [windows/message.c]
New function MSG_InternalGetMessage() for internal messages
loops (e.g. for dialogs or menus).
* [windows/hook.c] [include/hook.h] (New files)
Beginning of the window hooks implementation.
* [windows/dialog.c]
Use new function MSG_InternalGetMessage() in DialogBox().
* [if1632/callback.c]
Added function CallHookProc().
Apr 11, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [windows/event.c]
Bug fix : WM_CHARs are sent to focused window like WM_KEY???.
* [misc/exec.c]
Nothing much more than a stub for LoadModule(), I saw there a lot
to be done in that corner, I will come back later ...
* [loader/library.c]
New functions GetWindowTask(), GetNumTask(), EnumTaskWindows()
and associated modules & tasks linked-lists.
(it's only an 'emerging bud', more to come next weeks).
* [loader/wine.c]
Use LoadLibrary() instead of LoadImage() for 'sysres.dll'.
* [control/menu.c]
You can now click outside menu region without problem.
Keyboard navig more smootly, even if a child has the focus.
Bug fix in InsertItem(), (bad linklist when insert point not found).
change Realloc for Free & Alloc in ModifyItem().
MF_STRING now set BLACK_PEN to fix bug of bad color of the underscores
done by DrawText(), (maybe it should done in DrawText() itself ?).
Sun Apr 10 14:06:08 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/profile.c]
.INI files will now be stored in / loaded from the windows dir
if no path is supplied.
* [if1632/kernel.spec]
Fixed GetDriveType's prototype.
* [if1632/winsock.spec] [include/winsock.h] [misc/winsocket.c]
Fixed prototypes: winsock uses a word as socket handle not an int.
* [misc/winsocket.c]
Added heap allocation for returned structures.
Added non-blocking WSAAsyncGetXbyY() functions as blocking ones.
* [loader/wine.c]
Added IsDLLLoaded(), used in LoadImage() to prevent loading
a dll multiple times.
Directory is added to wine's path when a fullpath is supplied when
starting wine.
LoadImage(): DLL filename used instead DLL's own internal name,
fixes 'Bad DLL name' errors.
Sat Apr 9 08:26:03 1994 David Metcalfe <david@prism.demon.co.uk>
* [controls/edit.c] [controls/widgets.c]
First release of edit control.
1994-04-21 03:20:00 +02:00
|
|
|
/**************************************************************************
|
2001-07-11 20:56:41 +02:00
|
|
|
* wodMessage (WINEOSS.7)
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
DWORD WINAPI OSS_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
|
1999-09-22 18:45:33 +02:00
|
|
|
DWORD dwParam1, DWORD dwParam2)
|
Release 940420
Wed Apr 20 14:53:35 1994 Bob Amstadt (bob@pooh)
* [tools/build.c] [if1632/call.S] [if1632/Imakefile]
Fixed bug for non-Linux systems.
Apr 18, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [windows/win.c]
Bug fixed in CreateWindowEx() : Now use SetMenu() for menubar setup.
New empty stub for function SetSysModalWindow().
* [misc/exec.c]
New empty stub for function ExitWindows().
* [objects/font.c]
New empty stub for function EnumFonts().
* New file [misc/property.c]
New functions RemoveProp(), GetProp(), SetProp() & EnumProps().
* New file [misc/shell.c]
New empty stubs for function RegisterShellProc(),
ShellExecute() & ShellProc().
* New files [loader/task.c] & [include/task.h]
Move functions GetWindowTask(), GetNumTask(), EnumTaskWindows()
from 'loader/library.c'.
* [if1632/user.c] [if1632/kernel.c]
Put Atoms functions entries.
* [controls/combo.c]
New functions DirDlgSelectComboBox() & DirDlgListComboBox().
* [controls/listbox.c]
New functions DirDlgSelect() & DirDlgList().
Sun Apr 17 20:57:59 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [objects/test.c]
GrayString() added.
* [if1632/callback.c]
CallGrayStringProc() added.
* [if1632/relay.c] [if1632/mmsystem.spec]
Added.
* [if1632/kernel.spec] [if1632/user.spec]
Added forgotten specs for atom functions.
Tue Apr 12 00:05:31 1994 Bob Amstadt (bob@pooh)
* misc/spy.c (SpyInit): Added more message types
* [windows/mdi.c] [include/mdi.h]
Maximizing and restoring child windows.
Tiling of child windows.
Mon Apr 11 20:48:28 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
* [windows/winpos.c]
Revert focus and activation to previous window when hiding a window.
* [windows/syscolor.c]
Implemented system color objects (brushes and pens created at
SetSysColor() time for better performance).
* [windows/graphics.c] [windows/nonclient.c] [controls/button.c]
Changed painting code to use system color objects.
* [windows/message.c]
New function MSG_InternalGetMessage() for internal messages
loops (e.g. for dialogs or menus).
* [windows/hook.c] [include/hook.h] (New files)
Beginning of the window hooks implementation.
* [windows/dialog.c]
Use new function MSG_InternalGetMessage() in DialogBox().
* [if1632/callback.c]
Added function CallHookProc().
Apr 11, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [windows/event.c]
Bug fix : WM_CHARs are sent to focused window like WM_KEY???.
* [misc/exec.c]
Nothing much more than a stub for LoadModule(), I saw there a lot
to be done in that corner, I will come back later ...
* [loader/library.c]
New functions GetWindowTask(), GetNumTask(), EnumTaskWindows()
and associated modules & tasks linked-lists.
(it's only an 'emerging bud', more to come next weeks).
* [loader/wine.c]
Use LoadLibrary() instead of LoadImage() for 'sysres.dll'.
* [control/menu.c]
You can now click outside menu region without problem.
Keyboard navig more smootly, even if a child has the focus.
Bug fix in InsertItem(), (bad linklist when insert point not found).
change Realloc for Free & Alloc in ModifyItem().
MF_STRING now set BLACK_PEN to fix bug of bad color of the underscores
done by DrawText(), (maybe it should done in DrawText() itself ?).
Sun Apr 10 14:06:08 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/profile.c]
.INI files will now be stored in / loaded from the windows dir
if no path is supplied.
* [if1632/kernel.spec]
Fixed GetDriveType's prototype.
* [if1632/winsock.spec] [include/winsock.h] [misc/winsocket.c]
Fixed prototypes: winsock uses a word as socket handle not an int.
* [misc/winsocket.c]
Added heap allocation for returned structures.
Added non-blocking WSAAsyncGetXbyY() functions as blocking ones.
* [loader/wine.c]
Added IsDLLLoaded(), used in LoadImage() to prevent loading
a dll multiple times.
Directory is added to wine's path when a fullpath is supplied when
starting wine.
LoadImage(): DLL filename used instead DLL's own internal name,
fixes 'Bad DLL name' errors.
Sat Apr 9 08:26:03 1994 David Metcalfe <david@prism.demon.co.uk>
* [controls/edit.c] [controls/widgets.c]
First release of edit control.
1994-04-21 03:20:00 +02:00
|
|
|
{
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u, %04X, %08lX, %08lX, %08lX);\n",
|
1998-10-11 16:14:24 +02:00
|
|
|
wDevID, wMsg, dwUser, dwParam1, dwParam2);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-04-11 14:16:24 +02:00
|
|
|
switch (wMsg) {
|
1999-09-22 18:45:33 +02:00
|
|
|
case DRVM_INIT:
|
|
|
|
case DRVM_EXIT:
|
|
|
|
case DRVM_ENABLE:
|
|
|
|
case DRVM_DISABLE:
|
|
|
|
/* FIXME: Pretend this is supported */
|
|
|
|
return 0;
|
1999-04-11 14:16:24 +02:00
|
|
|
case WODM_OPEN: return wodOpen (wDevID, (LPWAVEOPENDESC)dwParam1, dwParam2);
|
|
|
|
case WODM_CLOSE: return wodClose (wDevID);
|
|
|
|
case WODM_WRITE: return wodWrite (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
|
|
|
case WODM_PAUSE: return wodPause (wDevID);
|
1999-09-22 18:45:33 +02:00
|
|
|
case WODM_GETPOS: return wodGetPosition (wDevID, (LPMMTIME)dwParam1, dwParam2);
|
2001-12-14 23:44:29 +01:00
|
|
|
case WODM_BREAKLOOP: return wodBreakLoop (wDevID);
|
1999-04-11 14:16:24 +02:00
|
|
|
case WODM_PREPARE: return wodPrepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
|
|
|
case WODM_UNPREPARE: return wodUnprepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
1999-09-22 18:45:33 +02:00
|
|
|
case WODM_GETDEVCAPS: return wodGetDevCaps (wDevID, (LPWAVEOUTCAPSA)dwParam1, dwParam2);
|
2002-06-28 19:31:31 +02:00
|
|
|
case WODM_GETNUMDEVS: return numOutDev;
|
1999-04-11 14:16:24 +02:00
|
|
|
case WODM_GETPITCH: return MMSYSERR_NOTSUPPORTED;
|
|
|
|
case WODM_SETPITCH: return MMSYSERR_NOTSUPPORTED;
|
|
|
|
case WODM_GETPLAYBACKRATE: return MMSYSERR_NOTSUPPORTED;
|
|
|
|
case WODM_SETPLAYBACKRATE: return MMSYSERR_NOTSUPPORTED;
|
|
|
|
case WODM_GETVOLUME: return wodGetVolume (wDevID, (LPDWORD)dwParam1);
|
|
|
|
case WODM_SETVOLUME: return wodSetVolume (wDevID, dwParam1);
|
|
|
|
case WODM_RESTART: return wodRestart (wDevID);
|
|
|
|
case WODM_RESET: return wodReset (wDevID);
|
2001-01-04 20:53:51 +01:00
|
|
|
|
2003-10-28 01:15:16 +01:00
|
|
|
case DRV_QUERYDEVICEINTERFACESIZE: return wdDevInterfaceSize (wDevID, (LPDWORD)dwParam1);
|
|
|
|
case DRV_QUERYDEVICEINTERFACE: return wdDevInterface (wDevID, (PWCHAR)dwParam1, dwParam2);
|
2003-03-15 01:54:11 +01:00
|
|
|
case DRV_QUERYDSOUNDIFACE: return wodDsCreate (wDevID, (PIDSDRIVER*)dwParam1);
|
|
|
|
case DRV_QUERYDSOUNDDESC: return wodDsDesc (wDevID, (PDSDRIVERDESC)dwParam1);
|
|
|
|
case DRV_QUERYDSOUNDGUID: return wodDsGuid (wDevID, (LPGUID)dwParam1);
|
1998-10-11 16:14:24 +02:00
|
|
|
default:
|
1999-05-24 10:19:48 +02:00
|
|
|
FIXME("unknown message %d!\n", wMsg);
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
|
|
|
return MMSYSERR_NOTSUPPORTED;
|
1994-07-07 18:23:58 +02:00
|
|
|
}
|
|
|
|
|
2000-06-24 14:55:33 +02:00
|
|
|
/*======================================================================*
|
2004-01-20 02:47:27 +01:00
|
|
|
* Low level DSOUND definitions *
|
2000-06-24 14:55:33 +02:00
|
|
|
*======================================================================*/
|
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
typedef struct IDsDriverPropertySetImpl IDsDriverPropertySetImpl;
|
|
|
|
typedef struct IDsDriverNotifyImpl IDsDriverNotifyImpl;
|
2000-06-24 14:55:33 +02:00
|
|
|
typedef struct IDsDriverImpl IDsDriverImpl;
|
|
|
|
typedef struct IDsDriverBufferImpl IDsDriverBufferImpl;
|
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
struct IDsDriverPropertySetImpl
|
|
|
|
{
|
|
|
|
/* IUnknown fields */
|
|
|
|
ICOM_VFIELD(IDsDriverPropertySet);
|
|
|
|
DWORD ref;
|
|
|
|
|
|
|
|
IDsDriverBufferImpl* buffer;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct IDsDriverNotifyImpl
|
|
|
|
{
|
|
|
|
/* IUnknown fields */
|
|
|
|
ICOM_VFIELD(IDsDriverNotify);
|
|
|
|
DWORD ref;
|
|
|
|
|
|
|
|
/* IDsDriverNotifyImpl fields */
|
|
|
|
LPDSBPOSITIONNOTIFY notifies;
|
|
|
|
int nrofnotifies;
|
|
|
|
|
|
|
|
IDsDriverBufferImpl* buffer;
|
|
|
|
};
|
|
|
|
|
2000-06-24 14:55:33 +02:00
|
|
|
struct IDsDriverImpl
|
|
|
|
{
|
|
|
|
/* IUnknown fields */
|
|
|
|
ICOM_VFIELD(IDsDriver);
|
2004-01-20 02:47:27 +01:00
|
|
|
DWORD ref;
|
|
|
|
|
2000-06-24 14:55:33 +02:00
|
|
|
/* IDsDriverImpl fields */
|
2004-01-20 02:47:27 +01:00
|
|
|
UINT wDevID;
|
|
|
|
IDsDriverBufferImpl* primary;
|
2004-02-16 21:23:42 +01:00
|
|
|
|
|
|
|
int nrofsecondaries;
|
|
|
|
IDsDriverBufferImpl** secondaries;
|
2000-06-24 14:55:33 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
struct IDsDriverBufferImpl
|
|
|
|
{
|
|
|
|
/* IUnknown fields */
|
|
|
|
ICOM_VFIELD(IDsDriverBuffer);
|
2004-01-20 02:47:27 +01:00
|
|
|
DWORD ref;
|
|
|
|
|
2000-06-24 14:55:33 +02:00
|
|
|
/* IDsDriverBufferImpl fields */
|
2004-01-20 02:47:27 +01:00
|
|
|
IDsDriverImpl* drv;
|
|
|
|
DWORD buflen;
|
|
|
|
WAVEFORMATEX wfx;
|
2004-02-13 21:44:42 +01:00
|
|
|
LPBYTE mapping;
|
|
|
|
DWORD maplen;
|
2004-02-13 22:04:28 +01:00
|
|
|
int fd;
|
|
|
|
DWORD dwFlags;
|
2004-01-20 02:47:27 +01:00
|
|
|
|
|
|
|
/* IDsDriverNotifyImpl fields */
|
|
|
|
IDsDriverNotifyImpl* notify;
|
|
|
|
int notify_index;
|
|
|
|
|
|
|
|
/* IDsDriverPropertySetImpl fields */
|
|
|
|
IDsDriverPropertySetImpl* property_set;
|
|
|
|
};
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverPropertySetImpl_Create(
|
|
|
|
IDsDriverBufferImpl * dsdb,
|
|
|
|
IDsDriverPropertySetImpl **pdsdps);
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverNotifyImpl_Create(
|
|
|
|
IDsDriverBufferImpl * dsdb,
|
|
|
|
IDsDriverNotifyImpl **pdsdn);
|
|
|
|
|
|
|
|
/*======================================================================*
|
|
|
|
* Low level DSOUND property set implementation *
|
|
|
|
*======================================================================*/
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverPropertySetImpl_QueryInterface(
|
|
|
|
PIDSDRIVERPROPERTYSET iface,
|
|
|
|
REFIID riid,
|
|
|
|
LPVOID *ppobj)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverPropertySetImpl,iface);
|
|
|
|
TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppobj);
|
|
|
|
|
|
|
|
if ( IsEqualGUID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualGUID(riid, &IID_IDsDriverPropertySet) ) {
|
|
|
|
IDsDriverPropertySet_AddRef(iface);
|
|
|
|
*ppobj = (LPVOID)This;
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
FIXME( "Unknown IID %s\n", debugstr_guid( riid ) );
|
|
|
|
|
|
|
|
*ppobj = 0;
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDsDriverPropertySetImpl_AddRef(PIDSDRIVERPROPERTYSET iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverPropertySetImpl,iface);
|
|
|
|
DWORD ref;
|
|
|
|
TRACE("(%p) ref was %ld\n", This, This->ref);
|
|
|
|
|
|
|
|
ref = InterlockedIncrement(&(This->ref));
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDsDriverPropertySetImpl_Release(PIDSDRIVERPROPERTYSET iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverPropertySetImpl,iface);
|
|
|
|
DWORD ref;
|
|
|
|
TRACE("(%p) ref was %ld\n", This, This->ref);
|
|
|
|
|
|
|
|
ref = InterlockedDecrement(&(This->ref));
|
|
|
|
if (ref == 0) {
|
|
|
|
IDsDriverBuffer_Release((PIDSDRIVERBUFFER)This->buffer);
|
|
|
|
HeapFree(GetProcessHeap(),0,This);
|
|
|
|
TRACE("(%p) released\n",This);
|
|
|
|
}
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverPropertySetImpl_Get(
|
|
|
|
PIDSDRIVERPROPERTYSET iface,
|
|
|
|
PDSPROPERTY pDsProperty,
|
|
|
|
LPVOID pPropertyParams,
|
|
|
|
ULONG cbPropertyParams,
|
|
|
|
LPVOID pPropertyData,
|
|
|
|
ULONG cbPropertyData,
|
|
|
|
PULONG pcbReturnedData )
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverPropertySetImpl,iface);
|
|
|
|
FIXME("(%p,%p,%p,%lx,%p,%lx,%p)\n",This,pDsProperty,pPropertyParams,cbPropertyParams,pPropertyData,cbPropertyData,pcbReturnedData);
|
|
|
|
return DSERR_UNSUPPORTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverPropertySetImpl_Set(
|
|
|
|
PIDSDRIVERPROPERTYSET iface,
|
|
|
|
PDSPROPERTY pDsProperty,
|
|
|
|
LPVOID pPropertyParams,
|
|
|
|
ULONG cbPropertyParams,
|
|
|
|
LPVOID pPropertyData,
|
|
|
|
ULONG cbPropertyData )
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverPropertySetImpl,iface);
|
|
|
|
FIXME("(%p,%p,%p,%lx,%p,%lx)\n",This,pDsProperty,pPropertyParams,cbPropertyParams,pPropertyData,cbPropertyData);
|
|
|
|
return DSERR_UNSUPPORTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverPropertySetImpl_QuerySupport(
|
|
|
|
PIDSDRIVERPROPERTYSET iface,
|
|
|
|
REFGUID PropertySetId,
|
|
|
|
ULONG PropertyId,
|
|
|
|
PULONG pSupport )
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverPropertySetImpl,iface);
|
|
|
|
FIXME("(%p,%s,%lx,%p)\n",This,debugstr_guid(PropertySetId),PropertyId,pSupport);
|
|
|
|
return DSERR_UNSUPPORTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
ICOM_VTABLE(IDsDriverPropertySet) dsdpsvt =
|
|
|
|
{
|
|
|
|
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
|
|
|
IDsDriverPropertySetImpl_QueryInterface,
|
|
|
|
IDsDriverPropertySetImpl_AddRef,
|
|
|
|
IDsDriverPropertySetImpl_Release,
|
|
|
|
IDsDriverPropertySetImpl_Get,
|
|
|
|
IDsDriverPropertySetImpl_Set,
|
|
|
|
IDsDriverPropertySetImpl_QuerySupport,
|
2000-06-24 14:55:33 +02:00
|
|
|
};
|
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
/*======================================================================*
|
|
|
|
* Low level DSOUND notify implementation *
|
|
|
|
*======================================================================*/
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverNotifyImpl_QueryInterface(
|
|
|
|
PIDSDRIVERNOTIFY iface,
|
|
|
|
REFIID riid,
|
|
|
|
LPVOID *ppobj)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverNotifyImpl,iface);
|
|
|
|
TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppobj);
|
|
|
|
|
|
|
|
if ( IsEqualGUID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualGUID(riid, &IID_IDsDriverNotify) ) {
|
|
|
|
IDsDriverNotify_AddRef(iface);
|
|
|
|
*ppobj = This;
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
FIXME( "Unknown IID %s\n", debugstr_guid( riid ) );
|
|
|
|
|
|
|
|
*ppobj = 0;
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDsDriverNotifyImpl_AddRef(PIDSDRIVERNOTIFY iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverNotifyImpl,iface);
|
|
|
|
DWORD ref;
|
|
|
|
TRACE("(%p) ref was %ld\n", This, This->ref);
|
|
|
|
|
|
|
|
ref = InterlockedIncrement(&(This->ref));
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDsDriverNotifyImpl_Release(PIDSDRIVERNOTIFY iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverNotifyImpl,iface);
|
|
|
|
DWORD ref;
|
|
|
|
TRACE("(%p) ref was %ld\n", This, This->ref);
|
|
|
|
|
|
|
|
ref = InterlockedDecrement(&(This->ref));
|
|
|
|
if (ref == 0) {
|
|
|
|
IDsDriverBuffer_Release((PIDSDRIVERBUFFER)This->buffer);
|
|
|
|
if (This->notifies != NULL)
|
|
|
|
HeapFree(GetProcessHeap(), 0, This->notifies);
|
|
|
|
|
|
|
|
HeapFree(GetProcessHeap(),0,This);
|
|
|
|
TRACE("(%p) released\n",This);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverNotifyImpl_SetNotificationPositions(
|
|
|
|
PIDSDRIVERNOTIFY iface,
|
|
|
|
DWORD howmuch,
|
|
|
|
LPCDSBPOSITIONNOTIFY notify)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverNotifyImpl,iface);
|
|
|
|
TRACE("(%p,0x%08lx,%p)\n",This,howmuch,notify);
|
|
|
|
|
|
|
|
if (!notify) {
|
|
|
|
WARN("invalid parameter\n");
|
|
|
|
return DSERR_INVALIDPARAM;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (TRACE_ON(wave)) {
|
|
|
|
int i;
|
|
|
|
for (i=0;i<howmuch;i++)
|
|
|
|
TRACE("notify at %ld to 0x%08lx\n",
|
|
|
|
notify[i].dwOffset,(DWORD)notify[i].hEventNotify);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Make an internal copy of the caller-supplied array.
|
|
|
|
* Replace the existing copy if one is already present. */
|
|
|
|
if (This->notifies)
|
|
|
|
This->notifies = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
|
|
|
This->notifies, howmuch * sizeof(DSBPOSITIONNOTIFY));
|
|
|
|
else
|
|
|
|
This->notifies = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
|
|
|
howmuch * sizeof(DSBPOSITIONNOTIFY));
|
|
|
|
|
|
|
|
memcpy(This->notifies, notify, howmuch * sizeof(DSBPOSITIONNOTIFY));
|
|
|
|
This->nrofnotifies = howmuch;
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
ICOM_VTABLE(IDsDriverNotify) dsdnvt =
|
|
|
|
{
|
|
|
|
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
|
|
|
IDsDriverNotifyImpl_QueryInterface,
|
|
|
|
IDsDriverNotifyImpl_AddRef,
|
|
|
|
IDsDriverNotifyImpl_Release,
|
|
|
|
IDsDriverNotifyImpl_SetNotificationPositions,
|
|
|
|
};
|
|
|
|
|
|
|
|
/*======================================================================*
|
|
|
|
* Low level DSOUND implementation *
|
|
|
|
*======================================================================*/
|
|
|
|
|
2004-02-13 21:44:42 +01:00
|
|
|
static HRESULT DSDB_MapBuffer(IDsDriverBufferImpl *dsdb)
|
2000-06-24 14:55:33 +02:00
|
|
|
{
|
2003-03-15 01:54:11 +01:00
|
|
|
TRACE("(%p)\n",dsdb);
|
2004-02-13 21:44:42 +01:00
|
|
|
if (!dsdb->mapping) {
|
|
|
|
dsdb->mapping = mmap(NULL, dsdb->maplen, PROT_WRITE, MAP_SHARED,
|
2004-02-13 22:04:28 +01:00
|
|
|
dsdb->fd, 0);
|
2004-02-13 21:44:42 +01:00
|
|
|
if (dsdb->mapping == (LPBYTE)-1) {
|
|
|
|
TRACE("(%p): Could not map sound device for direct access (%s)\n", dsdb, strerror(errno));
|
|
|
|
return DSERR_GENERIC;
|
|
|
|
}
|
|
|
|
TRACE("(%p): sound device has been mapped for direct access at %p, size=%ld\n", dsdb, dsdb->mapping, dsdb->maplen);
|
2000-10-12 22:37:51 +02:00
|
|
|
|
2001-08-18 18:09:41 +02:00
|
|
|
/* for some reason, es1371 and sblive! sometimes have junk in here.
|
|
|
|
* clear it, or we get junk noise */
|
|
|
|
/* some libc implementations are buggy: their memset reads from the buffer...
|
2001-12-14 23:44:29 +01:00
|
|
|
* to work around it, we have to zero the block by hand. We don't do the expected:
|
2004-02-13 21:44:42 +01:00
|
|
|
* memset(dsdb->mapping,0, dsdb->maplen);
|
2001-08-18 18:09:41 +02:00
|
|
|
*/
|
|
|
|
{
|
2004-02-13 21:44:42 +01:00
|
|
|
unsigned char* p1 = dsdb->mapping;
|
|
|
|
unsigned len = dsdb->maplen;
|
2003-10-27 23:00:10 +01:00
|
|
|
unsigned char silence = (dsdb->wfx.wBitsPerSample == 8) ? 128 : 0;
|
|
|
|
unsigned long ulsilence = (dsdb->wfx.wBitsPerSample == 8) ? 0x80808080 : 0;
|
2001-08-18 18:09:41 +02:00
|
|
|
|
2001-12-14 23:44:29 +01:00
|
|
|
if (len >= 16) /* so we can have at least a 4 long area to store... */
|
2001-08-18 18:09:41 +02:00
|
|
|
{
|
|
|
|
/* the mmap:ed value is (at least) dword aligned
|
2002-06-01 01:06:46 +02:00
|
|
|
* so, start filling the complete unsigned long:s
|
2001-08-18 18:09:41 +02:00
|
|
|
*/
|
|
|
|
int b = len >> 2;
|
|
|
|
unsigned long* p4 = (unsigned long*)p1;
|
|
|
|
|
2003-10-27 23:00:10 +01:00
|
|
|
while (b--) *p4++ = ulsilence;
|
2001-08-18 18:09:41 +02:00
|
|
|
/* prepare for filling the rest */
|
|
|
|
len &= 3;
|
|
|
|
p1 = (unsigned char*)p4;
|
|
|
|
}
|
|
|
|
/* in all cases, fill the remaining bytes */
|
2003-10-27 23:00:10 +01:00
|
|
|
while (len-- != 0) *p1++ = silence;
|
2001-08-18 18:09:41 +02:00
|
|
|
}
|
2000-06-24 14:55:33 +02:00
|
|
|
}
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
|
2004-02-13 21:44:42 +01:00
|
|
|
static HRESULT DSDB_UnmapBuffer(IDsDriverBufferImpl *dsdb)
|
2000-06-24 14:55:33 +02:00
|
|
|
{
|
2003-03-15 01:54:11 +01:00
|
|
|
TRACE("(%p)\n",dsdb);
|
2004-02-13 21:44:42 +01:00
|
|
|
if (dsdb->mapping) {
|
|
|
|
if (munmap(dsdb->mapping, dsdb->maplen) < 0) {
|
|
|
|
ERR("(%p): Could not unmap sound device (%s)\n", dsdb, strerror(errno));
|
|
|
|
return DSERR_GENERIC;
|
|
|
|
}
|
|
|
|
dsdb->mapping = NULL;
|
|
|
|
TRACE("(%p): sound device unmapped\n", dsdb);
|
2000-06-24 14:55:33 +02:00
|
|
|
}
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverBufferImpl_QueryInterface(PIDSDRIVERBUFFER iface, REFIID riid, LPVOID *ppobj)
|
|
|
|
{
|
2003-05-02 22:16:20 +02:00
|
|
|
ICOM_THIS(IDsDriverBufferImpl,iface);
|
|
|
|
TRACE("(%p,%s,%p)\n",iface,debugstr_guid(riid),*ppobj);
|
|
|
|
|
|
|
|
if ( IsEqualGUID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualGUID(riid, &IID_IDsDriverBuffer) ) {
|
|
|
|
IDsDriverBuffer_AddRef(iface);
|
|
|
|
*ppobj = (LPVOID)This;
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( IsEqualGUID( &IID_IDsDriverNotify, riid ) ) {
|
2004-01-20 02:47:27 +01:00
|
|
|
if (!This->notify)
|
|
|
|
IDsDriverNotifyImpl_Create(This, &(This->notify));
|
|
|
|
if (This->notify) {
|
|
|
|
IDsDriverNotify_AddRef((PIDSDRIVERNOTIFY)This->notify);
|
|
|
|
*ppobj = (LPVOID)This->notify;
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
*ppobj = 0;
|
|
|
|
return E_FAIL;
|
2003-05-02 22:16:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( IsEqualGUID( &IID_IDsDriverPropertySet, riid ) ) {
|
2004-01-20 02:47:27 +01:00
|
|
|
if (!This->property_set)
|
|
|
|
IDsDriverPropertySetImpl_Create(This, &(This->property_set));
|
|
|
|
if (This->property_set) {
|
|
|
|
IDsDriverPropertySet_AddRef((PIDSDRIVERPROPERTYSET)This->property_set);
|
|
|
|
*ppobj = (LPVOID)This->property_set;
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
*ppobj = 0;
|
|
|
|
return E_FAIL;
|
2003-05-02 22:16:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
FIXME( "Unknown IID %s\n", debugstr_guid( riid ) );
|
|
|
|
|
|
|
|
*ppobj = 0;
|
|
|
|
|
|
|
|
return E_NOINTERFACE;
|
2000-06-24 14:55:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDsDriverBufferImpl_AddRef(PIDSDRIVERBUFFER iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverBufferImpl,iface);
|
2004-02-16 21:23:42 +01:00
|
|
|
DWORD ref;
|
|
|
|
TRACE("(%p) ref was %ld\n", This, This->ref);
|
|
|
|
|
|
|
|
ref = InterlockedIncrement(&(This->ref));
|
|
|
|
return ref;
|
2000-06-24 14:55:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDsDriverBufferImpl_Release(PIDSDRIVERBUFFER iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverBufferImpl,iface);
|
2004-02-16 21:23:42 +01:00
|
|
|
DWORD ref;
|
|
|
|
TRACE("(%p) ref was %ld\n", This, This->ref);
|
|
|
|
|
|
|
|
ref = InterlockedDecrement(&(This->ref));
|
|
|
|
if (ref)
|
|
|
|
return ref;
|
|
|
|
|
2000-06-24 14:55:33 +02:00
|
|
|
if (This == This->drv->primary)
|
|
|
|
This->drv->primary = NULL;
|
2004-02-16 21:23:42 +01:00
|
|
|
else {
|
|
|
|
int i;
|
|
|
|
for (i = 0; i < This->drv->nrofsecondaries; i++)
|
|
|
|
if (This->drv->secondaries[i] == This)
|
|
|
|
break;
|
|
|
|
if (i < This->drv->nrofsecondaries) {
|
|
|
|
/* Put the last buffer of the list in the (now empty) position */
|
|
|
|
This->drv->secondaries[i] = This->drv->secondaries[This->drv->nrofsecondaries - 1];
|
|
|
|
This->drv->nrofsecondaries--;
|
|
|
|
This->drv->secondaries = HeapReAlloc(GetProcessHeap(),0,
|
|
|
|
This->drv->secondaries,
|
|
|
|
sizeof(PIDSDRIVERBUFFER)*This->drv->nrofsecondaries);
|
|
|
|
TRACE("(%p) buffer count is now %d\n", This, This->drv->nrofsecondaries);
|
|
|
|
}
|
|
|
|
|
|
|
|
WOutDev[This->drv->wDevID].ossdev->ds_caps.dwFreeHwMixingAllBuffers++;
|
|
|
|
WOutDev[This->drv->wDevID].ossdev->ds_caps.dwFreeHwMixingStreamingBuffers++;
|
|
|
|
}
|
|
|
|
|
2004-02-13 21:44:42 +01:00
|
|
|
DSDB_UnmapBuffer(This);
|
2000-06-24 14:55:33 +02:00
|
|
|
HeapFree(GetProcessHeap(),0,This);
|
2004-02-16 21:23:42 +01:00
|
|
|
TRACE("(%p) released\n",This);
|
2000-06-24 14:55:33 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverBufferImpl_Lock(PIDSDRIVERBUFFER iface,
|
|
|
|
LPVOID*ppvAudio1,LPDWORD pdwLen1,
|
|
|
|
LPVOID*ppvAudio2,LPDWORD pdwLen2,
|
|
|
|
DWORD dwWritePosition,DWORD dwWriteLen,
|
|
|
|
DWORD dwFlags)
|
|
|
|
{
|
|
|
|
/* ICOM_THIS(IDsDriverBufferImpl,iface); */
|
|
|
|
/* since we (GetDriverDesc flags) have specified DSDDESC_DONTNEEDPRIMARYLOCK,
|
|
|
|
* and that we don't support secondary buffers, this method will never be called */
|
|
|
|
TRACE("(%p): stub\n",iface);
|
|
|
|
return DSERR_UNSUPPORTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverBufferImpl_Unlock(PIDSDRIVERBUFFER iface,
|
|
|
|
LPVOID pvAudio1,DWORD dwLen1,
|
|
|
|
LPVOID pvAudio2,DWORD dwLen2)
|
|
|
|
{
|
|
|
|
/* ICOM_THIS(IDsDriverBufferImpl,iface); */
|
|
|
|
TRACE("(%p): stub\n",iface);
|
|
|
|
return DSERR_UNSUPPORTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverBufferImpl_SetFormat(PIDSDRIVERBUFFER iface,
|
|
|
|
LPWAVEFORMATEX pwfx)
|
|
|
|
{
|
|
|
|
/* ICOM_THIS(IDsDriverBufferImpl,iface); */
|
|
|
|
|
|
|
|
TRACE("(%p,%p)\n",iface,pwfx);
|
|
|
|
/* On our request (GetDriverDesc flags), DirectSound has by now used
|
|
|
|
* waveOutClose/waveOutOpen to set the format...
|
|
|
|
* unfortunately, this means our mmap() is now gone...
|
|
|
|
* so we need to somehow signal to our DirectSound implementation
|
|
|
|
* that it should completely recreate this HW buffer...
|
|
|
|
* this unexpected error code should do the trick... */
|
|
|
|
return DSERR_BUFFERLOST;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverBufferImpl_SetFrequency(PIDSDRIVERBUFFER iface, DWORD dwFreq)
|
|
|
|
{
|
|
|
|
/* ICOM_THIS(IDsDriverBufferImpl,iface); */
|
|
|
|
TRACE("(%p,%ld): stub\n",iface,dwFreq);
|
|
|
|
return DSERR_UNSUPPORTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverBufferImpl_SetVolumePan(PIDSDRIVERBUFFER iface, PDSVOLUMEPAN pVolPan)
|
|
|
|
{
|
2003-09-19 02:10:51 +02:00
|
|
|
DWORD vol;
|
|
|
|
ICOM_THIS(IDsDriverBufferImpl,iface);
|
|
|
|
TRACE("(%p,%p)\n",This,pVolPan);
|
|
|
|
|
|
|
|
vol = pVolPan->dwTotalLeftAmpFactor | (pVolPan->dwTotalRightAmpFactor << 16);
|
|
|
|
|
|
|
|
if (wodSetVolume(This->drv->wDevID, vol) != MMSYSERR_NOERROR) {
|
|
|
|
WARN("wodSetVolume failed\n");
|
|
|
|
return DSERR_INVALIDPARAM;
|
|
|
|
}
|
|
|
|
|
2003-09-15 22:08:05 +02:00
|
|
|
return DS_OK;
|
2000-06-24 14:55:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverBufferImpl_SetPosition(PIDSDRIVERBUFFER iface, DWORD dwNewPos)
|
|
|
|
{
|
|
|
|
/* ICOM_THIS(IDsDriverImpl,iface); */
|
|
|
|
TRACE("(%p,%ld): stub\n",iface,dwNewPos);
|
|
|
|
return DSERR_UNSUPPORTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverBufferImpl_GetPosition(PIDSDRIVERBUFFER iface,
|
|
|
|
LPDWORD lpdwPlay, LPDWORD lpdwWrite)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverBufferImpl,iface);
|
|
|
|
count_info info;
|
|
|
|
DWORD ptr;
|
|
|
|
|
|
|
|
TRACE("(%p)\n",iface);
|
2002-10-07 20:23:40 +02:00
|
|
|
if (WOutDev[This->drv->wDevID].state == WINE_WS_CLOSED) {
|
2000-12-21 21:49:26 +01:00
|
|
|
ERR("device not open, but accessing?\n");
|
|
|
|
return DSERR_UNINITIALIZED;
|
|
|
|
}
|
2004-02-13 22:04:28 +01:00
|
|
|
if (ioctl(This->fd, SNDCTL_DSP_GETOPTR, &info) < 0) {
|
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_GETOPTR) failed (%s)\n",
|
|
|
|
WOutDev[This->drv->wDevID].ossdev->dev_name, strerror(errno));
|
2000-06-24 14:55:33 +02:00
|
|
|
return DSERR_GENERIC;
|
|
|
|
}
|
|
|
|
ptr = info.ptr & ~3; /* align the pointer, just in case */
|
|
|
|
if (lpdwPlay) *lpdwPlay = ptr;
|
|
|
|
if (lpdwWrite) {
|
|
|
|
/* add some safety margin (not strictly necessary, but...) */
|
2002-10-09 22:37:09 +02:00
|
|
|
if (WOutDev[This->drv->wDevID].ossdev->out_caps.dwSupport & WAVECAPS_SAMPLEACCURATE)
|
2000-12-21 21:20:34 +01:00
|
|
|
*lpdwWrite = ptr + 32;
|
|
|
|
else
|
|
|
|
*lpdwWrite = ptr + WOutDev[This->drv->wDevID].dwFragmentSize;
|
2000-06-24 14:55:33 +02:00
|
|
|
while (*lpdwWrite > This->buflen)
|
|
|
|
*lpdwWrite -= This->buflen;
|
|
|
|
}
|
|
|
|
TRACE("playpos=%ld, writepos=%ld\n", lpdwPlay?*lpdwPlay:0, lpdwWrite?*lpdwWrite:0);
|
2000-12-21 21:20:34 +01:00
|
|
|
return DS_OK;
|
2000-06-24 14:55:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverBufferImpl_Play(PIDSDRIVERBUFFER iface, DWORD dwRes1, DWORD dwRes2, DWORD dwFlags)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverBufferImpl,iface);
|
2003-03-07 21:37:25 +01:00
|
|
|
int enable;
|
2000-06-24 14:55:33 +02:00
|
|
|
TRACE("(%p,%lx,%lx,%lx)\n",iface,dwRes1,dwRes2,dwFlags);
|
2003-03-07 21:37:25 +01:00
|
|
|
WOutDev[This->drv->wDevID].ossdev->bOutputEnabled = TRUE;
|
|
|
|
enable = getEnables(WOutDev[This->drv->wDevID].ossdev);
|
2004-02-13 22:04:28 +01:00
|
|
|
if (ioctl(This->fd, SNDCTL_DSP_SETTRIGGER, &enable) < 0) {
|
2003-04-26 04:09:20 +02:00
|
|
|
if (errno == EINVAL) {
|
|
|
|
/* Don't give up yet. OSS trigger support is inconsistent. */
|
|
|
|
if (WOutDev[This->drv->wDevID].ossdev->open_count == 1) {
|
|
|
|
/* try the opposite input enable */
|
|
|
|
if (WOutDev[This->drv->wDevID].ossdev->bInputEnabled == FALSE)
|
|
|
|
WOutDev[This->drv->wDevID].ossdev->bInputEnabled = TRUE;
|
|
|
|
else
|
|
|
|
WOutDev[This->drv->wDevID].ossdev->bInputEnabled = FALSE;
|
|
|
|
/* try it again */
|
|
|
|
enable = getEnables(WOutDev[This->drv->wDevID].ossdev);
|
2004-02-13 22:04:28 +01:00
|
|
|
if (ioctl(This->fd, SNDCTL_DSP_SETTRIGGER, &enable) >= 0)
|
2003-04-26 04:09:20 +02:00
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
}
|
2003-03-15 01:54:11 +01:00
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_SETTRIGGER) failed (%s)\n",WOutDev[This->drv->wDevID].ossdev->dev_name, strerror(errno));
|
2003-03-07 21:37:25 +01:00
|
|
|
WOutDev[This->drv->wDevID].ossdev->bOutputEnabled = FALSE;
|
2000-06-24 14:55:33 +02:00
|
|
|
return DSERR_GENERIC;
|
|
|
|
}
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverBufferImpl_Stop(PIDSDRIVERBUFFER iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverBufferImpl,iface);
|
2003-03-07 21:37:25 +01:00
|
|
|
int enable;
|
2000-06-24 14:55:33 +02:00
|
|
|
TRACE("(%p)\n",iface);
|
|
|
|
/* no more playing */
|
2003-03-07 21:37:25 +01:00
|
|
|
WOutDev[This->drv->wDevID].ossdev->bOutputEnabled = FALSE;
|
|
|
|
enable = getEnables(WOutDev[This->drv->wDevID].ossdev);
|
2004-02-13 22:04:28 +01:00
|
|
|
if (ioctl(This->fd, SNDCTL_DSP_SETTRIGGER, &enable) < 0) {
|
2003-03-15 01:54:11 +01:00
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_SETTRIGGER) failed (%s)\n", WOutDev[This->drv->wDevID].ossdev->dev_name, strerror(errno));
|
2000-06-24 14:55:33 +02:00
|
|
|
return DSERR_GENERIC;
|
|
|
|
}
|
|
|
|
#if 0
|
|
|
|
/* the play position must be reset to the beginning of the buffer */
|
2004-02-13 22:04:28 +01:00
|
|
|
if (ioctl(This->fd, SNDCTL_DSP_RESET, 0) < 0) {
|
2003-03-15 01:54:11 +01:00
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_RESET) failed (%s)\n", WOutDev[This->drv->wDevID].ossdev->dev_name, strerror(errno));
|
2000-06-24 14:55:33 +02:00
|
|
|
return DSERR_GENERIC;
|
|
|
|
}
|
|
|
|
#endif
|
2001-03-21 04:37:33 +01:00
|
|
|
/* Most OSS drivers just can't stop the playback without closing the device...
|
|
|
|
* so we need to somehow signal to our DirectSound implementation
|
|
|
|
* that it should completely recreate this HW buffer...
|
|
|
|
* this unexpected error code should do the trick... */
|
2003-09-27 04:20:19 +02:00
|
|
|
/* FIXME: ...unless we are doing full duplex, then its not nice to close the device */
|
|
|
|
if (WOutDev[This->drv->wDevID].ossdev->open_count == 1)
|
|
|
|
return DSERR_BUFFERLOST;
|
|
|
|
|
|
|
|
return DS_OK;
|
2000-06-24 14:55:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static ICOM_VTABLE(IDsDriverBuffer) dsdbvt =
|
|
|
|
{
|
|
|
|
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
|
|
|
IDsDriverBufferImpl_QueryInterface,
|
|
|
|
IDsDriverBufferImpl_AddRef,
|
|
|
|
IDsDriverBufferImpl_Release,
|
|
|
|
IDsDriverBufferImpl_Lock,
|
|
|
|
IDsDriverBufferImpl_Unlock,
|
|
|
|
IDsDriverBufferImpl_SetFormat,
|
|
|
|
IDsDriverBufferImpl_SetFrequency,
|
|
|
|
IDsDriverBufferImpl_SetVolumePan,
|
|
|
|
IDsDriverBufferImpl_SetPosition,
|
|
|
|
IDsDriverBufferImpl_GetPosition,
|
|
|
|
IDsDriverBufferImpl_Play,
|
|
|
|
IDsDriverBufferImpl_Stop
|
|
|
|
};
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverImpl_QueryInterface(PIDSDRIVER iface, REFIID riid, LPVOID *ppobj)
|
|
|
|
{
|
2003-05-02 22:16:20 +02:00
|
|
|
ICOM_THIS(IDsDriverImpl,iface);
|
|
|
|
TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppobj);
|
|
|
|
|
|
|
|
if ( IsEqualGUID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualGUID(riid, &IID_IDsDriver) ) {
|
|
|
|
IDsDriver_AddRef(iface);
|
|
|
|
*ppobj = (LPVOID)This;
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
FIXME( "Unknown IID %s\n", debugstr_guid( riid ) );
|
|
|
|
|
|
|
|
*ppobj = 0;
|
|
|
|
|
|
|
|
return E_NOINTERFACE;
|
2000-06-24 14:55:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDsDriverImpl_AddRef(PIDSDRIVER iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverImpl,iface);
|
2004-02-16 21:23:42 +01:00
|
|
|
DWORD ref;
|
|
|
|
TRACE("(%p) ref was %ld\n", This, This->ref);
|
|
|
|
|
|
|
|
ref = InterlockedIncrement(&(This->ref));
|
|
|
|
return ref;
|
2000-06-24 14:55:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDsDriverImpl_Release(PIDSDRIVER iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverImpl,iface);
|
2004-02-16 21:23:42 +01:00
|
|
|
DWORD ref;
|
|
|
|
TRACE("(%p) ref was %ld\n", This, This->ref);
|
|
|
|
|
|
|
|
ref = InterlockedDecrement(&(This->ref));
|
|
|
|
if (ref == 0) {
|
|
|
|
HeapFree(GetProcessHeap(),0,This);
|
|
|
|
TRACE("(%p) released\n",This);
|
2003-03-15 01:54:11 +01:00
|
|
|
}
|
2004-02-16 21:23:42 +01:00
|
|
|
return ref;
|
2000-06-24 14:55:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverImpl_GetDriverDesc(PIDSDRIVER iface, PDSDRIVERDESC pDesc)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverImpl,iface);
|
|
|
|
TRACE("(%p,%p)\n",iface,pDesc);
|
2003-03-15 01:54:11 +01:00
|
|
|
|
|
|
|
/* copy version from driver */
|
|
|
|
memcpy(pDesc, &(WOutDev[This->wDevID].ossdev->ds_desc), sizeof(DSDRIVERDESC));
|
|
|
|
|
|
|
|
pDesc->dwFlags |= DSDDESC_DOMMSYSTEMOPEN | DSDDESC_DOMMSYSTEMSETFORMAT |
|
2000-06-24 14:55:33 +02:00
|
|
|
DSDDESC_USESYSTEMMEMORY | DSDDESC_DONTNEEDPRIMARYLOCK;
|
|
|
|
pDesc->dnDevNode = WOutDev[This->wDevID].waveDesc.dnDevNode;
|
2002-06-01 01:06:46 +02:00
|
|
|
pDesc->wVxdId = 0;
|
2000-06-24 14:55:33 +02:00
|
|
|
pDesc->wReserved = 0;
|
|
|
|
pDesc->ulDeviceNum = This->wDevID;
|
|
|
|
pDesc->dwHeapType = DSDHEAP_NOHEAP;
|
|
|
|
pDesc->pvDirectDrawHeap = NULL;
|
|
|
|
pDesc->dwMemStartAddress = 0;
|
|
|
|
pDesc->dwMemEndAddress = 0;
|
|
|
|
pDesc->dwMemAllocExtra = 0;
|
|
|
|
pDesc->pvReserved1 = NULL;
|
|
|
|
pDesc->pvReserved2 = NULL;
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverImpl_Open(PIDSDRIVER iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverImpl,iface);
|
2003-03-07 21:37:25 +01:00
|
|
|
int enable;
|
2000-06-24 14:55:33 +02:00
|
|
|
TRACE("(%p)\n",iface);
|
2003-03-07 21:37:25 +01:00
|
|
|
|
2000-06-24 14:55:33 +02:00
|
|
|
/* make sure the card doesn't start playing before we want it to */
|
2003-03-07 21:37:25 +01:00
|
|
|
WOutDev[This->wDevID].ossdev->bOutputEnabled = FALSE;
|
|
|
|
enable = getEnables(WOutDev[This->wDevID].ossdev);
|
2002-10-07 20:23:40 +02:00
|
|
|
if (ioctl(WOutDev[This->wDevID].ossdev->fd, SNDCTL_DSP_SETTRIGGER, &enable) < 0) {
|
2003-03-15 01:54:11 +01:00
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_SETTRIGGER) failed (%s)\n",WOutDev[This->wDevID].ossdev->dev_name, strerror(errno));
|
2000-06-24 14:55:33 +02:00
|
|
|
return DSERR_GENERIC;
|
|
|
|
}
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverImpl_Close(PIDSDRIVER iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverImpl,iface);
|
|
|
|
TRACE("(%p)\n",iface);
|
|
|
|
if (This->primary) {
|
|
|
|
ERR("problem with DirectSound: primary not released\n");
|
|
|
|
return DSERR_GENERIC;
|
|
|
|
}
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverImpl_GetCaps(PIDSDRIVER iface, PDSDRIVERCAPS pCaps)
|
|
|
|
{
|
2003-03-15 01:54:11 +01:00
|
|
|
ICOM_THIS(IDsDriverImpl,iface);
|
2000-06-24 14:55:33 +02:00
|
|
|
TRACE("(%p,%p)\n",iface,pCaps);
|
2003-03-15 01:54:11 +01:00
|
|
|
memcpy(pCaps, &(WOutDev[This->wDevID].ossdev->ds_caps), sizeof(DSDRIVERCAPS));
|
2000-06-24 14:55:33 +02:00
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
|
2004-02-13 21:56:21 +01:00
|
|
|
static HRESULT WINAPI DSD_CreatePrimaryBuffer(PIDSDRIVER iface,
|
|
|
|
LPWAVEFORMATEX pwfx,
|
|
|
|
DWORD dwFlags,
|
|
|
|
DWORD dwCardAddress,
|
|
|
|
LPDWORD pdwcbBufferSize,
|
|
|
|
LPBYTE *ppbBuffer,
|
|
|
|
LPVOID *ppvObj)
|
2000-06-24 14:55:33 +02:00
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverImpl,iface);
|
|
|
|
IDsDriverBufferImpl** ippdsdb = (IDsDriverBufferImpl**)ppvObj;
|
|
|
|
HRESULT err;
|
|
|
|
audio_buf_info info;
|
2000-12-21 21:20:34 +01:00
|
|
|
int enable = 0;
|
2004-02-13 21:56:21 +01:00
|
|
|
TRACE("(%p,%p,%lx,%lx,%p,%p,%p)\n",iface,pwfx,dwFlags,dwCardAddress,pdwcbBufferSize,ppbBuffer,ppvObj);
|
2003-03-15 01:54:11 +01:00
|
|
|
|
2000-06-24 14:55:33 +02:00
|
|
|
if (This->primary)
|
|
|
|
return DSERR_ALLOCATED;
|
|
|
|
if (dwFlags & (DSBCAPS_CTRLFREQUENCY | DSBCAPS_CTRLPAN))
|
|
|
|
return DSERR_CONTROLUNAVAIL;
|
|
|
|
|
2003-04-30 00:47:59 +02:00
|
|
|
*ippdsdb = (IDsDriverBufferImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDsDriverBufferImpl));
|
2000-06-24 14:55:33 +02:00
|
|
|
if (*ippdsdb == NULL)
|
|
|
|
return DSERR_OUTOFMEMORY;
|
2003-04-10 20:17:34 +02:00
|
|
|
(*ippdsdb)->lpVtbl = &dsdbvt;
|
2000-06-24 14:55:33 +02:00
|
|
|
(*ippdsdb)->ref = 1;
|
|
|
|
(*ippdsdb)->drv = This;
|
2003-10-27 23:00:10 +01:00
|
|
|
(*ippdsdb)->wfx = *pwfx;
|
2004-02-13 22:04:28 +01:00
|
|
|
(*ippdsdb)->fd = WOutDev[This->wDevID].ossdev->fd;
|
|
|
|
(*ippdsdb)->dwFlags = dwFlags;
|
2000-06-24 14:55:33 +02:00
|
|
|
|
|
|
|
/* check how big the DMA buffer is now */
|
2004-02-13 22:04:28 +01:00
|
|
|
if (ioctl((*ippdsdb)->fd, SNDCTL_DSP_GETOSPACE, &info) < 0) {
|
2004-02-13 21:44:42 +01:00
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_GETOSPACE) failed (%s)\n",
|
|
|
|
WOutDev[This->wDevID].ossdev->dev_name, strerror(errno));
|
2000-06-24 14:55:33 +02:00
|
|
|
HeapFree(GetProcessHeap(),0,*ippdsdb);
|
|
|
|
*ippdsdb = NULL;
|
|
|
|
return DSERR_GENERIC;
|
|
|
|
}
|
2004-02-13 21:44:42 +01:00
|
|
|
(*ippdsdb)->maplen = (*ippdsdb)->buflen = info.fragstotal * info.fragsize;
|
2000-06-24 14:55:33 +02:00
|
|
|
|
|
|
|
/* map the DMA buffer */
|
2004-02-13 21:44:42 +01:00
|
|
|
err = DSDB_MapBuffer(*ippdsdb);
|
2000-06-24 14:55:33 +02:00
|
|
|
if (err != DS_OK) {
|
|
|
|
HeapFree(GetProcessHeap(),0,*ippdsdb);
|
|
|
|
*ippdsdb = NULL;
|
|
|
|
return err;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* primary buffer is ready to go */
|
2004-02-13 21:44:42 +01:00
|
|
|
*pdwcbBufferSize = (*ippdsdb)->maplen;
|
|
|
|
*ppbBuffer = (*ippdsdb)->mapping;
|
2000-06-24 14:55:33 +02:00
|
|
|
|
2000-12-21 21:20:34 +01:00
|
|
|
/* some drivers need some extra nudging after mapping */
|
2003-03-07 21:37:25 +01:00
|
|
|
WOutDev[This->wDevID].ossdev->bOutputEnabled = FALSE;
|
|
|
|
enable = getEnables(WOutDev[This->wDevID].ossdev);
|
2004-02-13 22:04:28 +01:00
|
|
|
if (ioctl((*ippdsdb)->fd, SNDCTL_DSP_SETTRIGGER, &enable) < 0) {
|
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_SETTRIGGER) failed (%s)\n",
|
|
|
|
WOutDev[This->wDevID].ossdev->dev_name, strerror(errno));
|
2000-12-21 21:20:34 +01:00
|
|
|
return DSERR_GENERIC;
|
|
|
|
}
|
|
|
|
|
2000-06-24 14:55:33 +02:00
|
|
|
This->primary = *ippdsdb;
|
|
|
|
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
|
2004-02-13 21:56:21 +01:00
|
|
|
static HRESULT WINAPI DSD_CreateSecondaryBuffer(PIDSDRIVER iface,
|
|
|
|
LPWAVEFORMATEX pwfx,
|
|
|
|
DWORD dwFlags,
|
|
|
|
DWORD dwCardAddress,
|
|
|
|
LPDWORD pdwcbBufferSize,
|
|
|
|
LPBYTE *ppbBuffer,
|
|
|
|
LPVOID *ppvObj)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsDriverImpl,iface);
|
|
|
|
IDsDriverBufferImpl** ippdsdb = (IDsDriverBufferImpl**)ppvObj;
|
|
|
|
FIXME("(%p,%p,%lx,%lx,%p,%p,%p): stub\n",This,pwfx,dwFlags,dwCardAddress,pdwcbBufferSize,ppbBuffer,ppvObj);
|
|
|
|
|
|
|
|
*ippdsdb = 0;
|
|
|
|
return DSERR_UNSUPPORTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverImpl_CreateSoundBuffer(PIDSDRIVER iface,
|
|
|
|
LPWAVEFORMATEX pwfx,
|
|
|
|
DWORD dwFlags,
|
|
|
|
DWORD dwCardAddress,
|
|
|
|
LPDWORD pdwcbBufferSize,
|
|
|
|
LPBYTE *ppbBuffer,
|
|
|
|
LPVOID *ppvObj)
|
|
|
|
{
|
|
|
|
TRACE("(%p,%p,%lx,%lx,%p,%p,%p)\n",iface,pwfx,dwFlags,dwCardAddress,pdwcbBufferSize,ppbBuffer,ppvObj);
|
|
|
|
|
|
|
|
if (dwFlags & DSBCAPS_PRIMARYBUFFER)
|
|
|
|
return DSD_CreatePrimaryBuffer(iface,pwfx,dwFlags,dwCardAddress,pdwcbBufferSize,ppbBuffer,ppvObj);
|
|
|
|
|
|
|
|
return DSD_CreateSecondaryBuffer(iface,pwfx,dwFlags,dwCardAddress,pdwcbBufferSize,ppbBuffer,ppvObj);
|
|
|
|
}
|
|
|
|
|
2000-06-24 14:55:33 +02:00
|
|
|
static HRESULT WINAPI IDsDriverImpl_DuplicateSoundBuffer(PIDSDRIVER iface,
|
|
|
|
PIDSDRIVERBUFFER pBuffer,
|
|
|
|
LPVOID *ppvObj)
|
|
|
|
{
|
|
|
|
/* ICOM_THIS(IDsDriverImpl,iface); */
|
|
|
|
TRACE("(%p,%p): stub\n",iface,pBuffer);
|
|
|
|
return DSERR_INVALIDCALL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ICOM_VTABLE(IDsDriver) dsdvt =
|
|
|
|
{
|
|
|
|
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
|
|
|
IDsDriverImpl_QueryInterface,
|
|
|
|
IDsDriverImpl_AddRef,
|
|
|
|
IDsDriverImpl_Release,
|
|
|
|
IDsDriverImpl_GetDriverDesc,
|
|
|
|
IDsDriverImpl_Open,
|
|
|
|
IDsDriverImpl_Close,
|
|
|
|
IDsDriverImpl_GetCaps,
|
|
|
|
IDsDriverImpl_CreateSoundBuffer,
|
|
|
|
IDsDriverImpl_DuplicateSoundBuffer
|
|
|
|
};
|
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
static HRESULT WINAPI IDsDriverPropertySetImpl_Create(
|
|
|
|
IDsDriverBufferImpl * dsdb,
|
|
|
|
IDsDriverPropertySetImpl **pdsdps)
|
|
|
|
{
|
|
|
|
IDsDriverPropertySetImpl * dsdps;
|
|
|
|
TRACE("(%p,%p)\n",dsdb,pdsdps);
|
|
|
|
|
|
|
|
dsdps = (IDsDriverPropertySetImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(dsdps));
|
|
|
|
if (dsdps == NULL) {
|
|
|
|
WARN("out of memory\n");
|
|
|
|
return DSERR_OUTOFMEMORY;
|
|
|
|
}
|
|
|
|
|
|
|
|
dsdps->ref = 0;
|
|
|
|
dsdps->lpVtbl = &dsdpsvt;
|
|
|
|
dsdps->buffer = dsdb;
|
|
|
|
dsdb->property_set = dsdps;
|
|
|
|
IDsDriverBuffer_AddRef((PIDSDRIVER)dsdb);
|
|
|
|
|
|
|
|
*pdsdps = dsdps;
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsDriverNotifyImpl_Create(
|
|
|
|
IDsDriverBufferImpl * dsdb,
|
|
|
|
IDsDriverNotifyImpl **pdsdn)
|
|
|
|
{
|
|
|
|
IDsDriverNotifyImpl * dsdn;
|
|
|
|
TRACE("(%p,%p)\n",dsdb,pdsdn);
|
|
|
|
|
|
|
|
dsdn = (IDsDriverNotifyImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(dsdn));
|
|
|
|
|
|
|
|
if (dsdn == NULL) {
|
|
|
|
WARN("out of memory\n");
|
|
|
|
return DSERR_OUTOFMEMORY;
|
|
|
|
}
|
|
|
|
|
|
|
|
dsdn->ref = 0;
|
|
|
|
dsdn->lpVtbl = &dsdnvt;
|
|
|
|
dsdn->buffer = dsdb;
|
|
|
|
dsdb->notify = dsdn;
|
|
|
|
IDsDriverBuffer_AddRef((PIDSDRIVER)dsdb);
|
|
|
|
|
|
|
|
*pdsdn = dsdn;
|
|
|
|
return DS_OK;
|
|
|
|
};
|
|
|
|
|
2000-06-24 14:55:33 +02:00
|
|
|
static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv)
|
|
|
|
{
|
|
|
|
IDsDriverImpl** idrv = (IDsDriverImpl**)drv;
|
2003-03-15 01:54:11 +01:00
|
|
|
TRACE("(%d,%p)\n",wDevID,drv);
|
2000-06-24 14:55:33 +02:00
|
|
|
|
|
|
|
/* the HAL isn't much better than the HEL if we can't do mmap() */
|
2002-10-09 22:37:09 +02:00
|
|
|
if (!(WOutDev[wDevID].ossdev->out_caps.dwSupport & WAVECAPS_DIRECTSOUND)) {
|
2000-06-24 14:55:33 +02:00
|
|
|
ERR("DirectSound flag not set\n");
|
|
|
|
MESSAGE("This sound card's driver does not support direct access\n");
|
|
|
|
MESSAGE("The (slower) DirectSound HEL mode will be used instead.\n");
|
|
|
|
return MMSYSERR_NOTSUPPORTED;
|
|
|
|
}
|
|
|
|
|
2003-04-30 00:47:59 +02:00
|
|
|
*idrv = (IDsDriverImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDsDriverImpl));
|
2000-06-24 14:55:33 +02:00
|
|
|
if (!*idrv)
|
|
|
|
return MMSYSERR_NOMEM;
|
2004-02-16 21:23:42 +01:00
|
|
|
(*idrv)->lpVtbl = &dsdvt;
|
|
|
|
(*idrv)->ref = 1;
|
|
|
|
(*idrv)->wDevID = wDevID;
|
|
|
|
(*idrv)->primary = NULL;
|
|
|
|
(*idrv)->nrofsecondaries = 0;
|
|
|
|
(*idrv)->secondaries = NULL;
|
2000-06-24 14:55:33 +02:00
|
|
|
|
|
|
|
return MMSYSERR_NOERROR;
|
|
|
|
}
|
|
|
|
|
2003-03-15 01:54:11 +01:00
|
|
|
static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc)
|
|
|
|
{
|
|
|
|
TRACE("(%d,%p)\n",wDevID,desc);
|
|
|
|
memcpy(desc, &(WOutDev[wDevID].ossdev->ds_desc), sizeof(DSDRIVERDESC));
|
|
|
|
return MMSYSERR_NOERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD wodDsGuid(UINT wDevID, LPGUID pGuid)
|
|
|
|
{
|
|
|
|
TRACE("(%d,%p)\n",wDevID,pGuid);
|
|
|
|
memcpy(pGuid, &(WOutDev[wDevID].ossdev->ds_guid), sizeof(GUID));
|
|
|
|
return MMSYSERR_NOERROR;
|
|
|
|
}
|
|
|
|
|
1999-04-11 14:16:24 +02:00
|
|
|
/*======================================================================*
|
2000-10-23 01:43:15 +02:00
|
|
|
* Low level WAVE IN implementation *
|
1999-04-11 14:16:24 +02:00
|
|
|
*======================================================================*/
|
1994-07-07 18:23:58 +02:00
|
|
|
|
2001-12-14 23:44:29 +01:00
|
|
|
/**************************************************************************
|
|
|
|
* widNotifyClient [internal]
|
|
|
|
*/
|
|
|
|
static DWORD widNotifyClient(WINE_WAVEIN* wwi, WORD wMsg, DWORD dwParam1, DWORD dwParam2)
|
|
|
|
{
|
2003-11-14 22:03:24 +01:00
|
|
|
TRACE("wMsg = 0x%04x (%s) dwParm1 = %04lX dwParam2 = %04lX\n", wMsg,
|
|
|
|
wMsg == WIM_OPEN ? "WIM_OPEN" : wMsg == WIM_CLOSE ? "WIM_CLOSE" :
|
|
|
|
wMsg == WIM_DATA ? "WIM_DATA" : "Unknown", dwParam1, dwParam2);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2001-12-14 23:44:29 +01:00
|
|
|
switch (wMsg) {
|
|
|
|
case WIM_OPEN:
|
|
|
|
case WIM_CLOSE:
|
|
|
|
case WIM_DATA:
|
2002-06-01 01:06:46 +02:00
|
|
|
if (wwi->wFlags != DCB_NULL &&
|
2002-08-09 03:02:25 +02:00
|
|
|
!DriverCallback(wwi->waveDesc.dwCallback, wwi->wFlags,
|
|
|
|
(HDRVR)wwi->waveDesc.hWave, wMsg,
|
|
|
|
wwi->waveDesc.dwInstance, dwParam1, dwParam2)) {
|
2001-12-14 23:44:29 +01:00
|
|
|
WARN("can't notify client !\n");
|
|
|
|
return MMSYSERR_ERROR;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
2001-12-21 21:28:43 +01:00
|
|
|
FIXME("Unknown callback message %u\n", wMsg);
|
2001-12-14 23:44:29 +01:00
|
|
|
return MMSYSERR_INVALPARAM;
|
|
|
|
}
|
|
|
|
return MMSYSERR_NOERROR;
|
|
|
|
}
|
|
|
|
|
1994-07-07 18:23:58 +02:00
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* widGetDevCaps [internal]
|
|
|
|
*/
|
1999-09-22 18:45:33 +02:00
|
|
|
static DWORD widGetDevCaps(WORD wDevID, LPWAVEINCAPSA lpCaps, DWORD dwSize)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u, %p, %lu);\n", wDevID, lpCaps, dwSize);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1998-10-11 16:14:24 +02:00
|
|
|
if (lpCaps == NULL) return MMSYSERR_NOTENABLED;
|
2002-08-09 03:02:25 +02:00
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numInDev) {
|
|
|
|
TRACE("numOutDev reached !\n");
|
2000-05-10 00:35:47 +02:00
|
|
|
return MMSYSERR_BADDEVICEID;
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
2000-05-10 00:35:47 +02:00
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
memcpy(lpCaps, &WInDev[wDevID].ossdev->in_caps, min(dwSize, sizeof(*lpCaps)));
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOERROR;
|
Release 940420
Wed Apr 20 14:53:35 1994 Bob Amstadt (bob@pooh)
* [tools/build.c] [if1632/call.S] [if1632/Imakefile]
Fixed bug for non-Linux systems.
Apr 18, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [windows/win.c]
Bug fixed in CreateWindowEx() : Now use SetMenu() for menubar setup.
New empty stub for function SetSysModalWindow().
* [misc/exec.c]
New empty stub for function ExitWindows().
* [objects/font.c]
New empty stub for function EnumFonts().
* New file [misc/property.c]
New functions RemoveProp(), GetProp(), SetProp() & EnumProps().
* New file [misc/shell.c]
New empty stubs for function RegisterShellProc(),
ShellExecute() & ShellProc().
* New files [loader/task.c] & [include/task.h]
Move functions GetWindowTask(), GetNumTask(), EnumTaskWindows()
from 'loader/library.c'.
* [if1632/user.c] [if1632/kernel.c]
Put Atoms functions entries.
* [controls/combo.c]
New functions DirDlgSelectComboBox() & DirDlgListComboBox().
* [controls/listbox.c]
New functions DirDlgSelect() & DirDlgList().
Sun Apr 17 20:57:59 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [objects/test.c]
GrayString() added.
* [if1632/callback.c]
CallGrayStringProc() added.
* [if1632/relay.c] [if1632/mmsystem.spec]
Added.
* [if1632/kernel.spec] [if1632/user.spec]
Added forgotten specs for atom functions.
Tue Apr 12 00:05:31 1994 Bob Amstadt (bob@pooh)
* misc/spy.c (SpyInit): Added more message types
* [windows/mdi.c] [include/mdi.h]
Maximizing and restoring child windows.
Tiling of child windows.
Mon Apr 11 20:48:28 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
* [windows/winpos.c]
Revert focus and activation to previous window when hiding a window.
* [windows/syscolor.c]
Implemented system color objects (brushes and pens created at
SetSysColor() time for better performance).
* [windows/graphics.c] [windows/nonclient.c] [controls/button.c]
Changed painting code to use system color objects.
* [windows/message.c]
New function MSG_InternalGetMessage() for internal messages
loops (e.g. for dialogs or menus).
* [windows/hook.c] [include/hook.h] (New files)
Beginning of the window hooks implementation.
* [windows/dialog.c]
Use new function MSG_InternalGetMessage() in DialogBox().
* [if1632/callback.c]
Added function CallHookProc().
Apr 11, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [windows/event.c]
Bug fix : WM_CHARs are sent to focused window like WM_KEY???.
* [misc/exec.c]
Nothing much more than a stub for LoadModule(), I saw there a lot
to be done in that corner, I will come back later ...
* [loader/library.c]
New functions GetWindowTask(), GetNumTask(), EnumTaskWindows()
and associated modules & tasks linked-lists.
(it's only an 'emerging bud', more to come next weeks).
* [loader/wine.c]
Use LoadLibrary() instead of LoadImage() for 'sysres.dll'.
* [control/menu.c]
You can now click outside menu region without problem.
Keyboard navig more smootly, even if a child has the focus.
Bug fix in InsertItem(), (bad linklist when insert point not found).
change Realloc for Free & Alloc in ModifyItem().
MF_STRING now set BLACK_PEN to fix bug of bad color of the underscores
done by DrawText(), (maybe it should done in DrawText() itself ?).
Sun Apr 10 14:06:08 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/profile.c]
.INI files will now be stored in / loaded from the windows dir
if no path is supplied.
* [if1632/kernel.spec]
Fixed GetDriveType's prototype.
* [if1632/winsock.spec] [include/winsock.h] [misc/winsocket.c]
Fixed prototypes: winsock uses a word as socket handle not an int.
* [misc/winsocket.c]
Added heap allocation for returned structures.
Added non-blocking WSAAsyncGetXbyY() functions as blocking ones.
* [loader/wine.c]
Added IsDLLLoaded(), used in LoadImage() to prevent loading
a dll multiple times.
Directory is added to wine's path when a fullpath is supplied when
starting wine.
LoadImage(): DLL filename used instead DLL's own internal name,
fixes 'Bad DLL name' errors.
Sat Apr 9 08:26:03 1994 David Metcalfe <david@prism.demon.co.uk>
* [controls/edit.c] [controls/widgets.c]
First release of edit control.
1994-04-21 03:20:00 +02:00
|
|
|
}
|
|
|
|
|
2003-11-14 22:03:24 +01:00
|
|
|
/**************************************************************************
|
|
|
|
* widRecorder_ReadHeaders [internal]
|
|
|
|
*/
|
|
|
|
static void widRecorder_ReadHeaders(WINE_WAVEIN * wwi)
|
|
|
|
{
|
|
|
|
enum win_wm_message tmp_msg;
|
|
|
|
DWORD tmp_param;
|
|
|
|
HANDLE tmp_ev;
|
|
|
|
WAVEHDR* lpWaveHdr;
|
|
|
|
|
|
|
|
while (OSS_RetrieveRingMessage(&wwi->msgRing, &tmp_msg, &tmp_param, &tmp_ev)) {
|
|
|
|
if (tmp_msg == WINE_WM_HEADER) {
|
|
|
|
LPWAVEHDR* wh;
|
|
|
|
lpWaveHdr = (LPWAVEHDR)tmp_param;
|
|
|
|
lpWaveHdr->lpNext = 0;
|
|
|
|
|
|
|
|
if (wwi->lpQueuePtr == 0)
|
|
|
|
wwi->lpQueuePtr = lpWaveHdr;
|
|
|
|
else {
|
|
|
|
for (wh = &(wwi->lpQueuePtr); *wh; wh = &((*wh)->lpNext));
|
|
|
|
*wh = lpWaveHdr;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
ERR("should only have headers left\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-06-24 19:54:43 +02:00
|
|
|
/**************************************************************************
|
|
|
|
* widRecorder [internal]
|
|
|
|
*/
|
|
|
|
static DWORD CALLBACK widRecorder(LPVOID pmt)
|
|
|
|
{
|
|
|
|
WORD uDevID = (DWORD)pmt;
|
|
|
|
WINE_WAVEIN* wwi = (WINE_WAVEIN*)&WInDev[uDevID];
|
|
|
|
WAVEHDR* lpWaveHdr;
|
|
|
|
DWORD dwSleepTime;
|
|
|
|
DWORD bytesRead;
|
2001-12-14 23:44:29 +01:00
|
|
|
LPVOID buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, wwi->dwFragmentSize);
|
2003-01-23 22:32:35 +01:00
|
|
|
char *pOffset = buffer;
|
2001-11-12 16:55:37 +01:00
|
|
|
audio_buf_info info;
|
|
|
|
int xs;
|
2001-12-14 23:44:29 +01:00
|
|
|
enum win_wm_message msg;
|
2001-11-12 16:55:37 +01:00
|
|
|
DWORD param;
|
|
|
|
HANDLE ev;
|
2003-03-07 21:37:25 +01:00
|
|
|
int enable;
|
2000-10-24 04:20:01 +02:00
|
|
|
|
2000-06-24 19:54:43 +02:00
|
|
|
wwi->state = WINE_WS_STOPPED;
|
|
|
|
wwi->dwTotalRecorded = 0;
|
2004-03-12 20:43:44 +01:00
|
|
|
wwi->dwTotalRead = 0;
|
2003-03-04 03:11:21 +01:00
|
|
|
wwi->lpQueuePtr = NULL;
|
2000-06-24 19:54:43 +02:00
|
|
|
|
2001-11-12 16:55:37 +01:00
|
|
|
SetEvent(wwi->hStartUpEvent);
|
2001-01-02 21:32:33 +01:00
|
|
|
|
2003-03-07 21:37:25 +01:00
|
|
|
/* disable input so capture will begin when triggered */
|
|
|
|
wwi->ossdev->bInputEnabled = FALSE;
|
|
|
|
enable = getEnables(wwi->ossdev);
|
|
|
|
if (ioctl(wwi->ossdev->fd, SNDCTL_DSP_SETTRIGGER, &enable) < 0)
|
2003-03-15 01:54:11 +01:00
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_SETTRIGGER) failed (%s)\n", wwi->ossdev->dev_name, strerror(errno));
|
2003-03-07 21:37:25 +01:00
|
|
|
|
2001-01-02 21:32:33 +01:00
|
|
|
/* the soundblaster live needs a micro wake to get its recording started
|
|
|
|
* (or GETISPACE will have 0 frags all the time)
|
|
|
|
*/
|
2002-10-07 20:23:40 +02:00
|
|
|
read(wwi->ossdev->fd, &xs, 4);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2003-03-04 03:11:21 +01:00
|
|
|
/* make sleep time to be # of ms to output a fragment */
|
2000-06-24 19:54:43 +02:00
|
|
|
dwSleepTime = (wwi->dwFragmentSize * 1000) / wwi->format.wf.nAvgBytesPerSec;
|
2000-11-25 03:10:53 +01:00
|
|
|
TRACE("sleeptime=%ld ms\n", dwSleepTime);
|
2000-06-24 19:54:43 +02:00
|
|
|
|
2001-11-12 16:55:37 +01:00
|
|
|
for (;;) {
|
2000-06-24 19:54:43 +02:00
|
|
|
/* wait for dwSleepTime or an event in thread's queue */
|
|
|
|
/* FIXME: could improve wait time depending on queue state,
|
|
|
|
* ie, number of queued fragments
|
|
|
|
*/
|
|
|
|
|
2002-06-01 01:06:46 +02:00
|
|
|
if (wwi->lpQueuePtr != NULL && wwi->state == WINE_WS_PLAYING)
|
2000-11-25 03:10:53 +01:00
|
|
|
{
|
|
|
|
lpWaveHdr = wwi->lpQueuePtr;
|
|
|
|
|
2002-10-07 20:23:40 +02:00
|
|
|
ioctl(wwi->ossdev->fd, SNDCTL_DSP_GETISPACE, &info);
|
2000-11-25 03:10:53 +01:00
|
|
|
TRACE("info={frag=%d fsize=%d ftotal=%d bytes=%d}\n", info.fragments, info.fragsize, info.fragstotal, info.bytes);
|
|
|
|
|
|
|
|
/* read all the fragments accumulated so far */
|
|
|
|
while ((info.fragments > 0) && (wwi->lpQueuePtr))
|
|
|
|
{
|
|
|
|
info.fragments --;
|
|
|
|
|
2001-01-18 21:29:41 +01:00
|
|
|
if (lpWaveHdr->dwBufferLength - lpWaveHdr->dwBytesRecorded >= wwi->dwFragmentSize)
|
2000-11-25 03:10:53 +01:00
|
|
|
{
|
|
|
|
/* directly read fragment in wavehdr */
|
2002-10-07 20:23:40 +02:00
|
|
|
bytesRead = read(wwi->ossdev->fd,
|
2002-06-01 01:06:46 +02:00
|
|
|
lpWaveHdr->lpData + lpWaveHdr->dwBytesRecorded,
|
2000-11-25 03:10:53 +01:00
|
|
|
wwi->dwFragmentSize);
|
2000-10-24 04:20:01 +02:00
|
|
|
|
2000-11-25 03:10:53 +01:00
|
|
|
TRACE("bytesRead=%ld (direct)\n", bytesRead);
|
2000-10-24 04:20:01 +02:00
|
|
|
if (bytesRead != (DWORD) -1)
|
|
|
|
{
|
2000-11-25 03:10:53 +01:00
|
|
|
/* update number of bytes recorded in current buffer and by this device */
|
|
|
|
lpWaveHdr->dwBytesRecorded += bytesRead;
|
2004-03-12 20:43:44 +01:00
|
|
|
wwi->dwTotalRead += bytesRead;
|
|
|
|
wwi->dwTotalRecorded = wwi->dwTotalRead;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2000-11-25 03:10:53 +01:00
|
|
|
/* buffer is full. notify client */
|
2002-06-01 01:06:46 +02:00
|
|
|
if (lpWaveHdr->dwBytesRecorded == lpWaveHdr->dwBufferLength)
|
2000-11-25 03:10:53 +01:00
|
|
|
{
|
2001-04-14 00:26:51 +02:00
|
|
|
/* must copy the value of next waveHdr, because we have no idea of what
|
|
|
|
* will be done with the content of lpWaveHdr in callback
|
|
|
|
*/
|
|
|
|
LPWAVEHDR lpNext = lpWaveHdr->lpNext;
|
|
|
|
|
2000-11-25 03:10:53 +01:00
|
|
|
lpWaveHdr->dwFlags &= ~WHDR_INQUEUE;
|
|
|
|
lpWaveHdr->dwFlags |= WHDR_DONE;
|
|
|
|
|
2003-11-14 22:03:24 +01:00
|
|
|
wwi->lpQueuePtr = lpNext;
|
2001-12-14 23:44:29 +01:00
|
|
|
widNotifyClient(wwi, WIM_DATA, (DWORD)lpWaveHdr, 0);
|
2003-11-14 22:03:24 +01:00
|
|
|
lpWaveHdr = lpNext;
|
2000-11-25 03:10:53 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2000-10-24 04:20:01 +02:00
|
|
|
{
|
2000-11-25 03:10:53 +01:00
|
|
|
/* read the fragment in a local buffer */
|
2002-10-07 20:23:40 +02:00
|
|
|
bytesRead = read(wwi->ossdev->fd, buffer, wwi->dwFragmentSize);
|
2000-11-25 03:10:53 +01:00
|
|
|
pOffset = buffer;
|
|
|
|
|
|
|
|
TRACE("bytesRead=%ld (local)\n", bytesRead);
|
|
|
|
|
2002-06-01 01:06:46 +02:00
|
|
|
/* copy data in client buffers */
|
2000-11-25 03:10:53 +01:00
|
|
|
while (bytesRead != (DWORD) -1 && bytesRead > 0)
|
|
|
|
{
|
|
|
|
DWORD dwToCopy = min (bytesRead, lpWaveHdr->dwBufferLength - lpWaveHdr->dwBytesRecorded);
|
|
|
|
|
|
|
|
memcpy(lpWaveHdr->lpData + lpWaveHdr->dwBytesRecorded,
|
|
|
|
pOffset,
|
|
|
|
dwToCopy);
|
|
|
|
|
|
|
|
/* update number of bytes recorded in current buffer and by this device */
|
|
|
|
lpWaveHdr->dwBytesRecorded += dwToCopy;
|
2004-03-12 20:43:44 +01:00
|
|
|
wwi->dwTotalRead += dwToCopy;
|
|
|
|
wwi->dwTotalRecorded = wwi->dwTotalRead;
|
2000-11-25 03:10:53 +01:00
|
|
|
bytesRead -= dwToCopy;
|
|
|
|
pOffset += dwToCopy;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2000-11-25 03:10:53 +01:00
|
|
|
/* client buffer is full. notify client */
|
2002-06-01 01:06:46 +02:00
|
|
|
if (lpWaveHdr->dwBytesRecorded == lpWaveHdr->dwBufferLength)
|
2000-11-25 03:10:53 +01:00
|
|
|
{
|
2001-04-14 00:26:51 +02:00
|
|
|
/* must copy the value of next waveHdr, because we have no idea of what
|
|
|
|
* will be done with the content of lpWaveHdr in callback
|
|
|
|
*/
|
|
|
|
LPWAVEHDR lpNext = lpWaveHdr->lpNext;
|
|
|
|
TRACE("lpNext=%p\n", lpNext);
|
|
|
|
|
2000-11-25 03:10:53 +01:00
|
|
|
lpWaveHdr->dwFlags &= ~WHDR_INQUEUE;
|
|
|
|
lpWaveHdr->dwFlags |= WHDR_DONE;
|
|
|
|
|
2003-11-11 01:25:50 +01:00
|
|
|
wwi->lpQueuePtr = lpNext;
|
2001-12-14 23:44:29 +01:00
|
|
|
widNotifyClient(wwi, WIM_DATA, (DWORD)lpWaveHdr, 0);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2003-11-11 01:25:50 +01:00
|
|
|
lpWaveHdr = lpNext;
|
2001-04-14 00:26:51 +02:00
|
|
|
if (!lpNext && bytesRead) {
|
2003-03-04 03:11:21 +01:00
|
|
|
/* before we give up, check for more header messages */
|
|
|
|
while (OSS_PeekRingMessage(&wwi->msgRing, &msg, ¶m, &ev))
|
|
|
|
{
|
|
|
|
if (msg == WINE_WM_HEADER) {
|
|
|
|
LPWAVEHDR hdr;
|
|
|
|
OSS_RetrieveRingMessage(&wwi->msgRing, &msg, ¶m, &ev);
|
|
|
|
hdr = ((LPWAVEHDR)param);
|
|
|
|
TRACE("msg = %s, hdr = %p, ev = %p\n", wodPlayerCmdString[msg - WM_USER - 1], hdr, ev);
|
|
|
|
hdr->lpNext = 0;
|
|
|
|
if (lpWaveHdr == 0) {
|
|
|
|
/* new head of queue */
|
|
|
|
wwi->lpQueuePtr = lpWaveHdr = hdr;
|
|
|
|
} else {
|
|
|
|
/* insert buffer at the end of queue */
|
|
|
|
LPWAVEHDR* wh;
|
|
|
|
for (wh = &(wwi->lpQueuePtr); *wh; wh = &((*wh)->lpNext));
|
|
|
|
*wh = hdr;
|
|
|
|
}
|
|
|
|
} else
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (lpWaveHdr == 0) {
|
|
|
|
/* no more buffer to copy data to, but we did read more.
|
|
|
|
* what hasn't been copied will be dropped
|
|
|
|
*/
|
|
|
|
WARN("buffer under run! %lu bytes dropped.\n", bytesRead);
|
|
|
|
wwi->lpQueuePtr = NULL;
|
|
|
|
break;
|
|
|
|
}
|
2000-11-25 03:10:53 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2000-06-24 19:54:43 +02:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2002-08-26 23:49:42 +02:00
|
|
|
WAIT_OMR(&wwi->msgRing, dwSleepTime);
|
2000-06-24 19:54:43 +02:00
|
|
|
|
2001-11-12 16:55:37 +01:00
|
|
|
while (OSS_RetrieveRingMessage(&wwi->msgRing, &msg, ¶m, &ev))
|
|
|
|
{
|
2003-03-07 21:37:25 +01:00
|
|
|
TRACE("msg=%s param=0x%lx\n", wodPlayerCmdString[msg - WM_USER - 1], param);
|
2001-11-12 16:55:37 +01:00
|
|
|
switch (msg) {
|
2000-06-24 19:54:43 +02:00
|
|
|
case WINE_WM_PAUSING:
|
|
|
|
wwi->state = WINE_WS_PAUSED;
|
2001-05-09 19:31:31 +02:00
|
|
|
/*FIXME("Device should stop recording\n");*/
|
2001-11-12 16:55:37 +01:00
|
|
|
SetEvent(ev);
|
2000-06-24 19:54:43 +02:00
|
|
|
break;
|
2003-03-07 21:37:25 +01:00
|
|
|
case WINE_WM_STARTING:
|
2000-06-24 19:54:43 +02:00
|
|
|
wwi->state = WINE_WS_PLAYING;
|
2000-11-25 03:10:53 +01:00
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wwi->ossdev->bTriggerSupport)
|
2000-11-25 03:10:53 +01:00
|
|
|
{
|
|
|
|
/* start the recording */
|
2003-03-07 21:37:25 +01:00
|
|
|
wwi->ossdev->bInputEnabled = TRUE;
|
|
|
|
enable = getEnables(wwi->ossdev);
|
|
|
|
if (ioctl(wwi->ossdev->fd, SNDCTL_DSP_SETTRIGGER, &enable) < 0) {
|
|
|
|
wwi->ossdev->bInputEnabled = FALSE;
|
2003-03-15 01:54:11 +01:00
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_SETTRIGGER) failed (%s)\n", wwi->ossdev->dev_name, strerror(errno));
|
2003-03-07 21:37:25 +01:00
|
|
|
}
|
2000-11-25 03:10:53 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
unsigned char data[4];
|
|
|
|
/* read 4 bytes to start the recording */
|
2002-10-07 20:23:40 +02:00
|
|
|
read(wwi->ossdev->fd, data, 4);
|
2000-11-25 03:10:53 +01:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2001-11-12 16:55:37 +01:00
|
|
|
SetEvent(ev);
|
2000-06-24 19:54:43 +02:00
|
|
|
break;
|
|
|
|
case WINE_WM_HEADER:
|
2001-11-12 16:55:37 +01:00
|
|
|
lpWaveHdr = (LPWAVEHDR)param;
|
2000-06-24 19:54:43 +02:00
|
|
|
lpWaveHdr->lpNext = 0;
|
|
|
|
|
|
|
|
/* insert buffer at the end of queue */
|
|
|
|
{
|
|
|
|
LPWAVEHDR* wh;
|
|
|
|
for (wh = &(wwi->lpQueuePtr); *wh; wh = &((*wh)->lpNext));
|
|
|
|
*wh = lpWaveHdr;
|
|
|
|
}
|
|
|
|
break;
|
2003-03-07 21:37:25 +01:00
|
|
|
case WINE_WM_STOPPING:
|
2003-11-04 05:20:47 +01:00
|
|
|
if (wwi->state != WINE_WS_STOPPED)
|
|
|
|
{
|
|
|
|
if (wwi->ossdev->bTriggerSupport)
|
|
|
|
{
|
|
|
|
/* stop the recording */
|
|
|
|
wwi->ossdev->bInputEnabled = FALSE;
|
|
|
|
enable = getEnables(wwi->ossdev);
|
|
|
|
if (ioctl(wwi->ossdev->fd, SNDCTL_DSP_SETTRIGGER, &enable) < 0) {
|
|
|
|
wwi->ossdev->bInputEnabled = FALSE;
|
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_SETTRIGGER) failed (%s)\n", wwi->ossdev->dev_name, strerror(errno));
|
|
|
|
}
|
|
|
|
}
|
2003-11-14 22:03:24 +01:00
|
|
|
|
|
|
|
/* read any headers in queue */
|
|
|
|
widRecorder_ReadHeaders(wwi);
|
|
|
|
|
2003-11-04 05:20:47 +01:00
|
|
|
/* return current buffer to app */
|
|
|
|
lpWaveHdr = wwi->lpQueuePtr;
|
|
|
|
if (lpWaveHdr)
|
|
|
|
{
|
|
|
|
LPWAVEHDR lpNext = lpWaveHdr->lpNext;
|
|
|
|
TRACE("stop %p %p\n", lpWaveHdr, lpWaveHdr->lpNext);
|
|
|
|
lpWaveHdr->dwFlags &= ~WHDR_INQUEUE;
|
|
|
|
lpWaveHdr->dwFlags |= WHDR_DONE;
|
|
|
|
wwi->lpQueuePtr = lpNext;
|
2003-11-14 22:03:24 +01:00
|
|
|
widNotifyClient(wwi, WIM_DATA, (DWORD)lpWaveHdr, 0);
|
2003-11-04 05:20:47 +01:00
|
|
|
}
|
|
|
|
}
|
2003-11-06 00:22:23 +01:00
|
|
|
wwi->state = WINE_WS_STOPPED;
|
2003-11-04 05:20:47 +01:00
|
|
|
SetEvent(ev);
|
|
|
|
break;
|
2000-06-24 19:54:43 +02:00
|
|
|
case WINE_WM_RESETTING:
|
2003-11-14 22:03:24 +01:00
|
|
|
if (wwi->state != WINE_WS_STOPPED)
|
|
|
|
{
|
|
|
|
if (wwi->ossdev->bTriggerSupport)
|
|
|
|
{
|
|
|
|
/* stop the recording */
|
|
|
|
wwi->ossdev->bInputEnabled = FALSE;
|
|
|
|
enable = getEnables(wwi->ossdev);
|
|
|
|
if (ioctl(wwi->ossdev->fd, SNDCTL_DSP_SETTRIGGER, &enable) < 0) {
|
|
|
|
wwi->ossdev->bInputEnabled = FALSE;
|
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_SETTRIGGER) failed (%s)\n", wwi->ossdev->dev_name, strerror(errno));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2000-06-24 19:54:43 +02:00
|
|
|
wwi->state = WINE_WS_STOPPED;
|
2003-10-09 21:45:39 +02:00
|
|
|
wwi->dwTotalRecorded = 0;
|
2004-03-12 20:43:44 +01:00
|
|
|
wwi->dwTotalRead = 0;
|
2003-11-14 22:03:24 +01:00
|
|
|
|
|
|
|
/* read any headers in queue */
|
|
|
|
widRecorder_ReadHeaders(wwi);
|
|
|
|
|
2000-06-24 19:54:43 +02:00
|
|
|
/* return all buffers to the app */
|
|
|
|
for (lpWaveHdr = wwi->lpQueuePtr; lpWaveHdr; lpWaveHdr = lpWaveHdr->lpNext) {
|
|
|
|
TRACE("reset %p %p\n", lpWaveHdr, lpWaveHdr->lpNext);
|
|
|
|
lpWaveHdr->dwFlags &= ~WHDR_INQUEUE;
|
|
|
|
lpWaveHdr->dwFlags |= WHDR_DONE;
|
2003-11-14 22:03:24 +01:00
|
|
|
wwi->lpQueuePtr = lpWaveHdr->lpNext;
|
2001-12-14 23:44:29 +01:00
|
|
|
widNotifyClient(wwi, WIM_DATA, (DWORD)lpWaveHdr, 0);
|
2000-06-24 19:54:43 +02:00
|
|
|
}
|
2003-11-14 22:03:24 +01:00
|
|
|
|
2000-06-24 19:54:43 +02:00
|
|
|
wwi->lpQueuePtr = NULL;
|
2001-11-12 16:55:37 +01:00
|
|
|
SetEvent(ev);
|
2000-06-24 19:54:43 +02:00
|
|
|
break;
|
2004-03-12 20:43:44 +01:00
|
|
|
case WINE_WM_UPDATE:
|
|
|
|
if (wwi->state == WINE_WS_PLAYING) {
|
|
|
|
audio_buf_info tmp_info;
|
|
|
|
if (ioctl(wwi->ossdev->fd, SNDCTL_DSP_GETISPACE, &tmp_info) < 0)
|
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_GETISPACE) failed (%s)\n", wwi->ossdev->dev_name, strerror(errno));
|
|
|
|
else
|
|
|
|
wwi->dwTotalRecorded = wwi->dwTotalRead + tmp_info.bytes;
|
|
|
|
}
|
|
|
|
SetEvent(ev);
|
|
|
|
break;
|
2000-06-24 19:54:43 +02:00
|
|
|
case WINE_WM_CLOSING:
|
|
|
|
wwi->hThread = 0;
|
|
|
|
wwi->state = WINE_WS_CLOSED;
|
2001-11-12 16:55:37 +01:00
|
|
|
SetEvent(ev);
|
2002-06-01 01:06:46 +02:00
|
|
|
HeapFree(GetProcessHeap(), 0, buffer);
|
2000-06-24 19:54:43 +02:00
|
|
|
ExitThread(0);
|
|
|
|
/* shouldn't go here */
|
|
|
|
default:
|
2001-11-12 16:55:37 +01:00
|
|
|
FIXME("unknown message %d\n", msg);
|
2000-06-24 19:54:43 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ExitThread(0);
|
|
|
|
/* just for not generating compilation warnings... should never be executed */
|
2002-06-01 01:06:46 +02:00
|
|
|
return 0;
|
2000-06-24 19:54:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
Release 940420
Wed Apr 20 14:53:35 1994 Bob Amstadt (bob@pooh)
* [tools/build.c] [if1632/call.S] [if1632/Imakefile]
Fixed bug for non-Linux systems.
Apr 18, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [windows/win.c]
Bug fixed in CreateWindowEx() : Now use SetMenu() for menubar setup.
New empty stub for function SetSysModalWindow().
* [misc/exec.c]
New empty stub for function ExitWindows().
* [objects/font.c]
New empty stub for function EnumFonts().
* New file [misc/property.c]
New functions RemoveProp(), GetProp(), SetProp() & EnumProps().
* New file [misc/shell.c]
New empty stubs for function RegisterShellProc(),
ShellExecute() & ShellProc().
* New files [loader/task.c] & [include/task.h]
Move functions GetWindowTask(), GetNumTask(), EnumTaskWindows()
from 'loader/library.c'.
* [if1632/user.c] [if1632/kernel.c]
Put Atoms functions entries.
* [controls/combo.c]
New functions DirDlgSelectComboBox() & DirDlgListComboBox().
* [controls/listbox.c]
New functions DirDlgSelect() & DirDlgList().
Sun Apr 17 20:57:59 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [objects/test.c]
GrayString() added.
* [if1632/callback.c]
CallGrayStringProc() added.
* [if1632/relay.c] [if1632/mmsystem.spec]
Added.
* [if1632/kernel.spec] [if1632/user.spec]
Added forgotten specs for atom functions.
Tue Apr 12 00:05:31 1994 Bob Amstadt (bob@pooh)
* misc/spy.c (SpyInit): Added more message types
* [windows/mdi.c] [include/mdi.h]
Maximizing and restoring child windows.
Tiling of child windows.
Mon Apr 11 20:48:28 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
* [windows/winpos.c]
Revert focus and activation to previous window when hiding a window.
* [windows/syscolor.c]
Implemented system color objects (brushes and pens created at
SetSysColor() time for better performance).
* [windows/graphics.c] [windows/nonclient.c] [controls/button.c]
Changed painting code to use system color objects.
* [windows/message.c]
New function MSG_InternalGetMessage() for internal messages
loops (e.g. for dialogs or menus).
* [windows/hook.c] [include/hook.h] (New files)
Beginning of the window hooks implementation.
* [windows/dialog.c]
Use new function MSG_InternalGetMessage() in DialogBox().
* [if1632/callback.c]
Added function CallHookProc().
Apr 11, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [windows/event.c]
Bug fix : WM_CHARs are sent to focused window like WM_KEY???.
* [misc/exec.c]
Nothing much more than a stub for LoadModule(), I saw there a lot
to be done in that corner, I will come back later ...
* [loader/library.c]
New functions GetWindowTask(), GetNumTask(), EnumTaskWindows()
and associated modules & tasks linked-lists.
(it's only an 'emerging bud', more to come next weeks).
* [loader/wine.c]
Use LoadLibrary() instead of LoadImage() for 'sysres.dll'.
* [control/menu.c]
You can now click outside menu region without problem.
Keyboard navig more smootly, even if a child has the focus.
Bug fix in InsertItem(), (bad linklist when insert point not found).
change Realloc for Free & Alloc in ModifyItem().
MF_STRING now set BLACK_PEN to fix bug of bad color of the underscores
done by DrawText(), (maybe it should done in DrawText() itself ?).
Sun Apr 10 14:06:08 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/profile.c]
.INI files will now be stored in / loaded from the windows dir
if no path is supplied.
* [if1632/kernel.spec]
Fixed GetDriveType's prototype.
* [if1632/winsock.spec] [include/winsock.h] [misc/winsocket.c]
Fixed prototypes: winsock uses a word as socket handle not an int.
* [misc/winsocket.c]
Added heap allocation for returned structures.
Added non-blocking WSAAsyncGetXbyY() functions as blocking ones.
* [loader/wine.c]
Added IsDLLLoaded(), used in LoadImage() to prevent loading
a dll multiple times.
Directory is added to wine's path when a fullpath is supplied when
starting wine.
LoadImage(): DLL filename used instead DLL's own internal name,
fixes 'Bad DLL name' errors.
Sat Apr 9 08:26:03 1994 David Metcalfe <david@prism.demon.co.uk>
* [controls/edit.c] [controls/widgets.c]
First release of edit control.
1994-04-21 03:20:00 +02:00
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* widOpen [internal]
|
|
|
|
*/
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
2000-06-24 19:54:43 +02:00
|
|
|
WINE_WAVEIN* wwi;
|
2002-06-28 19:31:31 +02:00
|
|
|
int fragment_size;
|
|
|
|
int audio_fragment;
|
|
|
|
DWORD ret;
|
2000-06-24 19:54:43 +02:00
|
|
|
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u, %p, %08lX);\n", wDevID, lpDesc, dwFlags);
|
1998-10-11 16:14:24 +02:00
|
|
|
if (lpDesc == NULL) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("Invalid Parameter !\n");
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_INVALPARAM;
|
|
|
|
}
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numInDev) return MMSYSERR_BADDEVICEID;
|
1999-09-22 18:45:33 +02:00
|
|
|
|
|
|
|
/* only PCM format is supported so far... */
|
|
|
|
if (lpDesc->lpFormat->wFormatTag != WAVE_FORMAT_PCM ||
|
|
|
|
lpDesc->lpFormat->nChannels == 0 ||
|
|
|
|
lpDesc->lpFormat->nSamplesPerSec == 0) {
|
2002-06-01 01:06:46 +02:00
|
|
|
WARN("Bad format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n",
|
1999-09-22 18:45:33 +02:00
|
|
|
lpDesc->lpFormat->wFormatTag, lpDesc->lpFormat->nChannels,
|
|
|
|
lpDesc->lpFormat->nSamplesPerSec);
|
|
|
|
return WAVERR_BADFORMAT;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (dwFlags & WAVE_FORMAT_QUERY) {
|
2002-06-01 01:06:46 +02:00
|
|
|
TRACE("Query format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n",
|
1999-09-22 18:45:33 +02:00
|
|
|
lpDesc->lpFormat->wFormatTag, lpDesc->lpFormat->nChannels,
|
|
|
|
lpDesc->lpFormat->nSamplesPerSec);
|
|
|
|
return MMSYSERR_NOERROR;
|
|
|
|
}
|
|
|
|
|
2000-08-25 23:33:45 +02:00
|
|
|
wwi = &WInDev[wDevID];
|
2002-06-28 19:31:31 +02:00
|
|
|
|
2002-10-07 20:23:40 +02:00
|
|
|
if (wwi->state != WINE_WS_CLOSED) return MMSYSERR_ALLOCATED;
|
2003-02-15 00:59:15 +01:00
|
|
|
|
|
|
|
if ((dwFlags & WAVE_DIRECTSOUND) &&
|
|
|
|
!(wwi->ossdev->in_caps_support & WAVECAPS_DIRECTSOUND))
|
|
|
|
/* not supported, ignore it */
|
|
|
|
dwFlags &= ~WAVE_DIRECTSOUND;
|
|
|
|
|
|
|
|
if (dwFlags & WAVE_DIRECTSOUND) {
|
2003-03-04 03:11:21 +01:00
|
|
|
TRACE("has DirectSoundCapture driver\n");
|
2003-02-15 00:59:15 +01:00
|
|
|
if (wwi->ossdev->in_caps_support & WAVECAPS_SAMPLEACCURATE)
|
|
|
|
/* we have realtime DirectSound, fragments just waste our time,
|
|
|
|
* but a large buffer is good, so choose 64KB (32 * 2^11) */
|
|
|
|
audio_fragment = 0x0020000B;
|
|
|
|
else
|
|
|
|
/* to approximate realtime, we must use small fragments,
|
|
|
|
* let's try to fragment the above 64KB (256 * 2^8) */
|
|
|
|
audio_fragment = 0x01000008;
|
|
|
|
} else {
|
2003-03-04 03:11:21 +01:00
|
|
|
TRACE("doesn't have DirectSoundCapture driver\n");
|
2003-09-27 04:20:19 +02:00
|
|
|
if (wwi->ossdev->open_count > 0) {
|
|
|
|
TRACE("Using output device audio_fragment\n");
|
|
|
|
/* FIXME: This may not be optimal for capture but it allows us
|
|
|
|
* to do hardware playback without hardware capture. */
|
|
|
|
audio_fragment = wwi->ossdev->audio_fragment;
|
|
|
|
} else {
|
2003-11-04 05:20:47 +01:00
|
|
|
/* A wave device must have a worst case latency of 10 ms so calculate
|
|
|
|
* the largest fragment size less than 10 ms long.
|
|
|
|
*/
|
|
|
|
int fsize = lpDesc->lpFormat->nAvgBytesPerSec / 100; /* 10 ms chunk */
|
|
|
|
int shift = 0;
|
|
|
|
while ((1 << shift) <= fsize)
|
|
|
|
shift++;
|
|
|
|
shift--;
|
|
|
|
audio_fragment = 0x00100000 + shift; /* 16 fragments of 2^shift */
|
2003-09-27 04:20:19 +02:00
|
|
|
}
|
2003-02-15 00:59:15 +01:00
|
|
|
}
|
|
|
|
|
2003-11-04 05:20:47 +01:00
|
|
|
TRACE("using %d %d byte fragments (%ld ms)\n", audio_fragment >> 16,
|
|
|
|
1 << (audio_fragment & 0xffff),
|
|
|
|
((1 << (audio_fragment & 0xffff)) * 1000) / lpDesc->lpFormat->nAvgBytesPerSec);
|
2003-02-15 00:59:15 +01:00
|
|
|
|
2002-10-07 20:23:40 +02:00
|
|
|
ret = OSS_OpenDevice(wwi->ossdev, O_RDONLY, &audio_fragment,
|
2003-01-08 00:08:05 +01:00
|
|
|
1,
|
2002-06-28 19:31:31 +02:00
|
|
|
lpDesc->lpFormat->nSamplesPerSec,
|
2002-08-09 03:02:25 +02:00
|
|
|
(lpDesc->lpFormat->nChannels > 1) ? 1 : 0,
|
|
|
|
(lpDesc->lpFormat->wBitsPerSample == 16)
|
2002-06-28 19:31:31 +02:00
|
|
|
? AFMT_S16_LE : AFMT_U8);
|
|
|
|
if (ret != 0) return ret;
|
2002-10-07 20:23:40 +02:00
|
|
|
wwi->state = WINE_WS_STOPPED;
|
|
|
|
|
2000-06-24 19:54:43 +02:00
|
|
|
if (wwi->lpQueuePtr) {
|
|
|
|
WARN("Should have an empty queue (%p)\n", wwi->lpQueuePtr);
|
|
|
|
wwi->lpQueuePtr = NULL;
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
2000-06-24 19:54:43 +02:00
|
|
|
wwi->dwTotalRecorded = 0;
|
2004-03-12 20:43:44 +01:00
|
|
|
wwi->dwTotalRead = 0;
|
2000-08-25 23:33:45 +02:00
|
|
|
wwi->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK);
|
|
|
|
|
|
|
|
memcpy(&wwi->waveDesc, lpDesc, sizeof(WAVEOPENDESC));
|
|
|
|
memcpy(&wwi->format, lpDesc->lpFormat, sizeof(PCMWAVEFORMAT));
|
1999-09-22 18:45:33 +02:00
|
|
|
|
2000-06-24 19:54:43 +02:00
|
|
|
if (wwi->format.wBitsPerSample == 0) {
|
2000-08-25 23:33:45 +02:00
|
|
|
WARN("Resetting zeroed wBitsPerSample\n");
|
2000-06-24 19:54:43 +02:00
|
|
|
wwi->format.wBitsPerSample = 8 *
|
|
|
|
(wwi->format.wf.nAvgBytesPerSec /
|
|
|
|
wwi->format.wf.nSamplesPerSec) /
|
|
|
|
wwi->format.wf.nChannels;
|
|
|
|
}
|
2000-08-25 23:33:45 +02:00
|
|
|
|
2002-10-07 20:23:40 +02:00
|
|
|
ioctl(wwi->ossdev->fd, SNDCTL_DSP_GETBLKSIZE, &fragment_size);
|
2000-08-25 23:33:45 +02:00
|
|
|
if (fragment_size == -1) {
|
2003-09-27 04:20:19 +02:00
|
|
|
WARN("ioctl(%s, SNDCTL_DSP_GETBLKSIZE) failed (%s)\n",
|
|
|
|
wwi->ossdev->dev_name, strerror(errno));
|
2002-10-07 20:23:40 +02:00
|
|
|
OSS_CloseDevice(wwi->ossdev);
|
|
|
|
wwi->state = WINE_WS_CLOSED;
|
2000-08-25 23:33:45 +02:00
|
|
|
return MMSYSERR_NOTENABLED;
|
|
|
|
}
|
|
|
|
wwi->dwFragmentSize = fragment_size;
|
|
|
|
|
2003-11-14 22:03:24 +01:00
|
|
|
TRACE("dwFragmentSize=%lu\n", wwi->dwFragmentSize);
|
2002-06-01 01:06:46 +02:00
|
|
|
TRACE("wBitsPerSample=%u, nAvgBytesPerSec=%lu, nSamplesPerSec=%lu, nChannels=%u nBlockAlign=%u!\n",
|
|
|
|
wwi->format.wBitsPerSample, wwi->format.wf.nAvgBytesPerSec,
|
2000-08-25 23:33:45 +02:00
|
|
|
wwi->format.wf.nSamplesPerSec, wwi->format.wf.nChannels,
|
|
|
|
wwi->format.wf.nBlockAlign);
|
2000-06-24 19:54:43 +02:00
|
|
|
|
2001-12-21 21:28:43 +01:00
|
|
|
OSS_InitRingMessage(&wwi->msgRing);
|
|
|
|
|
2001-11-12 16:55:37 +01:00
|
|
|
wwi->hStartUpEvent = CreateEventA(NULL, FALSE, FALSE, NULL);
|
2000-06-24 19:54:43 +02:00
|
|
|
wwi->hThread = CreateThread(NULL, 0, widRecorder, (LPVOID)(DWORD)wDevID, 0, &(wwi->dwThreadID));
|
2001-11-12 16:55:37 +01:00
|
|
|
WaitForSingleObject(wwi->hStartUpEvent, INFINITE);
|
|
|
|
CloseHandle(wwi->hStartUpEvent);
|
|
|
|
wwi->hStartUpEvent = INVALID_HANDLE_VALUE;
|
2000-06-24 19:54:43 +02:00
|
|
|
|
2001-12-14 23:44:29 +01:00
|
|
|
return widNotifyClient(wwi, WIM_OPEN, 0L, 0L);
|
1994-07-07 18:23:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* widClose [internal]
|
|
|
|
*/
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
static DWORD widClose(WORD wDevID)
|
Release 940420
Wed Apr 20 14:53:35 1994 Bob Amstadt (bob@pooh)
* [tools/build.c] [if1632/call.S] [if1632/Imakefile]
Fixed bug for non-Linux systems.
Apr 18, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [windows/win.c]
Bug fixed in CreateWindowEx() : Now use SetMenu() for menubar setup.
New empty stub for function SetSysModalWindow().
* [misc/exec.c]
New empty stub for function ExitWindows().
* [objects/font.c]
New empty stub for function EnumFonts().
* New file [misc/property.c]
New functions RemoveProp(), GetProp(), SetProp() & EnumProps().
* New file [misc/shell.c]
New empty stubs for function RegisterShellProc(),
ShellExecute() & ShellProc().
* New files [loader/task.c] & [include/task.h]
Move functions GetWindowTask(), GetNumTask(), EnumTaskWindows()
from 'loader/library.c'.
* [if1632/user.c] [if1632/kernel.c]
Put Atoms functions entries.
* [controls/combo.c]
New functions DirDlgSelectComboBox() & DirDlgListComboBox().
* [controls/listbox.c]
New functions DirDlgSelect() & DirDlgList().
Sun Apr 17 20:57:59 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [objects/test.c]
GrayString() added.
* [if1632/callback.c]
CallGrayStringProc() added.
* [if1632/relay.c] [if1632/mmsystem.spec]
Added.
* [if1632/kernel.spec] [if1632/user.spec]
Added forgotten specs for atom functions.
Tue Apr 12 00:05:31 1994 Bob Amstadt (bob@pooh)
* misc/spy.c (SpyInit): Added more message types
* [windows/mdi.c] [include/mdi.h]
Maximizing and restoring child windows.
Tiling of child windows.
Mon Apr 11 20:48:28 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
* [windows/winpos.c]
Revert focus and activation to previous window when hiding a window.
* [windows/syscolor.c]
Implemented system color objects (brushes and pens created at
SetSysColor() time for better performance).
* [windows/graphics.c] [windows/nonclient.c] [controls/button.c]
Changed painting code to use system color objects.
* [windows/message.c]
New function MSG_InternalGetMessage() for internal messages
loops (e.g. for dialogs or menus).
* [windows/hook.c] [include/hook.h] (New files)
Beginning of the window hooks implementation.
* [windows/dialog.c]
Use new function MSG_InternalGetMessage() in DialogBox().
* [if1632/callback.c]
Added function CallHookProc().
Apr 11, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [windows/event.c]
Bug fix : WM_CHARs are sent to focused window like WM_KEY???.
* [misc/exec.c]
Nothing much more than a stub for LoadModule(), I saw there a lot
to be done in that corner, I will come back later ...
* [loader/library.c]
New functions GetWindowTask(), GetNumTask(), EnumTaskWindows()
and associated modules & tasks linked-lists.
(it's only an 'emerging bud', more to come next weeks).
* [loader/wine.c]
Use LoadLibrary() instead of LoadImage() for 'sysres.dll'.
* [control/menu.c]
You can now click outside menu region without problem.
Keyboard navig more smootly, even if a child has the focus.
Bug fix in InsertItem(), (bad linklist when insert point not found).
change Realloc for Free & Alloc in ModifyItem().
MF_STRING now set BLACK_PEN to fix bug of bad color of the underscores
done by DrawText(), (maybe it should done in DrawText() itself ?).
Sun Apr 10 14:06:08 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/profile.c]
.INI files will now be stored in / loaded from the windows dir
if no path is supplied.
* [if1632/kernel.spec]
Fixed GetDriveType's prototype.
* [if1632/winsock.spec] [include/winsock.h] [misc/winsocket.c]
Fixed prototypes: winsock uses a word as socket handle not an int.
* [misc/winsocket.c]
Added heap allocation for returned structures.
Added non-blocking WSAAsyncGetXbyY() functions as blocking ones.
* [loader/wine.c]
Added IsDLLLoaded(), used in LoadImage() to prevent loading
a dll multiple times.
Directory is added to wine's path when a fullpath is supplied when
starting wine.
LoadImage(): DLL filename used instead DLL's own internal name,
fixes 'Bad DLL name' errors.
Sat Apr 9 08:26:03 1994 David Metcalfe <david@prism.demon.co.uk>
* [controls/edit.c] [controls/widgets.c]
First release of edit control.
1994-04-21 03:20:00 +02:00
|
|
|
{
|
2000-06-24 19:54:43 +02:00
|
|
|
WINE_WAVEIN* wwi;
|
|
|
|
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u);\n", wDevID);
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numInDev || WInDev[wDevID].state == WINE_WS_CLOSED) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("can't close !\n");
|
2000-06-24 19:54:43 +02:00
|
|
|
return MMSYSERR_INVALHANDLE;
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
2000-06-24 19:54:43 +02:00
|
|
|
|
|
|
|
wwi = &WInDev[wDevID];
|
|
|
|
|
|
|
|
if (wwi->lpQueuePtr != NULL) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("still buffers open !\n");
|
1998-10-11 16:14:24 +02:00
|
|
|
return WAVERR_STILLPLAYING;
|
|
|
|
}
|
2000-06-24 19:54:43 +02:00
|
|
|
|
2001-11-12 16:55:37 +01:00
|
|
|
OSS_AddRingMessage(&wwi->msgRing, WINE_WM_CLOSING, 0, TRUE);
|
2002-10-07 20:23:40 +02:00
|
|
|
OSS_CloseDevice(wwi->ossdev);
|
|
|
|
wwi->state = WINE_WS_CLOSED;
|
2000-06-24 19:54:43 +02:00
|
|
|
wwi->dwFragmentSize = 0;
|
2001-12-21 21:28:43 +01:00
|
|
|
OSS_DestroyRingMessage(&wwi->msgRing);
|
2001-12-14 23:44:29 +01:00
|
|
|
return widNotifyClient(wwi, WIM_CLOSE, 0L, 0L);
|
Release 940420
Wed Apr 20 14:53:35 1994 Bob Amstadt (bob@pooh)
* [tools/build.c] [if1632/call.S] [if1632/Imakefile]
Fixed bug for non-Linux systems.
Apr 18, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [windows/win.c]
Bug fixed in CreateWindowEx() : Now use SetMenu() for menubar setup.
New empty stub for function SetSysModalWindow().
* [misc/exec.c]
New empty stub for function ExitWindows().
* [objects/font.c]
New empty stub for function EnumFonts().
* New file [misc/property.c]
New functions RemoveProp(), GetProp(), SetProp() & EnumProps().
* New file [misc/shell.c]
New empty stubs for function RegisterShellProc(),
ShellExecute() & ShellProc().
* New files [loader/task.c] & [include/task.h]
Move functions GetWindowTask(), GetNumTask(), EnumTaskWindows()
from 'loader/library.c'.
* [if1632/user.c] [if1632/kernel.c]
Put Atoms functions entries.
* [controls/combo.c]
New functions DirDlgSelectComboBox() & DirDlgListComboBox().
* [controls/listbox.c]
New functions DirDlgSelect() & DirDlgList().
Sun Apr 17 20:57:59 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [objects/test.c]
GrayString() added.
* [if1632/callback.c]
CallGrayStringProc() added.
* [if1632/relay.c] [if1632/mmsystem.spec]
Added.
* [if1632/kernel.spec] [if1632/user.spec]
Added forgotten specs for atom functions.
Tue Apr 12 00:05:31 1994 Bob Amstadt (bob@pooh)
* misc/spy.c (SpyInit): Added more message types
* [windows/mdi.c] [include/mdi.h]
Maximizing and restoring child windows.
Tiling of child windows.
Mon Apr 11 20:48:28 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
* [windows/winpos.c]
Revert focus and activation to previous window when hiding a window.
* [windows/syscolor.c]
Implemented system color objects (brushes and pens created at
SetSysColor() time for better performance).
* [windows/graphics.c] [windows/nonclient.c] [controls/button.c]
Changed painting code to use system color objects.
* [windows/message.c]
New function MSG_InternalGetMessage() for internal messages
loops (e.g. for dialogs or menus).
* [windows/hook.c] [include/hook.h] (New files)
Beginning of the window hooks implementation.
* [windows/dialog.c]
Use new function MSG_InternalGetMessage() in DialogBox().
* [if1632/callback.c]
Added function CallHookProc().
Apr 11, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [windows/event.c]
Bug fix : WM_CHARs are sent to focused window like WM_KEY???.
* [misc/exec.c]
Nothing much more than a stub for LoadModule(), I saw there a lot
to be done in that corner, I will come back later ...
* [loader/library.c]
New functions GetWindowTask(), GetNumTask(), EnumTaskWindows()
and associated modules & tasks linked-lists.
(it's only an 'emerging bud', more to come next weeks).
* [loader/wine.c]
Use LoadLibrary() instead of LoadImage() for 'sysres.dll'.
* [control/menu.c]
You can now click outside menu region without problem.
Keyboard navig more smootly, even if a child has the focus.
Bug fix in InsertItem(), (bad linklist when insert point not found).
change Realloc for Free & Alloc in ModifyItem().
MF_STRING now set BLACK_PEN to fix bug of bad color of the underscores
done by DrawText(), (maybe it should done in DrawText() itself ?).
Sun Apr 10 14:06:08 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/profile.c]
.INI files will now be stored in / loaded from the windows dir
if no path is supplied.
* [if1632/kernel.spec]
Fixed GetDriveType's prototype.
* [if1632/winsock.spec] [include/winsock.h] [misc/winsocket.c]
Fixed prototypes: winsock uses a word as socket handle not an int.
* [misc/winsocket.c]
Added heap allocation for returned structures.
Added non-blocking WSAAsyncGetXbyY() functions as blocking ones.
* [loader/wine.c]
Added IsDLLLoaded(), used in LoadImage() to prevent loading
a dll multiple times.
Directory is added to wine's path when a fullpath is supplied when
starting wine.
LoadImage(): DLL filename used instead DLL's own internal name,
fixes 'Bad DLL name' errors.
Sat Apr 9 08:26:03 1994 David Metcalfe <david@prism.demon.co.uk>
* [controls/edit.c] [controls/widgets.c]
First release of edit control.
1994-04-21 03:20:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* widAddBuffer [internal]
|
|
|
|
*/
|
|
|
|
static DWORD widAddBuffer(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
2000-06-24 19:54:43 +02:00
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numInDev || WInDev[wDevID].state == WINE_WS_CLOSED) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("can't do it !\n");
|
2000-06-24 19:54:43 +02:00
|
|
|
return MMSYSERR_INVALHANDLE;
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
|
|
|
if (!(lpWaveHdr->dwFlags & WHDR_PREPARED)) {
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("never been prepared !\n");
|
1998-10-11 16:14:24 +02:00
|
|
|
return WAVERR_UNPREPARED;
|
|
|
|
}
|
|
|
|
if (lpWaveHdr->dwFlags & WHDR_INQUEUE) {
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("header already in use !\n");
|
1998-10-11 16:14:24 +02:00
|
|
|
return WAVERR_STILLPLAYING;
|
|
|
|
}
|
2000-10-24 04:20:01 +02:00
|
|
|
|
1998-10-11 16:14:24 +02:00
|
|
|
lpWaveHdr->dwFlags |= WHDR_INQUEUE;
|
|
|
|
lpWaveHdr->dwFlags &= ~WHDR_DONE;
|
|
|
|
lpWaveHdr->dwBytesRecorded = 0;
|
2001-11-12 16:55:37 +01:00
|
|
|
lpWaveHdr->lpNext = NULL;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2001-11-12 16:55:37 +01:00
|
|
|
OSS_AddRingMessage(&WInDev[wDevID].msgRing, WINE_WM_HEADER, (DWORD)lpWaveHdr, FALSE);
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOERROR;
|
1994-07-07 18:23:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* widPrepare [internal]
|
|
|
|
*/
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
static DWORD widPrepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
2000-06-24 19:54:43 +02:00
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numInDev) return MMSYSERR_INVALHANDLE;
|
2000-06-24 19:54:43 +02:00
|
|
|
|
1998-10-11 16:14:24 +02:00
|
|
|
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
|
|
|
return WAVERR_STILLPLAYING;
|
2000-06-24 19:54:43 +02:00
|
|
|
|
1998-10-11 16:14:24 +02:00
|
|
|
lpWaveHdr->dwFlags |= WHDR_PREPARED;
|
2002-01-12 22:15:08 +01:00
|
|
|
lpWaveHdr->dwFlags &= ~WHDR_DONE;
|
1998-10-11 16:14:24 +02:00
|
|
|
lpWaveHdr->dwBytesRecorded = 0;
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("header prepared !\n");
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOERROR;
|
1994-07-07 18:23:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* widUnprepare [internal]
|
|
|
|
*/
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
static DWORD widUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numInDev) return MMSYSERR_INVALHANDLE;
|
2000-06-24 19:54:43 +02:00
|
|
|
|
|
|
|
if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
|
|
|
|
return WAVERR_STILLPLAYING;
|
|
|
|
|
2002-01-12 22:15:08 +01:00
|
|
|
lpWaveHdr->dwFlags &= ~WHDR_PREPARED;
|
1998-10-11 16:14:24 +02:00
|
|
|
lpWaveHdr->dwFlags |= WHDR_DONE;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOERROR;
|
1994-07-07 18:23:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* widStart [internal]
|
|
|
|
*/
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
static DWORD widStart(WORD wDevID)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u);\n", wDevID);
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numInDev || WInDev[wDevID].state == WINE_WS_CLOSED) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("can't start recording !\n");
|
2000-06-24 19:54:43 +02:00
|
|
|
return MMSYSERR_INVALHANDLE;
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
2000-10-24 04:20:01 +02:00
|
|
|
|
2003-03-07 21:37:25 +01:00
|
|
|
OSS_AddRingMessage(&WInDev[wDevID].msgRing, WINE_WM_STARTING, 0, TRUE);
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOERROR;
|
1994-07-07 18:23:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* widStop [internal]
|
|
|
|
*/
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
static DWORD widStop(WORD wDevID)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u);\n", wDevID);
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numInDev || WInDev[wDevID].state == WINE_WS_CLOSED) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("can't stop !\n");
|
2000-06-24 19:54:43 +02:00
|
|
|
return MMSYSERR_INVALHANDLE;
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
2003-03-07 21:37:25 +01:00
|
|
|
|
|
|
|
OSS_AddRingMessage(&WInDev[wDevID].msgRing, WINE_WM_STOPPING, 0, TRUE);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOERROR;
|
1994-07-07 18:23:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* widReset [internal]
|
|
|
|
*/
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
static DWORD widReset(WORD wDevID)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u);\n", wDevID);
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numInDev || WInDev[wDevID].state == WINE_WS_CLOSED) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("can't reset !\n");
|
2000-06-24 19:54:43 +02:00
|
|
|
return MMSYSERR_INVALHANDLE;
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
2001-11-12 16:55:37 +01:00
|
|
|
OSS_AddRingMessage(&WInDev[wDevID].msgRing, WINE_WM_RESETTING, 0, TRUE);
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOERROR;
|
1994-07-07 18:23:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
* widGetPosition [internal]
|
|
|
|
*/
|
1999-09-22 18:45:33 +02:00
|
|
|
static DWORD widGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
2000-06-24 19:54:43 +02:00
|
|
|
int time;
|
|
|
|
WINE_WAVEIN* wwi;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u, %p, %lu);\n", wDevID, lpTime, uSize);
|
2000-06-24 19:54:43 +02:00
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numInDev || WInDev[wDevID].state == WINE_WS_CLOSED) {
|
1999-05-24 10:19:48 +02:00
|
|
|
WARN("can't get pos !\n");
|
2000-06-24 19:54:43 +02:00
|
|
|
return MMSYSERR_INVALHANDLE;
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
2004-03-12 20:43:44 +01:00
|
|
|
|
|
|
|
if (lpTime == NULL) {
|
|
|
|
WARN("invalid parameter: lpTime == NULL\n");
|
|
|
|
return MMSYSERR_INVALPARAM;
|
|
|
|
}
|
2000-06-24 19:54:43 +02:00
|
|
|
|
|
|
|
wwi = &WInDev[wDevID];
|
2004-03-12 20:43:44 +01:00
|
|
|
#ifdef EXACT_WIDPOSITION
|
|
|
|
if (wwi->ossdev->in_caps_support & WAVECAPS_SAMPLEACCURATE)
|
|
|
|
OSS_AddRingMessage(&(wwi->msgRing), WINE_WM_UPDATE, 0, TRUE);
|
|
|
|
#endif
|
2000-06-24 19:54:43 +02:00
|
|
|
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("wType=%04X !\n", lpTime->wType);
|
2002-06-01 01:06:46 +02:00
|
|
|
TRACE("wBitsPerSample=%u\n", wwi->format.wBitsPerSample);
|
|
|
|
TRACE("nSamplesPerSec=%lu\n", wwi->format.wf.nSamplesPerSec);
|
|
|
|
TRACE("nChannels=%u\n", wwi->format.wf.nChannels);
|
|
|
|
TRACE("nAvgBytesPerSec=%lu\n", wwi->format.wf.nAvgBytesPerSec);
|
2003-10-09 21:45:39 +02:00
|
|
|
TRACE("dwTotalRecorded=%lu\n",wwi->dwTotalRecorded);
|
1999-04-11 14:16:24 +02:00
|
|
|
switch (lpTime->wType) {
|
1998-10-11 16:14:24 +02:00
|
|
|
case TIME_BYTES:
|
2000-06-24 19:54:43 +02:00
|
|
|
lpTime->u.cb = wwi->dwTotalRecorded;
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("TIME_BYTES=%lu\n", lpTime->u.cb);
|
1998-10-11 16:14:24 +02:00
|
|
|
break;
|
|
|
|
case TIME_SAMPLES:
|
2000-06-24 19:54:43 +02:00
|
|
|
lpTime->u.sample = wwi->dwTotalRecorded * 8 /
|
2003-02-15 00:59:15 +01:00
|
|
|
wwi->format.wBitsPerSample / wwi->format.wf.nChannels;
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("TIME_SAMPLES=%lu\n", lpTime->u.sample);
|
1998-10-11 16:14:24 +02:00
|
|
|
break;
|
|
|
|
case TIME_SMPTE:
|
2000-06-24 19:54:43 +02:00
|
|
|
time = wwi->dwTotalRecorded /
|
|
|
|
(wwi->format.wf.nAvgBytesPerSec / 1000);
|
2003-10-09 21:45:39 +02:00
|
|
|
lpTime->u.smpte.hour = time / (60 * 60 * 1000);
|
|
|
|
time -= lpTime->u.smpte.hour * (60 * 60 * 1000);
|
|
|
|
lpTime->u.smpte.min = time / (60 * 1000);
|
|
|
|
time -= lpTime->u.smpte.min * (60 * 1000);
|
|
|
|
lpTime->u.smpte.sec = time / 1000;
|
|
|
|
time -= lpTime->u.smpte.sec * 1000;
|
|
|
|
lpTime->u.smpte.frame = time * 30 / 1000;
|
1998-10-11 16:14:24 +02:00
|
|
|
lpTime->u.smpte.fps = 30;
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("TIME_SMPTE=%02u:%02u:%02u:%02u\n",
|
1998-10-11 16:14:24 +02:00
|
|
|
lpTime->u.smpte.hour, lpTime->u.smpte.min,
|
|
|
|
lpTime->u.smpte.sec, lpTime->u.smpte.frame);
|
|
|
|
break;
|
2003-10-09 21:45:39 +02:00
|
|
|
default:
|
|
|
|
FIXME("format not supported (%u) ! use TIME_MS !\n", lpTime->wType);
|
|
|
|
lpTime->wType = TIME_MS;
|
1998-10-11 16:14:24 +02:00
|
|
|
case TIME_MS:
|
2000-06-24 19:54:43 +02:00
|
|
|
lpTime->u.ms = wwi->dwTotalRecorded /
|
|
|
|
(wwi->format.wf.nAvgBytesPerSec / 1000);
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("TIME_MS=%lu\n", lpTime->u.ms);
|
1998-10-11 16:14:24 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
return MMSYSERR_NOERROR;
|
1994-07-07 18:23:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
2001-07-11 20:56:41 +02:00
|
|
|
* widMessage (WINEOSS.6)
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
DWORD WINAPI OSS_widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
1999-09-22 18:45:33 +02:00
|
|
|
DWORD dwParam1, DWORD dwParam2)
|
Release 940420
Wed Apr 20 14:53:35 1994 Bob Amstadt (bob@pooh)
* [tools/build.c] [if1632/call.S] [if1632/Imakefile]
Fixed bug for non-Linux systems.
Apr 18, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [windows/win.c]
Bug fixed in CreateWindowEx() : Now use SetMenu() for menubar setup.
New empty stub for function SetSysModalWindow().
* [misc/exec.c]
New empty stub for function ExitWindows().
* [objects/font.c]
New empty stub for function EnumFonts().
* New file [misc/property.c]
New functions RemoveProp(), GetProp(), SetProp() & EnumProps().
* New file [misc/shell.c]
New empty stubs for function RegisterShellProc(),
ShellExecute() & ShellProc().
* New files [loader/task.c] & [include/task.h]
Move functions GetWindowTask(), GetNumTask(), EnumTaskWindows()
from 'loader/library.c'.
* [if1632/user.c] [if1632/kernel.c]
Put Atoms functions entries.
* [controls/combo.c]
New functions DirDlgSelectComboBox() & DirDlgListComboBox().
* [controls/listbox.c]
New functions DirDlgSelect() & DirDlgList().
Sun Apr 17 20:57:59 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [objects/test.c]
GrayString() added.
* [if1632/callback.c]
CallGrayStringProc() added.
* [if1632/relay.c] [if1632/mmsystem.spec]
Added.
* [if1632/kernel.spec] [if1632/user.spec]
Added forgotten specs for atom functions.
Tue Apr 12 00:05:31 1994 Bob Amstadt (bob@pooh)
* misc/spy.c (SpyInit): Added more message types
* [windows/mdi.c] [include/mdi.h]
Maximizing and restoring child windows.
Tiling of child windows.
Mon Apr 11 20:48:28 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
* [windows/winpos.c]
Revert focus and activation to previous window when hiding a window.
* [windows/syscolor.c]
Implemented system color objects (brushes and pens created at
SetSysColor() time for better performance).
* [windows/graphics.c] [windows/nonclient.c] [controls/button.c]
Changed painting code to use system color objects.
* [windows/message.c]
New function MSG_InternalGetMessage() for internal messages
loops (e.g. for dialogs or menus).
* [windows/hook.c] [include/hook.h] (New files)
Beginning of the window hooks implementation.
* [windows/dialog.c]
Use new function MSG_InternalGetMessage() in DialogBox().
* [if1632/callback.c]
Added function CallHookProc().
Apr 11, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [windows/event.c]
Bug fix : WM_CHARs are sent to focused window like WM_KEY???.
* [misc/exec.c]
Nothing much more than a stub for LoadModule(), I saw there a lot
to be done in that corner, I will come back later ...
* [loader/library.c]
New functions GetWindowTask(), GetNumTask(), EnumTaskWindows()
and associated modules & tasks linked-lists.
(it's only an 'emerging bud', more to come next weeks).
* [loader/wine.c]
Use LoadLibrary() instead of LoadImage() for 'sysres.dll'.
* [control/menu.c]
You can now click outside menu region without problem.
Keyboard navig more smootly, even if a child has the focus.
Bug fix in InsertItem(), (bad linklist when insert point not found).
change Realloc for Free & Alloc in ModifyItem().
MF_STRING now set BLACK_PEN to fix bug of bad color of the underscores
done by DrawText(), (maybe it should done in DrawText() itself ?).
Sun Apr 10 14:06:08 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/profile.c]
.INI files will now be stored in / loaded from the windows dir
if no path is supplied.
* [if1632/kernel.spec]
Fixed GetDriveType's prototype.
* [if1632/winsock.spec] [include/winsock.h] [misc/winsocket.c]
Fixed prototypes: winsock uses a word as socket handle not an int.
* [misc/winsocket.c]
Added heap allocation for returned structures.
Added non-blocking WSAAsyncGetXbyY() functions as blocking ones.
* [loader/wine.c]
Added IsDLLLoaded(), used in LoadImage() to prevent loading
a dll multiple times.
Directory is added to wine's path when a fullpath is supplied when
starting wine.
LoadImage(): DLL filename used instead DLL's own internal name,
fixes 'Bad DLL name' errors.
Sat Apr 9 08:26:03 1994 David Metcalfe <david@prism.demon.co.uk>
* [controls/edit.c] [controls/widgets.c]
First release of edit control.
1994-04-21 03:20:00 +02:00
|
|
|
{
|
1999-05-24 10:19:48 +02:00
|
|
|
TRACE("(%u, %04X, %08lX, %08lX, %08lX);\n",
|
1998-10-11 16:14:24 +02:00
|
|
|
wDevID, wMsg, dwUser, dwParam1, dwParam2);
|
1999-04-11 14:16:24 +02:00
|
|
|
|
|
|
|
switch (wMsg) {
|
2000-06-24 19:54:43 +02:00
|
|
|
case DRVM_INIT:
|
1999-09-22 18:45:33 +02:00
|
|
|
case DRVM_EXIT:
|
|
|
|
case DRVM_ENABLE:
|
|
|
|
case DRVM_DISABLE:
|
|
|
|
/* FIXME: Pretend this is supported */
|
|
|
|
return 0;
|
2000-06-24 19:54:43 +02:00
|
|
|
case WIDM_OPEN: return widOpen (wDevID, (LPWAVEOPENDESC)dwParam1, dwParam2);
|
|
|
|
case WIDM_CLOSE: return widClose (wDevID);
|
|
|
|
case WIDM_ADDBUFFER: return widAddBuffer (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
|
|
|
case WIDM_PREPARE: return widPrepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
|
|
|
case WIDM_UNPREPARE: return widUnprepare (wDevID, (LPWAVEHDR)dwParam1, dwParam2);
|
|
|
|
case WIDM_GETDEVCAPS: return widGetDevCaps (wDevID, (LPWAVEINCAPSA)dwParam1, dwParam2);
|
2002-06-28 19:31:31 +02:00
|
|
|
case WIDM_GETNUMDEVS: return numInDev;
|
1999-09-22 18:45:33 +02:00
|
|
|
case WIDM_GETPOS: return widGetPosition(wDevID, (LPMMTIME)dwParam1, dwParam2);
|
2000-06-24 19:54:43 +02:00
|
|
|
case WIDM_RESET: return widReset (wDevID);
|
|
|
|
case WIDM_START: return widStart (wDevID);
|
|
|
|
case WIDM_STOP: return widStop (wDevID);
|
2003-10-28 01:15:16 +01:00
|
|
|
case DRV_QUERYDEVICEINTERFACESIZE: return wdDevInterfaceSize (wDevID, (LPDWORD)dwParam1);
|
|
|
|
case DRV_QUERYDEVICEINTERFACE: return wdDevInterface (wDevID, (PWCHAR)dwParam1, dwParam2);
|
2003-02-15 00:59:15 +01:00
|
|
|
case DRV_QUERYDSOUNDIFACE: return widDsCreate (wDevID, (PIDSCDRIVER*)dwParam1);
|
2003-03-15 01:54:11 +01:00
|
|
|
case DRV_QUERYDSOUNDDESC: return widDsDesc (wDevID, (PDSDRIVERDESC)dwParam1);
|
|
|
|
case DRV_QUERYDSOUNDGUID: return widDsGuid (wDevID, (LPGUID)dwParam1);
|
1998-10-11 16:14:24 +02:00
|
|
|
default:
|
1999-05-24 10:19:48 +02:00
|
|
|
FIXME("unknown message %u!\n", wMsg);
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
|
|
|
return MMSYSERR_NOTSUPPORTED;
|
Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [debugger/*.c]
Modified debugger to use segmented pointers everywhere.
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
Declared all functions that return only 16-bit as 'pascal16'.
* [include/ldt.h] [memory/ldt.c]
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
Maintain a copy of the selector flags, removing the need to make a
system call to retrieve an LDT entry.
* [loader/module.c]
Fixed bug with module file handle cache.
* [loader/ne_resource.c]
Fixed file name bug in NE_AccessResource().
* [loader/resource.c]
Fixed bug in LoadIcon() that caused wrong colors to be used for
the icon mask.
* [loader/signal.c]
Moved instruction emulation to miscemu/instr.c.
* [misc/dos_fs.c] [miscemu/int21.c]
Lots of small fixes, thanks to Morten Welinder.
* [miscemu/dpmi.c]
More complete DPMI emulation.
* [miscemu/instr.c]
Added support for prefixes in instructions to emulate.
* [miscemu/int2f.c]
Use register macros instead of destroying the high part of 32-bit
registers.
* [objects/dc.c]
Fixed bug in GetDCState() that failed to clear the new DC.
* [rc/sysres.rc]
Removed dialogs 11 and 12 that were never used.
* [tools/build.c]
'pascal16' generated functions did not save %dx.
Removed use of %fs to access the stack.
%ds is no longer initialized before calling a 16-bit routine.
* [windows/defwnd.c]
Accept a NULL pointer as window title.
* [windows/mdi.c]
MDICascade: skip iconic windows.
Implemented CalcChildScroll().
* [windows/utility.c]
Fixed MulDiv() for illegal values.
* [windows/win.c]
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
a zero width or height.
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
* [controls/edit.c]
Fixed "uninitalized" message which -Wall couldnt see to be ok
in EDIT_WriteText.
* [include/debug.h]
Added define for extra checks in API definitions during debugging.
* [loader/ne_image.c]
Added newline in NE_FixupPrologs to avoid long lines.
* [misc/dos_fs.c]
Added extra safety check in DOS_ValidDrive.
* [misc/exec.c]
Fixed definition of ExitWindows.
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Some fixes, mostly for memory management, but also for text selection
and tab postitions. General cleanup. Notepad.exe now works.
* [controls/combo.c]
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
the combo box, not the ComboLBox that belongs to it.
* [controls/listbox.c]
Handle itemID field correctly throughout.
* [memory/local.c]
Implemented flag LMEM_ZEROINIT.
LocalReAlloc() could trash the heap. Fixed.
* [objects/font.c]
FONT_MatchFont(): don't get confused by negative widths.
Fixed a segfault in EnumFonts().
* [objects/text.c]
DrawText(): DT_CALCRECT implies DT_NOCLIP.
* [objects/dcvalues.c]
MAKELONG was used with bad parameters in DC_GET_X_Y.
* [windows/dialog.c]
Don't show the dialog if WS_VISIBLE isn't set in the template.
* [windows/utility.c]
UTILITY_convertArgs(): Never pass an expression containing ++ into a
macro...
* [windows/win.c]
SetParent() should unlink the window before changing the parent.
* [windows/message.c]
Don't call timer functions via CallWindowProc(), since it checks
whether hwnd==0 and does not call the function in that case.
* [miscemu/instr.c]
Ignore interrupt 0x3D, for VBRUN300.DLL.
* [misc/commdlg.c]
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
pointer to the item text.
* [if1632/relay.c]
Disable OLE and DDEML DLLs by default, since they contain nothing but
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
some programs may work better without them.
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
Begun cleaning things up a little. Replaced printfs with dprintf_
macros, made functions static where possible, and some other minor
changes.
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
* [debugger/dbg.y][debugger/dbg.l]
Removed special handling for FILE_IDENTIFER, because it caused
problems with x/<format> statements.
* [debugger/info.c]
Use SC_ESP instead of SC_EIP for stack dump.
* [misc/compobj.c][if1632/compobj.spec]
CoBuildVersion, CoInitialize, CoUninitialize: new functions
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
New files ole2.c, ole2.h
OleBuildVersion, OleInitialize, OleUninitialize: new functions
* [if1632/ole2disp.spec]
Added missing ordinals above 109
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
New file winnls.h
GetLocaleInfoA: new function
* [if1632/shell.spec]
Added FindEnvironmentString as stub
* [misc/olecli.c][if1632/olecli.spec]
OleIsDcMeta: New function
* [objects/font][misc/gdi.spec]
GetKerningPairs: new function
* [misc/shell.c]
ShellExecute: Implemented support for starting programs
* [if1632/user.spec]
Inserted missing relay to GetClipCursor
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/edit.c]
Fix a problem with the local heap.
* [include/wintypes.h]
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
* [include/mdi.h] [windows/mdi.c]
This code still assumed segmented address==linear address. Fixed.
* [include/msdos.h] [misc/dos_fs.c]
The filemask field of the dosdirent structure could be overrun. Fixed.
If you had a file called foobar and a file called foo, trying to
FindFile(foo) could accidentally find file foobar instead. Fixed.
* [misc/file.c]
OpenFile(): Always return the full pathname in ofs->szPathName. This
also fixes GetModuleFilename().
Prevent _lclose() from closing stderr or stdout.
* [misc/profile.c]
Search for .ini files in the path of the current module as well.
(Needed by Lotus Organizer.)
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
[memory/local.c]
Local heaps are now initialized by InitTask() for executables. DLLs
have to call LocalInit() themselves, LocalInit() has to put the
heap at the end of the segment when called with start==0. We no longer
allocate the DGROUP with 64k on startup, but grow the local heap
in LOCAL_GetBlock() when necessary.
* [loader/module.c]
LoadLibrary() should call LoadModule() in all cases, even if the
DLL is already loaded, to ensure that the reference count is correct.
* [loader/ne_image.c]
Some changes to function prolog fixup. Does anyone know exactly how
this is supposed to work? I am only guessing here.
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
the module itself.
* [loader/task.c]
Initialize instance data at the beginning of the DGROUP in InitTask().
* [memory/local.c]
Some fixes for moveable blocks.
* [memory/selector.c]
All the IsBad*Pointer() functions returned exactly the wrong boolean
value in all cases!
* [objects/bitblt.c]
Fixed another null pointer dereference in debugging output.
* [objects/font.c]
Some more recovery possibilities for FONT_MatchFont() if a specified
font does not exist.
* [windows/win.c]
The dialog code may call CreateWindowEx with an integer in windowName.
This happens for static icon controls that expect a resource ID as
the window name. CreateWindowEx() used to crash. Fixed.
* [windows/class.c] [windows/win.c]
Window classes are owned by modules, not instances. Changed
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
accordingly.
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
* [miscemu/int21.c]
clock.exe was displaying incorrect year.
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
* [include/cursor.h] [windows/cursor.c]
Implemented CreateCursorIconIndirect().
1995-06-20 21:08:12 +02:00
|
|
|
}
|
|
|
|
|
2003-05-02 22:16:20 +02:00
|
|
|
/*======================================================================*
|
2004-01-20 02:47:27 +01:00
|
|
|
* Low level DSOUND capture definitions *
|
2003-05-02 22:16:20 +02:00
|
|
|
*======================================================================*/
|
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
typedef struct IDsCaptureDriverPropertySetImpl IDsCaptureDriverPropertySetImpl;
|
|
|
|
typedef struct IDsCaptureDriverNotifyImpl IDsCaptureDriverNotifyImpl;
|
|
|
|
typedef struct IDsCaptureDriverImpl IDsCaptureDriverImpl;
|
|
|
|
typedef struct IDsCaptureDriverBufferImpl IDsCaptureDriverBufferImpl;
|
2003-05-02 22:16:20 +02:00
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
struct IDsCaptureDriverPropertySetImpl
|
2003-05-02 22:16:20 +02:00
|
|
|
{
|
|
|
|
/* IUnknown fields */
|
|
|
|
ICOM_VFIELD(IDsDriverPropertySet);
|
2004-01-20 02:47:27 +01:00
|
|
|
DWORD ref;
|
|
|
|
|
|
|
|
IDsCaptureDriverBufferImpl* capture_buffer;
|
2003-05-02 22:16:20 +02:00
|
|
|
};
|
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
struct IDsCaptureDriverNotifyImpl
|
|
|
|
{
|
|
|
|
/* IUnknown fields */
|
|
|
|
ICOM_VFIELD(IDsDriverNotify);
|
|
|
|
DWORD ref;
|
|
|
|
|
|
|
|
/* IDsDriverNotifyImpl fields */
|
|
|
|
LPDSBPOSITIONNOTIFY notifies;
|
|
|
|
int nrofnotifies;
|
|
|
|
|
|
|
|
IDsCaptureDriverBufferImpl* capture_buffer;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct IDsCaptureDriverImpl
|
|
|
|
{
|
|
|
|
/* IUnknown fields */
|
|
|
|
ICOM_VFIELD(IDsCaptureDriver);
|
|
|
|
DWORD ref;
|
|
|
|
|
|
|
|
/* IDsCaptureDriverImpl fields */
|
|
|
|
UINT wDevID;
|
|
|
|
IDsCaptureDriverBufferImpl* capture_buffer;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct IDsCaptureDriverBufferImpl
|
|
|
|
{
|
|
|
|
/* IUnknown fields */
|
|
|
|
ICOM_VFIELD(IDsCaptureDriverBuffer);
|
|
|
|
DWORD ref;
|
|
|
|
|
|
|
|
/* IDsCaptureDriverBufferImpl fields */
|
|
|
|
IDsCaptureDriverImpl* drv;
|
|
|
|
DWORD buflen;
|
|
|
|
LPBYTE buffer;
|
|
|
|
DWORD writeptr;
|
2004-02-13 21:44:42 +01:00
|
|
|
LPBYTE mapping;
|
|
|
|
DWORD maplen;
|
2004-01-20 02:47:27 +01:00
|
|
|
|
|
|
|
/* IDsDriverNotifyImpl fields */
|
|
|
|
IDsCaptureDriverNotifyImpl* notify;
|
|
|
|
int notify_index;
|
|
|
|
|
|
|
|
/* IDsDriverPropertySetImpl fields */
|
|
|
|
IDsCaptureDriverPropertySetImpl* property_set;
|
|
|
|
};
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsCaptureDriverPropertySetImpl_Create(
|
|
|
|
IDsCaptureDriverBufferImpl * dscdb,
|
|
|
|
IDsCaptureDriverPropertySetImpl **pdscdps);
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsCaptureDriverNotifyImpl_Create(
|
|
|
|
IDsCaptureDriverBufferImpl * dsdcb,
|
|
|
|
IDsCaptureDriverNotifyImpl **pdscdn);
|
|
|
|
|
|
|
|
/*======================================================================*
|
|
|
|
* Low level DSOUND capture property set implementation *
|
|
|
|
*======================================================================*/
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsCaptureDriverPropertySetImpl_QueryInterface(
|
2003-05-02 22:16:20 +02:00
|
|
|
PIDSDRIVERPROPERTYSET iface,
|
|
|
|
REFIID riid,
|
|
|
|
LPVOID *ppobj)
|
|
|
|
{
|
2004-01-20 02:47:27 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverPropertySetImpl,iface);
|
2003-05-02 22:16:20 +02:00
|
|
|
TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppobj);
|
|
|
|
|
|
|
|
if ( IsEqualGUID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualGUID(riid, &IID_IDsDriverPropertySet) ) {
|
2004-01-20 02:47:27 +01:00
|
|
|
IDsDriverPropertySet_AddRef(iface);
|
|
|
|
*ppobj = (LPVOID)This;
|
|
|
|
return DS_OK;
|
2003-05-02 22:16:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
FIXME( "Unknown IID %s\n", debugstr_guid( riid ) );
|
|
|
|
|
|
|
|
*ppobj = 0;
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
static ULONG WINAPI IDsCaptureDriverPropertySetImpl_AddRef(PIDSDRIVERPROPERTYSET iface)
|
2003-05-02 22:16:20 +02:00
|
|
|
{
|
2004-01-20 02:47:27 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverPropertySetImpl,iface);
|
2003-05-02 22:16:20 +02:00
|
|
|
DWORD ref;
|
|
|
|
TRACE("(%p) ref was %ld\n", This, This->ref);
|
|
|
|
|
|
|
|
ref = InterlockedIncrement(&(This->ref));
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
static ULONG WINAPI IDsCaptureDriverPropertySetImpl_Release(PIDSDRIVERPROPERTYSET iface)
|
2003-05-02 22:16:20 +02:00
|
|
|
{
|
2004-01-20 02:47:27 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverPropertySetImpl,iface);
|
2003-05-02 22:16:20 +02:00
|
|
|
DWORD ref;
|
|
|
|
TRACE("(%p) ref was %ld\n", This, This->ref);
|
|
|
|
|
|
|
|
ref = InterlockedDecrement(&(This->ref));
|
2004-01-20 02:47:27 +01:00
|
|
|
if (ref == 0) {
|
|
|
|
IDsCaptureDriverBuffer_Release((PIDSCDRIVERBUFFER)This->capture_buffer);
|
|
|
|
HeapFree(GetProcessHeap(),0,This);
|
|
|
|
TRACE("(%p) released\n",This);
|
|
|
|
}
|
2003-05-02 22:16:20 +02:00
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
static HRESULT WINAPI IDsCaptureDriverPropertySetImpl_Get(
|
2003-05-02 22:16:20 +02:00
|
|
|
PIDSDRIVERPROPERTYSET iface,
|
|
|
|
PDSPROPERTY pDsProperty,
|
|
|
|
LPVOID pPropertyParams,
|
|
|
|
ULONG cbPropertyParams,
|
|
|
|
LPVOID pPropertyData,
|
|
|
|
ULONG cbPropertyData,
|
|
|
|
PULONG pcbReturnedData )
|
|
|
|
{
|
2004-01-20 02:47:27 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverPropertySetImpl,iface);
|
2003-05-02 22:16:20 +02:00
|
|
|
FIXME("(%p,%p,%p,%lx,%p,%lx,%p)\n",This,pDsProperty,pPropertyParams,cbPropertyParams,pPropertyData,cbPropertyData,pcbReturnedData);
|
|
|
|
return DSERR_UNSUPPORTED;
|
|
|
|
}
|
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
static HRESULT WINAPI IDsCaptureDriverPropertySetImpl_Set(
|
2003-05-02 22:16:20 +02:00
|
|
|
PIDSDRIVERPROPERTYSET iface,
|
|
|
|
PDSPROPERTY pDsProperty,
|
|
|
|
LPVOID pPropertyParams,
|
|
|
|
ULONG cbPropertyParams,
|
|
|
|
LPVOID pPropertyData,
|
|
|
|
ULONG cbPropertyData )
|
|
|
|
{
|
2004-01-20 02:47:27 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverPropertySetImpl,iface);
|
2003-05-02 22:16:20 +02:00
|
|
|
FIXME("(%p,%p,%p,%lx,%p,%lx)\n",This,pDsProperty,pPropertyParams,cbPropertyParams,pPropertyData,cbPropertyData);
|
|
|
|
return DSERR_UNSUPPORTED;
|
|
|
|
}
|
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
static HRESULT WINAPI IDsCaptureDriverPropertySetImpl_QuerySupport(
|
2003-05-02 22:16:20 +02:00
|
|
|
PIDSDRIVERPROPERTYSET iface,
|
|
|
|
REFGUID PropertySetId,
|
|
|
|
ULONG PropertyId,
|
|
|
|
PULONG pSupport )
|
|
|
|
{
|
2004-01-20 02:47:27 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverPropertySetImpl,iface);
|
2003-05-02 22:16:20 +02:00
|
|
|
FIXME("(%p,%s,%lx,%p)\n",This,debugstr_guid(PropertySetId),PropertyId,pSupport);
|
|
|
|
return DSERR_UNSUPPORTED;
|
|
|
|
}
|
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
ICOM_VTABLE(IDsDriverPropertySet) dscdpsvt =
|
2003-05-02 22:16:20 +02:00
|
|
|
{
|
|
|
|
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
2004-01-20 02:47:27 +01:00
|
|
|
IDsCaptureDriverPropertySetImpl_QueryInterface,
|
|
|
|
IDsCaptureDriverPropertySetImpl_AddRef,
|
|
|
|
IDsCaptureDriverPropertySetImpl_Release,
|
|
|
|
IDsCaptureDriverPropertySetImpl_Get,
|
|
|
|
IDsCaptureDriverPropertySetImpl_Set,
|
|
|
|
IDsCaptureDriverPropertySetImpl_QuerySupport,
|
2003-05-02 22:16:20 +02:00
|
|
|
};
|
|
|
|
|
2003-04-30 00:47:59 +02:00
|
|
|
/*======================================================================*
|
2004-01-20 02:47:27 +01:00
|
|
|
* Low level DSOUND capture notify implementation *
|
2003-04-30 00:47:59 +02:00
|
|
|
*======================================================================*/
|
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
static HRESULT WINAPI IDsCaptureDriverNotifyImpl_QueryInterface(
|
2003-04-30 00:47:59 +02:00
|
|
|
PIDSDRIVERNOTIFY iface,
|
|
|
|
REFIID riid,
|
|
|
|
LPVOID *ppobj)
|
|
|
|
{
|
2004-01-20 02:47:27 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverNotifyImpl,iface);
|
2003-04-30 00:47:59 +02:00
|
|
|
TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppobj);
|
|
|
|
|
|
|
|
if ( IsEqualGUID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualGUID(riid, &IID_IDsDriverNotify) ) {
|
2004-01-20 02:47:27 +01:00
|
|
|
IDsDriverNotify_AddRef(iface);
|
|
|
|
*ppobj = This;
|
|
|
|
return DS_OK;
|
2003-04-30 00:47:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
FIXME( "Unknown IID %s\n", debugstr_guid( riid ) );
|
|
|
|
|
|
|
|
*ppobj = 0;
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
static ULONG WINAPI IDsCaptureDriverNotifyImpl_AddRef(PIDSDRIVERNOTIFY iface)
|
2003-04-30 00:47:59 +02:00
|
|
|
{
|
2004-01-20 02:47:27 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverNotifyImpl,iface);
|
2003-04-30 00:47:59 +02:00
|
|
|
DWORD ref;
|
|
|
|
TRACE("(%p) ref was %ld\n", This, This->ref);
|
|
|
|
|
|
|
|
ref = InterlockedIncrement(&(This->ref));
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
static ULONG WINAPI IDsCaptureDriverNotifyImpl_Release(PIDSDRIVERNOTIFY iface)
|
2003-04-30 00:47:59 +02:00
|
|
|
{
|
2004-01-20 02:47:27 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverNotifyImpl,iface);
|
2003-04-30 00:47:59 +02:00
|
|
|
DWORD ref;
|
|
|
|
TRACE("(%p) ref was %ld\n", This, This->ref);
|
|
|
|
|
|
|
|
ref = InterlockedDecrement(&(This->ref));
|
2004-01-20 02:47:27 +01:00
|
|
|
if (ref == 0) {
|
|
|
|
IDsCaptureDriverBuffer_Release((PIDSCDRIVERBUFFER)This->capture_buffer);
|
|
|
|
if (This->notifies != NULL)
|
|
|
|
HeapFree(GetProcessHeap(), 0, This->notifies);
|
2003-04-30 00:47:59 +02:00
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
HeapFree(GetProcessHeap(),0,This);
|
|
|
|
TRACE("(%p) released\n",This);
|
2003-04-30 00:47:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
static HRESULT WINAPI IDsCaptureDriverNotifyImpl_SetNotificationPositions(
|
2003-04-30 00:47:59 +02:00
|
|
|
PIDSDRIVERNOTIFY iface,
|
|
|
|
DWORD howmuch,
|
|
|
|
LPCDSBPOSITIONNOTIFY notify)
|
|
|
|
{
|
2004-01-20 02:47:27 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverNotifyImpl,iface);
|
2003-04-30 00:47:59 +02:00
|
|
|
TRACE("(%p,0x%08lx,%p)\n",This,howmuch,notify);
|
|
|
|
|
|
|
|
if (!notify) {
|
2004-01-20 02:47:27 +01:00
|
|
|
WARN("invalid parameter\n");
|
|
|
|
return DSERR_INVALIDPARAM;
|
2003-04-30 00:47:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (TRACE_ON(wave)) {
|
2004-01-20 02:47:27 +01:00
|
|
|
int i;
|
|
|
|
for (i=0;i<howmuch;i++)
|
|
|
|
TRACE("notify at %ld to 0x%08lx\n",
|
|
|
|
notify[i].dwOffset,(DWORD)notify[i].hEventNotify);
|
2003-04-30 00:47:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Make an internal copy of the caller-supplied array.
|
|
|
|
* Replace the existing copy if one is already present. */
|
2003-10-15 23:01:05 +02:00
|
|
|
if (This->notifies)
|
|
|
|
This->notifies = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
2004-01-20 02:47:27 +01:00
|
|
|
This->notifies, howmuch * sizeof(DSBPOSITIONNOTIFY));
|
2003-10-15 23:01:05 +02:00
|
|
|
else
|
|
|
|
This->notifies = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
2004-01-20 02:47:27 +01:00
|
|
|
howmuch * sizeof(DSBPOSITIONNOTIFY));
|
2003-10-15 23:01:05 +02:00
|
|
|
|
2003-04-30 00:47:59 +02:00
|
|
|
memcpy(This->notifies, notify, howmuch * sizeof(DSBPOSITIONNOTIFY));
|
|
|
|
This->nrofnotifies = howmuch;
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
ICOM_VTABLE(IDsDriverNotify) dscdnvt =
|
2003-04-30 00:47:59 +02:00
|
|
|
{
|
|
|
|
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
2004-01-20 02:47:27 +01:00
|
|
|
IDsCaptureDriverNotifyImpl_QueryInterface,
|
|
|
|
IDsCaptureDriverNotifyImpl_AddRef,
|
|
|
|
IDsCaptureDriverNotifyImpl_Release,
|
|
|
|
IDsCaptureDriverNotifyImpl_SetNotificationPositions,
|
2003-04-30 00:47:59 +02:00
|
|
|
};
|
|
|
|
|
2003-02-15 00:59:15 +01:00
|
|
|
/*======================================================================*
|
2004-01-20 02:47:27 +01:00
|
|
|
* Low level DSOUND capture implementation *
|
2003-02-15 00:59:15 +01:00
|
|
|
*======================================================================*/
|
|
|
|
|
2004-02-13 21:44:42 +01:00
|
|
|
static HRESULT DSCDB_MapBuffer(IDsCaptureDriverBufferImpl *dscdb)
|
2003-03-04 03:11:21 +01:00
|
|
|
{
|
2004-02-13 21:44:42 +01:00
|
|
|
if (!dscdb->mapping) {
|
|
|
|
dscdb->mapping = mmap(NULL, dscdb->maplen, PROT_READ, MAP_SHARED,
|
|
|
|
WInDev[dscdb->drv->wDevID].ossdev->fd, 0);
|
|
|
|
if (dscdb->mapping == (LPBYTE)-1) {
|
|
|
|
TRACE("(%p): Could not map sound device for direct access (%s)\n", dscdb, strerror(errno));
|
|
|
|
return DSERR_GENERIC;
|
|
|
|
}
|
|
|
|
TRACE("(%p): sound device has been mapped for direct access at %p, size=%ld\n", dscdb, dscdb->mapping, dscdb->maplen);
|
2003-03-04 03:11:21 +01:00
|
|
|
}
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
|
2004-02-13 21:44:42 +01:00
|
|
|
static HRESULT DSCDB_UnmapBuffer(IDsCaptureDriverBufferImpl *dscdb)
|
2003-03-04 03:11:21 +01:00
|
|
|
{
|
2004-02-13 21:44:42 +01:00
|
|
|
if (dscdb->mapping) {
|
|
|
|
if (munmap(dscdb->mapping, dscdb->maplen) < 0) {
|
|
|
|
ERR("(%p): Could not unmap sound device (%s)\n", dscdb, strerror(errno));
|
|
|
|
return DSERR_GENERIC;
|
|
|
|
}
|
|
|
|
dscdb->mapping = NULL;
|
|
|
|
TRACE("(%p): sound device unmapped\n", dscdb);
|
2003-03-04 03:11:21 +01:00
|
|
|
}
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
|
2003-02-15 00:59:15 +01:00
|
|
|
static HRESULT WINAPI IDsCaptureDriverBufferImpl_QueryInterface(PIDSCDRIVERBUFFER iface, REFIID riid, LPVOID *ppobj)
|
|
|
|
{
|
2003-03-04 03:11:21 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverBufferImpl,iface);
|
2003-04-30 00:47:59 +02:00
|
|
|
TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppobj);
|
|
|
|
|
2003-05-02 22:16:20 +02:00
|
|
|
if ( IsEqualGUID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualGUID(riid, &IID_IDsCaptureDriverBuffer) ) {
|
|
|
|
IDsCaptureDriverBuffer_AddRef(iface);
|
|
|
|
*ppobj = (LPVOID)This;
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
|
2003-04-30 00:47:59 +02:00
|
|
|
if ( IsEqualGUID( &IID_IDsDriverNotify, riid ) ) {
|
2004-01-20 02:47:27 +01:00
|
|
|
if (!This->notify)
|
|
|
|
IDsCaptureDriverNotifyImpl_Create(This, &(This->notify));
|
|
|
|
if (This->notify) {
|
|
|
|
IDsDriverNotify_AddRef((PIDSDRIVERNOTIFY)This->notify);
|
|
|
|
*ppobj = (LPVOID)This->notify;
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
*ppobj = 0;
|
|
|
|
return E_FAIL;
|
2003-04-30 00:47:59 +02:00
|
|
|
}
|
|
|
|
|
2003-05-02 22:16:20 +02:00
|
|
|
if ( IsEqualGUID( &IID_IDsDriverPropertySet, riid ) ) {
|
2004-01-20 02:47:27 +01:00
|
|
|
if (!This->property_set)
|
|
|
|
IDsCaptureDriverPropertySetImpl_Create(This, &(This->property_set));
|
|
|
|
if (This->property_set) {
|
|
|
|
IDsDriverPropertySet_AddRef((PIDSDRIVERPROPERTYSET)This->property_set);
|
|
|
|
*ppobj = (LPVOID)This->property_set;
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
*ppobj = 0;
|
|
|
|
return E_FAIL;
|
2003-05-02 22:16:20 +02:00
|
|
|
}
|
|
|
|
|
2003-04-30 00:47:59 +02:00
|
|
|
FIXME("(%p,%s,%p) unsupported GUID\n", This, debugstr_guid(riid), ppobj);
|
|
|
|
|
|
|
|
*ppobj = 0;
|
|
|
|
|
2003-02-15 00:59:15 +01:00
|
|
|
return DSERR_UNSUPPORTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDsCaptureDriverBufferImpl_AddRef(PIDSCDRIVERBUFFER iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsCaptureDriverBufferImpl,iface);
|
|
|
|
This->ref++;
|
|
|
|
return This->ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDsCaptureDriverBufferImpl_Release(PIDSCDRIVERBUFFER iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsCaptureDriverBufferImpl,iface);
|
|
|
|
if (--This->ref)
|
|
|
|
return This->ref;
|
2004-02-13 21:44:42 +01:00
|
|
|
DSCDB_UnmapBuffer(This);
|
2003-04-30 00:47:59 +02:00
|
|
|
if (This->notify)
|
2003-05-02 22:16:20 +02:00
|
|
|
IDsDriverNotify_Release((PIDSDRIVERNOTIFY)This->notify);
|
|
|
|
if (This->property_set)
|
|
|
|
IDsDriverPropertySet_Release((PIDSDRIVERPROPERTYSET)This->property_set);
|
2003-02-15 00:59:15 +01:00
|
|
|
HeapFree(GetProcessHeap(),0,This);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsCaptureDriverBufferImpl_Lock(PIDSCDRIVERBUFFER iface,
|
|
|
|
LPVOID*ppvAudio1,LPDWORD pdwLen1,
|
|
|
|
LPVOID*ppvAudio2,LPDWORD pdwLen2,
|
|
|
|
DWORD dwWritePosition,DWORD dwWriteLen,
|
|
|
|
DWORD dwFlags)
|
|
|
|
{
|
2003-03-04 03:11:21 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverBufferImpl,iface);
|
|
|
|
FIXME("(%p,%p,%p,%p,%p,%ld,%ld,0x%08lx): stub!\n",This,ppvAudio1,pdwLen1,ppvAudio2,pdwLen2,
|
|
|
|
dwWritePosition,dwWriteLen,dwFlags);
|
|
|
|
return DS_OK;
|
2003-02-15 00:59:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsCaptureDriverBufferImpl_Unlock(PIDSCDRIVERBUFFER iface,
|
|
|
|
LPVOID pvAudio1,DWORD dwLen1,
|
|
|
|
LPVOID pvAudio2,DWORD dwLen2)
|
|
|
|
{
|
2003-03-04 03:11:21 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverBufferImpl,iface);
|
|
|
|
FIXME("(%p,%p,%ld,%p,%ld): stub!\n",This,pvAudio1,dwLen1,pvAudio2,dwLen2);
|
|
|
|
return DS_OK;
|
2003-02-15 00:59:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsCaptureDriverBufferImpl_GetPosition(PIDSCDRIVERBUFFER iface,
|
2003-03-07 21:37:25 +01:00
|
|
|
LPDWORD lpdwCapture,
|
|
|
|
LPDWORD lpdwRead)
|
2003-02-15 00:59:15 +01:00
|
|
|
{
|
2003-03-04 03:11:21 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverBufferImpl,iface);
|
|
|
|
count_info info;
|
|
|
|
DWORD ptr;
|
2003-03-07 21:37:25 +01:00
|
|
|
TRACE("(%p,%p,%p)\n",This,lpdwCapture,lpdwRead);
|
2003-03-04 03:11:21 +01:00
|
|
|
|
|
|
|
if (WInDev[This->drv->wDevID].state == WINE_WS_CLOSED) {
|
|
|
|
ERR("device not open, but accessing?\n");
|
|
|
|
return DSERR_UNINITIALIZED;
|
|
|
|
}
|
2003-03-07 21:37:25 +01:00
|
|
|
if (ioctl(WInDev[This->drv->wDevID].ossdev->fd, SNDCTL_DSP_GETIPTR, &info) < 0) {
|
2003-03-15 01:54:11 +01:00
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_GETIPTR) failed (%s)\n", WInDev[This->drv->wDevID].ossdev->dev_name, strerror(errno));
|
2003-03-04 03:11:21 +01:00
|
|
|
return DSERR_GENERIC;
|
|
|
|
}
|
|
|
|
ptr = info.ptr & ~3; /* align the pointer, just in case */
|
|
|
|
if (lpdwCapture) *lpdwCapture = ptr;
|
2003-03-07 21:37:25 +01:00
|
|
|
if (lpdwRead) {
|
2003-03-04 03:11:21 +01:00
|
|
|
/* add some safety margin (not strictly necessary, but...) */
|
2003-03-07 21:37:25 +01:00
|
|
|
if (WInDev[This->drv->wDevID].ossdev->in_caps_support & WAVECAPS_SAMPLEACCURATE)
|
|
|
|
*lpdwRead = ptr + 32;
|
2003-03-04 03:11:21 +01:00
|
|
|
else
|
2003-03-07 21:37:25 +01:00
|
|
|
*lpdwRead = ptr + WInDev[This->drv->wDevID].dwFragmentSize;
|
|
|
|
while (*lpdwRead > This->buflen)
|
|
|
|
*lpdwRead -= This->buflen;
|
2003-03-04 03:11:21 +01:00
|
|
|
}
|
2003-03-07 21:37:25 +01:00
|
|
|
TRACE("capturepos=%ld, readpos=%ld\n", lpdwCapture?*lpdwCapture:0, lpdwRead?*lpdwRead:0);
|
2003-03-04 03:11:21 +01:00
|
|
|
return DS_OK;
|
2003-02-15 00:59:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsCaptureDriverBufferImpl_GetStatus(PIDSCDRIVERBUFFER iface, LPDWORD lpdwStatus)
|
|
|
|
{
|
2003-03-04 03:11:21 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverBufferImpl,iface);
|
|
|
|
FIXME("(%p,%p): stub!\n",This,lpdwStatus);
|
2003-02-15 00:59:15 +01:00
|
|
|
return DSERR_UNSUPPORTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsCaptureDriverBufferImpl_Start(PIDSCDRIVERBUFFER iface, DWORD dwFlags)
|
|
|
|
{
|
2003-03-04 03:11:21 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverBufferImpl,iface);
|
2003-03-07 21:37:25 +01:00
|
|
|
int enable;
|
2003-03-04 03:11:21 +01:00
|
|
|
TRACE("(%p,%lx)\n",This,dwFlags);
|
2003-03-07 21:37:25 +01:00
|
|
|
WInDev[This->drv->wDevID].ossdev->bInputEnabled = TRUE;
|
|
|
|
enable = getEnables(WInDev[This->drv->wDevID].ossdev);
|
2003-03-04 03:11:21 +01:00
|
|
|
if (ioctl(WInDev[This->drv->wDevID].ossdev->fd, SNDCTL_DSP_SETTRIGGER, &enable) < 0) {
|
2003-04-30 00:54:09 +02:00
|
|
|
if (errno == EINVAL) {
|
|
|
|
/* Don't give up yet. OSS trigger support is inconsistent. */
|
|
|
|
if (WInDev[This->drv->wDevID].ossdev->open_count == 1) {
|
|
|
|
/* try the opposite output enable */
|
|
|
|
if (WInDev[This->drv->wDevID].ossdev->bOutputEnabled == FALSE)
|
|
|
|
WInDev[This->drv->wDevID].ossdev->bOutputEnabled = TRUE;
|
|
|
|
else
|
|
|
|
WInDev[This->drv->wDevID].ossdev->bOutputEnabled = FALSE;
|
|
|
|
/* try it again */
|
|
|
|
enable = getEnables(WInDev[This->drv->wDevID].ossdev);
|
|
|
|
if (ioctl(WInDev[This->drv->wDevID].ossdev->fd, SNDCTL_DSP_SETTRIGGER, &enable) >= 0)
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
}
|
2003-03-15 01:54:11 +01:00
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_SETTRIGGER) failed (%s)\n", WInDev[This->drv->wDevID].ossdev->dev_name, strerror(errno));
|
2003-03-07 21:37:25 +01:00
|
|
|
WInDev[This->drv->wDevID].ossdev->bInputEnabled = FALSE;
|
2003-03-04 03:11:21 +01:00
|
|
|
return DSERR_GENERIC;
|
|
|
|
}
|
|
|
|
return DS_OK;
|
2003-02-15 00:59:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsCaptureDriverBufferImpl_Stop(PIDSCDRIVERBUFFER iface)
|
|
|
|
{
|
2003-03-04 03:11:21 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverBufferImpl,iface);
|
2003-03-07 21:37:25 +01:00
|
|
|
int enable;
|
2003-03-04 03:11:21 +01:00
|
|
|
TRACE("(%p)\n",This);
|
|
|
|
/* no more captureing */
|
2003-03-07 21:37:25 +01:00
|
|
|
WInDev[This->drv->wDevID].ossdev->bInputEnabled = FALSE;
|
|
|
|
enable = getEnables(WInDev[This->drv->wDevID].ossdev);
|
2003-03-04 03:11:21 +01:00
|
|
|
if (ioctl(WInDev[This->drv->wDevID].ossdev->fd, SNDCTL_DSP_SETTRIGGER, &enable) < 0) {
|
2003-03-15 01:54:11 +01:00
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_SETTRIGGER) failed (%s)\n", WInDev[This->drv->wDevID].ossdev->dev_name, strerror(errno));
|
2003-03-04 03:11:21 +01:00
|
|
|
return DSERR_GENERIC;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Most OSS drivers just can't stop capturing without closing the device...
|
|
|
|
* so we need to somehow signal to our DirectSound implementation
|
|
|
|
* that it should completely recreate this HW buffer...
|
|
|
|
* this unexpected error code should do the trick... */
|
|
|
|
return DSERR_BUFFERLOST;
|
2003-02-15 00:59:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsCaptureDriverBufferImpl_SetFormat(PIDSCDRIVERBUFFER iface, LPWAVEFORMATEX pwfx)
|
|
|
|
{
|
2003-03-04 03:11:21 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverBufferImpl,iface);
|
|
|
|
FIXME("(%p): stub!\n",This);
|
2003-02-15 00:59:15 +01:00
|
|
|
return DSERR_UNSUPPORTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ICOM_VTABLE(IDsCaptureDriverBuffer) dscdbvt =
|
|
|
|
{
|
|
|
|
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
|
|
|
IDsCaptureDriverBufferImpl_QueryInterface,
|
|
|
|
IDsCaptureDriverBufferImpl_AddRef,
|
|
|
|
IDsCaptureDriverBufferImpl_Release,
|
|
|
|
IDsCaptureDriverBufferImpl_Lock,
|
|
|
|
IDsCaptureDriverBufferImpl_Unlock,
|
|
|
|
IDsCaptureDriverBufferImpl_SetFormat,
|
|
|
|
IDsCaptureDriverBufferImpl_GetPosition,
|
|
|
|
IDsCaptureDriverBufferImpl_GetStatus,
|
|
|
|
IDsCaptureDriverBufferImpl_Start,
|
|
|
|
IDsCaptureDriverBufferImpl_Stop
|
|
|
|
};
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsCaptureDriverImpl_QueryInterface(PIDSCDRIVER iface, REFIID riid, LPVOID *ppobj)
|
|
|
|
{
|
2003-03-04 03:11:21 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverImpl,iface);
|
2003-05-02 22:16:20 +02:00
|
|
|
TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppobj);
|
|
|
|
|
|
|
|
if ( IsEqualGUID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualGUID(riid, &IID_IDsCaptureDriver) ) {
|
|
|
|
IDsCaptureDriver_AddRef(iface);
|
|
|
|
*ppobj = (LPVOID)This;
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
FIXME( "Unknown IID %s\n", debugstr_guid( riid ) );
|
|
|
|
|
|
|
|
*ppobj = 0;
|
|
|
|
|
|
|
|
return E_NOINTERFACE;
|
2003-02-15 00:59:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDsCaptureDriverImpl_AddRef(PIDSCDRIVER iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsCaptureDriverImpl,iface);
|
2003-03-15 01:54:11 +01:00
|
|
|
TRACE("(%p)\n",This);
|
2003-02-15 00:59:15 +01:00
|
|
|
This->ref++;
|
2003-03-15 01:54:11 +01:00
|
|
|
TRACE("ref=%ld\n",This->ref);
|
2003-02-15 00:59:15 +01:00
|
|
|
return This->ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDsCaptureDriverImpl_Release(PIDSCDRIVER iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDsCaptureDriverImpl,iface);
|
2003-03-15 01:54:11 +01:00
|
|
|
TRACE("(%p)\n",This);
|
|
|
|
if (--This->ref) {
|
|
|
|
TRACE("ref=%ld\n",This->ref);
|
2003-02-15 00:59:15 +01:00
|
|
|
return This->ref;
|
2003-03-15 01:54:11 +01:00
|
|
|
}
|
2003-02-15 00:59:15 +01:00
|
|
|
HeapFree(GetProcessHeap(),0,This);
|
2003-03-15 01:54:11 +01:00
|
|
|
TRACE("ref=0\n");
|
2003-02-15 00:59:15 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsCaptureDriverImpl_GetDriverDesc(PIDSCDRIVER iface, PDSDRIVERDESC pDesc)
|
|
|
|
{
|
2003-03-04 03:11:21 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverImpl,iface);
|
|
|
|
TRACE("(%p,%p)\n",This,pDesc);
|
|
|
|
|
|
|
|
if (!pDesc) {
|
|
|
|
TRACE("invalid parameter\n");
|
|
|
|
return DSERR_INVALIDPARAM;
|
|
|
|
}
|
|
|
|
|
2003-03-15 01:54:11 +01:00
|
|
|
/* copy version from driver */
|
|
|
|
memcpy(pDesc, &(WInDev[This->wDevID].ossdev->ds_desc), sizeof(DSDRIVERDESC));
|
|
|
|
|
|
|
|
pDesc->dwFlags |= DSDDESC_DOMMSYSTEMOPEN | DSDDESC_DOMMSYSTEMSETFORMAT |
|
2003-03-04 03:11:21 +01:00
|
|
|
DSDDESC_USESYSTEMMEMORY | DSDDESC_DONTNEEDPRIMARYLOCK |
|
|
|
|
DSDDESC_DONTNEEDSECONDARYLOCK;
|
|
|
|
pDesc->dnDevNode = WInDev[This->wDevID].waveDesc.dnDevNode;
|
|
|
|
pDesc->wVxdId = 0;
|
|
|
|
pDesc->wReserved = 0;
|
|
|
|
pDesc->ulDeviceNum = This->wDevID;
|
|
|
|
pDesc->dwHeapType = DSDHEAP_NOHEAP;
|
|
|
|
pDesc->pvDirectDrawHeap = NULL;
|
|
|
|
pDesc->dwMemStartAddress = 0;
|
|
|
|
pDesc->dwMemEndAddress = 0;
|
|
|
|
pDesc->dwMemAllocExtra = 0;
|
|
|
|
pDesc->pvReserved1 = NULL;
|
|
|
|
pDesc->pvReserved2 = NULL;
|
|
|
|
return DS_OK;
|
2003-02-15 00:59:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsCaptureDriverImpl_Open(PIDSCDRIVER iface)
|
|
|
|
{
|
2003-03-04 03:11:21 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverImpl,iface);
|
|
|
|
TRACE("(%p)\n",This);
|
|
|
|
return DS_OK;
|
2003-02-15 00:59:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsCaptureDriverImpl_Close(PIDSCDRIVER iface)
|
|
|
|
{
|
2003-03-04 03:11:21 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverImpl,iface);
|
|
|
|
TRACE("(%p)\n",This);
|
|
|
|
if (This->capture_buffer) {
|
|
|
|
ERR("problem with DirectSound: capture buffer not released\n");
|
|
|
|
return DSERR_GENERIC;
|
|
|
|
}
|
|
|
|
return DS_OK;
|
2003-02-15 00:59:15 +01:00
|
|
|
}
|
|
|
|
|
2003-03-04 03:11:21 +01:00
|
|
|
static HRESULT WINAPI IDsCaptureDriverImpl_GetCaps(PIDSCDRIVER iface, PDSCDRIVERCAPS pCaps)
|
2003-02-15 00:59:15 +01:00
|
|
|
{
|
2003-03-04 03:11:21 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverImpl,iface);
|
|
|
|
TRACE("(%p,%p)\n",This,pCaps);
|
2003-03-15 01:54:11 +01:00
|
|
|
memcpy(pCaps, &(WInDev[This->wDevID].ossdev->dsc_caps), sizeof(DSCDRIVERCAPS));
|
2003-03-04 03:11:21 +01:00
|
|
|
return DS_OK;
|
2003-02-15 00:59:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsCaptureDriverImpl_CreateCaptureBuffer(PIDSCDRIVER iface,
|
|
|
|
LPWAVEFORMATEX pwfx,
|
2003-03-04 03:11:21 +01:00
|
|
|
DWORD dwFlags,
|
|
|
|
DWORD dwCardAddress,
|
2003-02-15 00:59:15 +01:00
|
|
|
LPDWORD pdwcbBufferSize,
|
|
|
|
LPBYTE *ppbBuffer,
|
|
|
|
LPVOID *ppvObj)
|
|
|
|
{
|
2003-03-04 03:11:21 +01:00
|
|
|
ICOM_THIS(IDsCaptureDriverImpl,iface);
|
|
|
|
IDsCaptureDriverBufferImpl** ippdscdb = (IDsCaptureDriverBufferImpl**)ppvObj;
|
|
|
|
HRESULT err;
|
|
|
|
audio_buf_info info;
|
2003-03-07 21:37:25 +01:00
|
|
|
int enable;
|
2003-03-04 03:11:21 +01:00
|
|
|
TRACE("(%p,%p,%lx,%lx,%p,%p,%p)\n",This,pwfx,dwFlags,dwCardAddress,pdwcbBufferSize,ppbBuffer,ppvObj);
|
|
|
|
|
|
|
|
if (This->capture_buffer) {
|
|
|
|
TRACE("already allocated\n");
|
|
|
|
return DSERR_ALLOCATED;
|
|
|
|
}
|
|
|
|
|
2003-04-30 00:47:59 +02:00
|
|
|
*ippdscdb = (IDsCaptureDriverBufferImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDsCaptureDriverBufferImpl));
|
2003-03-04 03:11:21 +01:00
|
|
|
if (*ippdscdb == NULL) {
|
|
|
|
TRACE("out of memory\n");
|
|
|
|
return DSERR_OUTOFMEMORY;
|
|
|
|
}
|
|
|
|
|
2003-04-10 20:17:34 +02:00
|
|
|
(*ippdscdb)->lpVtbl = &dscdbvt;
|
2003-04-30 00:47:59 +02:00
|
|
|
(*ippdscdb)->ref = 1;
|
|
|
|
(*ippdscdb)->drv = This;
|
|
|
|
(*ippdscdb)->notify = 0;
|
|
|
|
(*ippdscdb)->notify_index = 0;
|
2003-05-02 22:16:20 +02:00
|
|
|
(*ippdscdb)->property_set = 0;
|
2003-03-04 03:11:21 +01:00
|
|
|
|
|
|
|
if (WInDev[This->wDevID].state == WINE_WS_CLOSED) {
|
|
|
|
WAVEOPENDESC desc;
|
|
|
|
desc.hWave = 0;
|
|
|
|
desc.lpFormat = pwfx;
|
|
|
|
desc.dwCallback = 0;
|
|
|
|
desc.dwInstance = 0;
|
|
|
|
desc.uMappedDeviceID = 0;
|
|
|
|
desc.dnDevNode = 0;
|
|
|
|
err = widOpen(This->wDevID, &desc, dwFlags | WAVE_DIRECTSOUND);
|
|
|
|
if (err != MMSYSERR_NOERROR) {
|
|
|
|
TRACE("widOpen failed\n");
|
|
|
|
return err;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* check how big the DMA buffer is now */
|
2003-03-07 21:37:25 +01:00
|
|
|
if (ioctl(WInDev[This->wDevID].ossdev->fd, SNDCTL_DSP_GETISPACE, &info) < 0) {
|
2003-03-15 01:54:11 +01:00
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_GETISPACE) failed (%s)\n", WInDev[This->wDevID].ossdev->dev_name, strerror(errno));
|
2003-03-04 03:11:21 +01:00
|
|
|
HeapFree(GetProcessHeap(),0,*ippdscdb);
|
|
|
|
*ippdscdb = NULL;
|
|
|
|
return DSERR_GENERIC;
|
|
|
|
}
|
2004-02-13 21:44:42 +01:00
|
|
|
(*ippdscdb)->maplen = (*ippdscdb)->buflen = info.fragstotal * info.fragsize;
|
2003-03-04 03:11:21 +01:00
|
|
|
|
|
|
|
/* map the DMA buffer */
|
2004-02-13 21:44:42 +01:00
|
|
|
err = DSCDB_MapBuffer(*ippdscdb);
|
2003-03-04 03:11:21 +01:00
|
|
|
if (err != DS_OK) {
|
|
|
|
HeapFree(GetProcessHeap(),0,*ippdscdb);
|
|
|
|
*ippdscdb = NULL;
|
|
|
|
return err;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* capture buffer is ready to go */
|
2004-02-13 21:44:42 +01:00
|
|
|
*pdwcbBufferSize = (*ippdscdb)->maplen;
|
|
|
|
*ppbBuffer = (*ippdscdb)->mapping;
|
2003-03-04 03:11:21 +01:00
|
|
|
|
|
|
|
/* some drivers need some extra nudging after mapping */
|
2003-03-07 21:37:25 +01:00
|
|
|
WInDev[This->wDevID].ossdev->bInputEnabled = FALSE;
|
|
|
|
enable = getEnables(WInDev[This->wDevID].ossdev);
|
2003-03-04 03:11:21 +01:00
|
|
|
if (ioctl(WInDev[This->wDevID].ossdev->fd, SNDCTL_DSP_SETTRIGGER, &enable) < 0) {
|
2003-03-15 01:54:11 +01:00
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_SETTRIGGER) failed (%s)\n", WInDev[This->wDevID].ossdev->dev_name, strerror(errno));
|
2003-03-04 03:11:21 +01:00
|
|
|
return DSERR_GENERIC;
|
|
|
|
}
|
|
|
|
|
|
|
|
This->capture_buffer = *ippdscdb;
|
|
|
|
|
|
|
|
return DS_OK;
|
2003-02-15 00:59:15 +01:00
|
|
|
}
|
2003-03-04 03:11:21 +01:00
|
|
|
|
2003-02-15 00:59:15 +01:00
|
|
|
static ICOM_VTABLE(IDsCaptureDriver) dscdvt =
|
|
|
|
{
|
|
|
|
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
|
|
|
IDsCaptureDriverImpl_QueryInterface,
|
|
|
|
IDsCaptureDriverImpl_AddRef,
|
|
|
|
IDsCaptureDriverImpl_Release,
|
|
|
|
IDsCaptureDriverImpl_GetDriverDesc,
|
|
|
|
IDsCaptureDriverImpl_Open,
|
|
|
|
IDsCaptureDriverImpl_Close,
|
|
|
|
IDsCaptureDriverImpl_GetCaps,
|
|
|
|
IDsCaptureDriverImpl_CreateCaptureBuffer
|
|
|
|
};
|
|
|
|
|
2004-01-20 02:47:27 +01:00
|
|
|
static HRESULT WINAPI IDsCaptureDriverPropertySetImpl_Create(
|
|
|
|
IDsCaptureDriverBufferImpl * dscdb,
|
|
|
|
IDsCaptureDriverPropertySetImpl **pdscdps)
|
|
|
|
{
|
|
|
|
IDsCaptureDriverPropertySetImpl * dscdps;
|
|
|
|
TRACE("(%p,%p)\n",dscdb,pdscdps);
|
|
|
|
|
|
|
|
dscdps = (IDsCaptureDriverPropertySetImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(dscdps));
|
|
|
|
if (dscdps == NULL) {
|
|
|
|
WARN("out of memory\n");
|
|
|
|
return DSERR_OUTOFMEMORY;
|
|
|
|
}
|
|
|
|
|
|
|
|
dscdps->ref = 0;
|
|
|
|
dscdps->lpVtbl = &dscdpsvt;
|
|
|
|
dscdps->capture_buffer = dscdb;
|
|
|
|
dscdb->property_set = dscdps;
|
|
|
|
IDsCaptureDriverBuffer_AddRef((PIDSCDRIVER)dscdb);
|
|
|
|
|
|
|
|
*pdscdps = dscdps;
|
|
|
|
return DS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDsCaptureDriverNotifyImpl_Create(
|
|
|
|
IDsCaptureDriverBufferImpl * dscdb,
|
|
|
|
IDsCaptureDriverNotifyImpl **pdscdn)
|
|
|
|
{
|
|
|
|
IDsCaptureDriverNotifyImpl * dscdn;
|
|
|
|
TRACE("(%p,%p)\n",dscdb,pdscdn);
|
|
|
|
|
|
|
|
dscdn = (IDsCaptureDriverNotifyImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(dscdn));
|
|
|
|
if (dscdn == NULL) {
|
|
|
|
WARN("out of memory\n");
|
|
|
|
return DSERR_OUTOFMEMORY;
|
|
|
|
}
|
|
|
|
|
|
|
|
dscdn->ref = 0;
|
|
|
|
dscdn->lpVtbl = &dscdnvt;
|
|
|
|
dscdn->capture_buffer = dscdb;
|
|
|
|
dscdb->notify = dscdn;
|
|
|
|
IDsCaptureDriverBuffer_AddRef((PIDSCDRIVER)dscdb);
|
|
|
|
|
|
|
|
*pdscdn = dscdn;
|
|
|
|
return DS_OK;
|
|
|
|
};
|
|
|
|
|
2003-02-15 00:59:15 +01:00
|
|
|
static DWORD widDsCreate(UINT wDevID, PIDSCDRIVER* drv)
|
|
|
|
{
|
|
|
|
IDsCaptureDriverImpl** idrv = (IDsCaptureDriverImpl**)drv;
|
|
|
|
TRACE("(%d,%p)\n",wDevID,drv);
|
|
|
|
|
|
|
|
/* the HAL isn't much better than the HEL if we can't do mmap() */
|
|
|
|
if (!(WInDev[wDevID].ossdev->in_caps_support & WAVECAPS_DIRECTSOUND)) {
|
|
|
|
ERR("DirectSoundCapture flag not set\n");
|
|
|
|
MESSAGE("This sound card's driver does not support direct access\n");
|
|
|
|
MESSAGE("The (slower) DirectSound HEL mode will be used instead.\n");
|
|
|
|
return MMSYSERR_NOTSUPPORTED;
|
|
|
|
}
|
|
|
|
|
2003-04-30 00:47:59 +02:00
|
|
|
*idrv = (IDsCaptureDriverImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDsCaptureDriverImpl));
|
2003-02-15 00:59:15 +01:00
|
|
|
if (!*idrv)
|
|
|
|
return MMSYSERR_NOMEM;
|
2003-04-10 20:17:34 +02:00
|
|
|
(*idrv)->lpVtbl = &dscdvt;
|
2003-02-15 00:59:15 +01:00
|
|
|
(*idrv)->ref = 1;
|
|
|
|
|
|
|
|
(*idrv)->wDevID = wDevID;
|
|
|
|
(*idrv)->capture_buffer = NULL;
|
|
|
|
return MMSYSERR_NOERROR;
|
|
|
|
}
|
|
|
|
|
2003-03-15 01:54:11 +01:00
|
|
|
static DWORD widDsDesc(UINT wDevID, PDSDRIVERDESC desc)
|
|
|
|
{
|
|
|
|
memcpy(desc, &(WInDev[wDevID].ossdev->ds_desc), sizeof(DSDRIVERDESC));
|
|
|
|
return MMSYSERR_NOERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD widDsGuid(UINT wDevID, LPGUID pGuid)
|
|
|
|
{
|
|
|
|
TRACE("(%d,%p)\n",wDevID,pGuid);
|
|
|
|
|
|
|
|
memcpy(pGuid, &(WInDev[wDevID].ossdev->dsc_guid), sizeof(GUID));
|
|
|
|
|
|
|
|
return MMSYSERR_NOERROR;
|
|
|
|
}
|
|
|
|
|
1998-01-18 19:01:49 +01:00
|
|
|
#else /* !HAVE_OSS */
|
|
|
|
|
|
|
|
/**************************************************************************
|
2001-07-11 20:56:41 +02:00
|
|
|
* wodMessage (WINEOSS.7)
|
1998-01-18 19:01:49 +01:00
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
DWORD WINAPI OSS_wodMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
1999-09-22 18:45:33 +02:00
|
|
|
DWORD dwParam1, DWORD dwParam2)
|
1998-01-18 19:01:49 +01:00
|
|
|
{
|
1999-05-24 10:19:48 +02:00
|
|
|
FIXME("(%u, %04X, %08lX, %08lX, %08lX):stub\n", wDevID, wMsg, dwUser, dwParam1, dwParam2);
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOTENABLED;
|
1998-01-18 19:01:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
2001-07-11 20:56:41 +02:00
|
|
|
* widMessage (WINEOSS.6)
|
1998-01-18 19:01:49 +01:00
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
DWORD WINAPI OSS_widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
1999-09-22 18:45:33 +02:00
|
|
|
DWORD dwParam1, DWORD dwParam2)
|
1998-01-18 19:01:49 +01:00
|
|
|
{
|
1999-05-24 10:19:48 +02:00
|
|
|
FIXME("(%u, %04X, %08lX, %08lX, %08lX):stub\n", wDevID, wMsg, dwUser, dwParam1, dwParam2);
|
1998-10-11 16:14:24 +02:00
|
|
|
return MMSYSERR_NOTENABLED;
|
|
|
|
}
|
|
|
|
|
1998-01-18 19:01:49 +01:00
|
|
|
#endif /* HAVE_OSS */
|