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
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, 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
|
|
|
|
2002-08-26 23:49:42 +02:00
|
|
|
/* 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
|
2005-03-04 13:38:36 +01:00
|
|
|
#ifdef HAVE_POLL_H
|
|
|
|
#include <poll.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"
|
2004-12-06 21:55:25 +01:00
|
|
|
#include "winuser.h"
|
|
|
|
#include "winnls.h"
|
2000-06-24 14:55:33 +02:00
|
|
|
#include "winerror.h"
|
1999-09-05 18:44:38 +02:00
|
|
|
#include "mmddk.h"
|
2004-08-16 23:09:52 +02:00
|
|
|
#include "mmreg.h"
|
2000-06-24 14:55:33 +02:00
|
|
|
#include "dsound.h"
|
2004-08-16 23:09:52 +02:00
|
|
|
#include "ks.h"
|
|
|
|
#include "ksguid.h"
|
|
|
|
#include "ksmedia.h"
|
2007-08-16 18:39:29 +02:00
|
|
|
#include "initguid.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
|
|
|
|
2004-10-27 00:04:55 +02:00
|
|
|
#include "audio.h"
|
|
|
|
|
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
|
|
|
|
2004-10-27 00:04:55 +02:00
|
|
|
WINE_WAVEOUT WOutDev[MAX_WAVEDRV];
|
|
|
|
WINE_WAVEIN WInDev[MAX_WAVEDRV];
|
|
|
|
unsigned numOutDev;
|
|
|
|
unsigned numInDev;
|
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
|
|
|
*/
|
|
|
|
|
2001-11-09 21:26:59 +01:00
|
|
|
/* These strings used only for tracing */
|
2004-08-18 02:30:01 +02:00
|
|
|
static const char * getCmdString(enum win_wm_message msg)
|
|
|
|
{
|
|
|
|
static char unknown[32];
|
|
|
|
#define MSG_TO_STR(x) case x: return #x
|
|
|
|
switch(msg) {
|
|
|
|
MSG_TO_STR(WINE_WM_PAUSING);
|
|
|
|
MSG_TO_STR(WINE_WM_RESTARTING);
|
|
|
|
MSG_TO_STR(WINE_WM_RESETTING);
|
|
|
|
MSG_TO_STR(WINE_WM_HEADER);
|
|
|
|
MSG_TO_STR(WINE_WM_UPDATE);
|
|
|
|
MSG_TO_STR(WINE_WM_BREAKLOOP);
|
|
|
|
MSG_TO_STR(WINE_WM_CLOSING);
|
|
|
|
MSG_TO_STR(WINE_WM_STARTING);
|
|
|
|
MSG_TO_STR(WINE_WM_STOPPING);
|
|
|
|
}
|
|
|
|
#undef MSG_TO_STR
|
|
|
|
sprintf(unknown, "UNKNOWN(0x%08x)", msg);
|
|
|
|
return unknown;
|
2004-12-06 21:55:25 +01:00
|
|
|
}
|
2000-06-24 14:55:33 +02:00
|
|
|
|
2004-10-27 00:04:55 +02:00
|
|
|
int getEnables(OSS_DEVICE *ossdev)
|
2003-03-07 21:37:25 +01:00
|
|
|
{
|
2004-04-13 00:01:47 +02:00
|
|
|
return ( (ossdev->bOutputEnabled ? PCM_ENABLE_OUTPUT : 0) |
|
2003-03-07 21:37:25 +01:00
|
|
|
(ossdev->bInputEnabled ? PCM_ENABLE_INPUT : 0) );
|
|
|
|
}
|
|
|
|
|
2004-07-06 20:43:57 +02:00
|
|
|
static const char * getMessage(UINT msg)
|
|
|
|
{
|
|
|
|
static char unknown[32];
|
|
|
|
#define MSG_TO_STR(x) case x: return #x
|
|
|
|
switch(msg) {
|
|
|
|
MSG_TO_STR(DRVM_INIT);
|
|
|
|
MSG_TO_STR(DRVM_EXIT);
|
|
|
|
MSG_TO_STR(DRVM_ENABLE);
|
|
|
|
MSG_TO_STR(DRVM_DISABLE);
|
|
|
|
MSG_TO_STR(WIDM_OPEN);
|
|
|
|
MSG_TO_STR(WIDM_CLOSE);
|
|
|
|
MSG_TO_STR(WIDM_ADDBUFFER);
|
|
|
|
MSG_TO_STR(WIDM_PREPARE);
|
|
|
|
MSG_TO_STR(WIDM_UNPREPARE);
|
|
|
|
MSG_TO_STR(WIDM_GETDEVCAPS);
|
|
|
|
MSG_TO_STR(WIDM_GETNUMDEVS);
|
|
|
|
MSG_TO_STR(WIDM_GETPOS);
|
|
|
|
MSG_TO_STR(WIDM_RESET);
|
|
|
|
MSG_TO_STR(WIDM_START);
|
|
|
|
MSG_TO_STR(WIDM_STOP);
|
|
|
|
MSG_TO_STR(WODM_OPEN);
|
|
|
|
MSG_TO_STR(WODM_CLOSE);
|
|
|
|
MSG_TO_STR(WODM_WRITE);
|
|
|
|
MSG_TO_STR(WODM_PAUSE);
|
|
|
|
MSG_TO_STR(WODM_GETPOS);
|
|
|
|
MSG_TO_STR(WODM_BREAKLOOP);
|
|
|
|
MSG_TO_STR(WODM_PREPARE);
|
|
|
|
MSG_TO_STR(WODM_UNPREPARE);
|
|
|
|
MSG_TO_STR(WODM_GETDEVCAPS);
|
|
|
|
MSG_TO_STR(WODM_GETNUMDEVS);
|
|
|
|
MSG_TO_STR(WODM_GETPITCH);
|
|
|
|
MSG_TO_STR(WODM_SETPITCH);
|
|
|
|
MSG_TO_STR(WODM_GETPLAYBACKRATE);
|
|
|
|
MSG_TO_STR(WODM_SETPLAYBACKRATE);
|
|
|
|
MSG_TO_STR(WODM_GETVOLUME);
|
|
|
|
MSG_TO_STR(WODM_SETVOLUME);
|
|
|
|
MSG_TO_STR(WODM_RESTART);
|
|
|
|
MSG_TO_STR(WODM_RESET);
|
|
|
|
MSG_TO_STR(DRV_QUERYDEVICEINTERFACESIZE);
|
|
|
|
MSG_TO_STR(DRV_QUERYDEVICEINTERFACE);
|
|
|
|
MSG_TO_STR(DRV_QUERYDSOUNDIFACE);
|
|
|
|
MSG_TO_STR(DRV_QUERYDSOUNDDESC);
|
|
|
|
}
|
2004-08-18 02:30:01 +02:00
|
|
|
#undef MSG_TO_STR
|
2004-07-06 20:43:57 +02:00
|
|
|
sprintf(unknown, "UNKNOWN(0x%04x)", msg);
|
|
|
|
return unknown;
|
|
|
|
}
|
|
|
|
|
2005-05-29 22:02:58 +02:00
|
|
|
static DWORD wodDevInterfaceSize(UINT wDevID, LPDWORD dwParam1)
|
2003-10-28 01:15:16 +01:00
|
|
|
{
|
|
|
|
TRACE("(%u, %p)\n", wDevID, dwParam1);
|
|
|
|
|
2007-10-01 09:16:59 +02:00
|
|
|
*dwParam1 = MultiByteToWideChar(CP_ACP, 0, WOutDev[wDevID].ossdev.interface_name, -1,
|
2003-10-28 01:15:16 +01:00
|
|
|
NULL, 0 ) * sizeof(WCHAR);
|
|
|
|
return MMSYSERR_NOERROR;
|
|
|
|
}
|
|
|
|
|
2005-05-29 22:02:58 +02:00
|
|
|
static DWORD wodDevInterface(UINT wDevID, PWCHAR dwParam1, DWORD dwParam2)
|
2003-10-28 01:15:16 +01:00
|
|
|
{
|
2007-10-01 09:16:59 +02:00
|
|
|
if (dwParam2 >= MultiByteToWideChar(CP_ACP, 0, WOutDev[wDevID].ossdev.interface_name, -1,
|
2003-10-28 01:15:16 +01:00
|
|
|
NULL, 0 ) * sizeof(WCHAR))
|
|
|
|
{
|
2007-10-01 09:16:59 +02:00
|
|
|
MultiByteToWideChar(CP_ACP, 0, WOutDev[wDevID].ossdev.interface_name, -1,
|
2005-05-29 22:02:58 +02:00
|
|
|
dwParam1, dwParam2 / sizeof(WCHAR));
|
|
|
|
return MMSYSERR_NOERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
return MMSYSERR_INVALPARAM;
|
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD widDevInterfaceSize(UINT wDevID, LPDWORD dwParam1)
|
|
|
|
{
|
|
|
|
TRACE("(%u, %p)\n", wDevID, dwParam1);
|
|
|
|
|
2007-10-01 09:16:59 +02:00
|
|
|
*dwParam1 = MultiByteToWideChar(CP_ACP, 0, WInDev[wDevID].ossdev.interface_name, -1,
|
2005-05-29 22:02:58 +02:00
|
|
|
NULL, 0 ) * sizeof(WCHAR);
|
|
|
|
return MMSYSERR_NOERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD widDevInterface(UINT wDevID, PWCHAR dwParam1, DWORD dwParam2)
|
|
|
|
{
|
2007-10-01 09:16:59 +02:00
|
|
|
if (dwParam2 >= MultiByteToWideChar(CP_ACP, 0, WInDev[wDevID].ossdev.interface_name, -1,
|
2005-05-29 22:02:58 +02:00
|
|
|
NULL, 0 ) * sizeof(WCHAR))
|
|
|
|
{
|
2007-10-01 09:16:59 +02:00
|
|
|
MultiByteToWideChar(CP_ACP, 0, WInDev[wDevID].ossdev.interface_name, -1,
|
2003-10-28 01:15:16 +01:00
|
|
|
dwParam1, dwParam2 / sizeof(WCHAR));
|
|
|
|
return MMSYSERR_NOERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
return MMSYSERR_INVALPARAM;
|
|
|
|
}
|
|
|
|
|
2004-07-24 01:01:21 +02:00
|
|
|
static DWORD bytes_to_mmtime(LPMMTIME lpTime, DWORD position,
|
2004-08-16 23:09:52 +02:00
|
|
|
WAVEFORMATPCMEX* format)
|
2004-07-24 01:01:21 +02:00
|
|
|
{
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("wType=%04X wBitsPerSample=%u nSamplesPerSec=%u nChannels=%u nAvgBytesPerSec=%u\n",
|
2004-08-16 23:09:52 +02:00
|
|
|
lpTime->wType, format->Format.wBitsPerSample, format->Format.nSamplesPerSec,
|
|
|
|
format->Format.nChannels, format->Format.nAvgBytesPerSec);
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("Position in bytes=%u\n", position);
|
2004-07-24 01:01:21 +02:00
|
|
|
|
|
|
|
switch (lpTime->wType) {
|
|
|
|
case TIME_SAMPLES:
|
2004-08-16 23:09:52 +02:00
|
|
|
lpTime->u.sample = position / (format->Format.wBitsPerSample / 8 * format->Format.nChannels);
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("TIME_SAMPLES=%u\n", lpTime->u.sample);
|
2004-07-24 01:01:21 +02:00
|
|
|
break;
|
|
|
|
case TIME_MS:
|
2004-08-16 23:09:52 +02:00
|
|
|
lpTime->u.ms = 1000.0 * position / (format->Format.wBitsPerSample / 8 * format->Format.nChannels * format->Format.nSamplesPerSec);
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("TIME_MS=%u\n", lpTime->u.ms);
|
2004-07-24 01:01:21 +02:00
|
|
|
break;
|
|
|
|
case TIME_SMPTE:
|
2005-02-23 16:40:54 +01:00
|
|
|
lpTime->u.smpte.fps = 30;
|
2004-08-16 23:09:52 +02:00
|
|
|
position = position / (format->Format.wBitsPerSample / 8 * format->Format.nChannels);
|
2005-02-23 16:40:54 +01:00
|
|
|
position += (format->Format.nSamplesPerSec / lpTime->u.smpte.fps) - 1; /* round up */
|
2004-08-16 23:09:52 +02:00
|
|
|
lpTime->u.smpte.sec = position / format->Format.nSamplesPerSec;
|
|
|
|
position -= lpTime->u.smpte.sec * format->Format.nSamplesPerSec;
|
2004-07-24 01:01:21 +02:00
|
|
|
lpTime->u.smpte.min = lpTime->u.smpte.sec / 60;
|
|
|
|
lpTime->u.smpte.sec -= 60 * lpTime->u.smpte.min;
|
|
|
|
lpTime->u.smpte.hour = lpTime->u.smpte.min / 60;
|
|
|
|
lpTime->u.smpte.min -= 60 * lpTime->u.smpte.hour;
|
|
|
|
lpTime->u.smpte.fps = 30;
|
2004-08-16 23:09:52 +02:00
|
|
|
lpTime->u.smpte.frame = position * lpTime->u.smpte.fps / format->Format.nSamplesPerSec;
|
2004-07-24 01:01:21 +02:00
|
|
|
TRACE("TIME_SMPTE=%02u:%02u:%02u:%02u\n",
|
|
|
|
lpTime->u.smpte.hour, lpTime->u.smpte.min,
|
|
|
|
lpTime->u.smpte.sec, lpTime->u.smpte.frame);
|
|
|
|
break;
|
|
|
|
default:
|
2004-12-20 20:08:18 +01:00
|
|
|
WARN("Format %d not supported, using TIME_BYTES !\n", lpTime->wType);
|
2004-07-24 01:01:21 +02:00
|
|
|
lpTime->wType = TIME_BYTES;
|
|
|
|
/* fall through */
|
|
|
|
case TIME_BYTES:
|
|
|
|
lpTime->u.cb = position;
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("TIME_BYTES=%u\n", lpTime->u.cb);
|
2004-07-24 01:01:21 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
return MMSYSERR_NOERROR;
|
|
|
|
}
|
|
|
|
|
2004-08-16 23:09:52 +02:00
|
|
|
static BOOL supportedFormat(LPWAVEFORMATEX wf)
|
|
|
|
{
|
|
|
|
TRACE("(%p)\n",wf);
|
|
|
|
|
|
|
|
if (wf->nSamplesPerSec<DSBFREQUENCY_MIN||wf->nSamplesPerSec>DSBFREQUENCY_MAX)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
if (wf->wFormatTag == WAVE_FORMAT_PCM) {
|
2005-05-30 13:12:07 +02:00
|
|
|
if (wf->nChannels >= 1 && wf->nChannels <= MAX_CHANNELS) {
|
2004-08-19 03:10:36 +02:00
|
|
|
if (wf->wBitsPerSample==8||wf->wBitsPerSample==16)
|
2004-08-16 23:09:52 +02:00
|
|
|
return TRUE;
|
|
|
|
}
|
2004-08-19 03:10:36 +02:00
|
|
|
} else if (wf->wFormatTag == WAVE_FORMAT_EXTENSIBLE) {
|
|
|
|
WAVEFORMATEXTENSIBLE * wfex = (WAVEFORMATEXTENSIBLE *)wf;
|
|
|
|
|
2004-08-16 23:09:52 +02:00
|
|
|
if (wf->cbSize == 22 && IsEqualGUID(&wfex->SubFormat, &KSDATAFORMAT_SUBTYPE_PCM)) {
|
2005-05-30 13:12:07 +02:00
|
|
|
if (wf->nChannels >=1 && wf->nChannels <= MAX_CHANNELS) {
|
2004-08-19 03:10:36 +02:00
|
|
|
if (wf->wBitsPerSample==wfex->Samples.wValidBitsPerSample) {
|
|
|
|
if (wf->wBitsPerSample==8||wf->wBitsPerSample==16)
|
|
|
|
return TRUE;
|
|
|
|
} else
|
|
|
|
WARN("wBitsPerSample != wValidBitsPerSample not supported yet\n");
|
2004-08-16 23:09:52 +02:00
|
|
|
}
|
2004-08-19 03:10:36 +02:00
|
|
|
} else
|
|
|
|
WARN("only KSDATAFORMAT_SUBTYPE_PCM supported\n");
|
|
|
|
} else
|
|
|
|
WARN("only WAVE_FORMAT_PCM and WAVE_FORMAT_EXTENSIBLE supported\n");
|
2004-08-16 23:09:52 +02:00
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2004-10-27 00:04:55 +02:00
|
|
|
void copy_format(LPWAVEFORMATEX wf1, LPWAVEFORMATPCMEX wf2)
|
2004-08-16 23:09:52 +02:00
|
|
|
{
|
|
|
|
ZeroMemory(wf2, sizeof(wf2));
|
|
|
|
if (wf1->wFormatTag == WAVE_FORMAT_PCM)
|
|
|
|
memcpy(wf2, wf1, sizeof(PCMWAVEFORMAT));
|
|
|
|
else if (wf1->wFormatTag == WAVE_FORMAT_EXTENSIBLE)
|
|
|
|
memcpy(wf2, wf1, sizeof(WAVEFORMATPCMEX));
|
|
|
|
else
|
|
|
|
memcpy(wf2, wf1, sizeof(WAVEFORMATEX) + wf1->cbSize);
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
2004-03-29 22:27:50 +02:00
|
|
|
TRACE("open_access=%s\n",
|
|
|
|
ossdev->open_access == O_RDONLY ? "O_RDONLY" :
|
|
|
|
ossdev->open_access == O_WRONLY ? "O_WRONLY" :
|
|
|
|
ossdev->open_access == O_RDWR ? "O_RDWR" : "Unknown");
|
|
|
|
|
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) {
|
2004-07-14 23:44:50 +02:00
|
|
|
WARN("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
|
|
|
}
|
|
|
|
|
2005-05-30 13:12:07 +02:00
|
|
|
/* First size and channels 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
|
|
|
}
|
2005-05-30 13:12:07 +02:00
|
|
|
if (ossdev->channels>=0)
|
2002-10-07 20:23:40 +02:00
|
|
|
{
|
2005-05-30 13:12:07 +02:00
|
|
|
val = ossdev->channels;
|
|
|
|
rc = ioctl(fd, SNDCTL_DSP_CHANNELS, &ossdev->channels);
|
|
|
|
if (rc != 0 || val != ossdev->channels) {
|
|
|
|
TRACE("Can't set channels to %u (returned %d)\n", val, ossdev->channels);
|
2003-01-08 00:08:05 +01:00
|
|
|
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
|
|
|
|
2007-08-08 00:19:14 +02:00
|
|
|
ossdev->bOutputEnabled = TRUE; /* OSS enables by default */
|
|
|
|
ossdev->bInputEnabled = TRUE; /* OSS enables by default */
|
|
|
|
if (ossdev->open_access == O_RDONLY)
|
|
|
|
ossdev->bOutputEnabled = FALSE;
|
|
|
|
if (ossdev->open_access == O_WRONLY)
|
|
|
|
ossdev->bInputEnabled = FALSE;
|
|
|
|
|
2003-03-15 01:54:11 +01:00
|
|
|
if (ossdev->bTriggerSupport) {
|
|
|
|
int trigger;
|
2007-08-08 00:19:14 +02:00
|
|
|
trigger = getEnables(ossdev);
|
2005-03-02 11:12:35 +01:00
|
|
|
/* If we do not have full duplex, but they opened RDWR
|
|
|
|
** (as you have to in order for an mmap to succeed)
|
|
|
|
** then we start out with input off
|
|
|
|
*/
|
|
|
|
if (ossdev->open_access == O_RDWR && !ossdev->full_duplex &&
|
|
|
|
ossdev->bInputEnabled && ossdev->bOutputEnabled) {
|
|
|
|
ossdev->bInputEnabled = FALSE;
|
|
|
|
trigger &= ~PCM_ENABLE_INPUT;
|
|
|
|
ioctl(fd, SNDCTL_DSP_SETTRIGGER, &trigger);
|
|
|
|
}
|
2003-03-15 01:54:11 +01:00
|
|
|
}
|
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...
|
|
|
|
*/
|
2004-10-27 00:04:55 +02:00
|
|
|
DWORD OSS_OpenDevice(OSS_DEVICE* ossdev, unsigned req_access,
|
2003-01-08 00:08:05 +01:00
|
|
|
int* frag, int strict_format,
|
2005-05-30 13:12:07 +02:00
|
|
|
int sample_rate, int channels, int fmt)
|
2001-12-21 21:28:43 +01:00
|
|
|
{
|
2002-10-09 22:37:09 +02:00
|
|
|
DWORD ret;
|
2004-05-20 03:16:10 +02:00
|
|
|
DWORD open_access;
|
2005-05-30 13:12:07 +02:00
|
|
|
TRACE("(%p,%u,%p,%d,%d,%d,%x)\n",ossdev,req_access,frag,strict_format,sample_rate,channels,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))
|
2004-05-20 03:16:10 +02:00
|
|
|
{
|
|
|
|
TRACE("Opening RDWR because full_duplex=%d and req_access=%d\n",
|
|
|
|
ossdev->full_duplex,req_access);
|
|
|
|
open_access = O_RDWR;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
open_access=req_access;
|
|
|
|
}
|
2002-06-28 19:31:31 +02:00
|
|
|
|
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;
|
2005-05-30 13:12:07 +02:00
|
|
|
ossdev->channels = channels;
|
2002-06-28 19:31:31 +02:00
|
|
|
ossdev->format = fmt;
|
2004-05-20 03:16:10 +02:00
|
|
|
ossdev->open_access = open_access;
|
2002-06-28 19:31:31 +02:00
|
|
|
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;
|
2004-05-20 03:16:10 +02:00
|
|
|
if (ossdev->full_duplex && ossdev->bTriggerSupport &&
|
|
|
|
(req_access == O_RDONLY || req_access == O_WRONLY))
|
|
|
|
{
|
|
|
|
int enable;
|
|
|
|
if (req_access == O_WRONLY)
|
|
|
|
ossdev->bInputEnabled=0;
|
|
|
|
else
|
|
|
|
ossdev->bOutputEnabled=0;
|
|
|
|
enable = getEnables(ossdev);
|
|
|
|
TRACE("Calling SNDCTL_DSP_SETTRIGGER with %x\n",enable);
|
|
|
|
if (ioctl(ossdev->fd, SNDCTL_DSP_SETTRIGGER, &enable) < 0)
|
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_SETTRIGGER, %d) failed (%s)\n",ossdev->dev_name, enable, strerror(errno));
|
|
|
|
}
|
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 */
|
2004-05-20 03:16:10 +02:00
|
|
|
if (ossdev->open_access != open_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 ||
|
2005-05-30 13:12:07 +02:00
|
|
|
ossdev->channels != channels ||
|
2002-06-28 19:31:31 +02:00
|
|
|
ossdev->format != fmt)
|
|
|
|
{
|
2004-04-13 00:01:47 +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"
|
2005-05-30 13:12:07 +02:00
|
|
|
"audio_frag(%x/%x) sample_rate(%d/%d) channels(%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,
|
2005-05-30 13:12:07 +02:00
|
|
|
ossdev->channels, channels,
|
2002-06-28 19:31:31 +02:00
|
|
|
ossdev->format, fmt);
|
|
|
|
return WAVERR_BADFORMAT;
|
|
|
|
}
|
2003-04-10 20:33:46 +02:00
|
|
|
/* check if the fragment sizes are the same */
|
2005-10-03 12:16:32 +02:00
|
|
|
if (ossdev->audio_fragment != (frag ? *frag : 0) )
|
|
|
|
{
|
2003-04-10 20:33:46 +02:00
|
|
|
ERR("FullDuplex: Playback and Capture hardware acceleration levels are different.\n"
|
2005-10-03 12:16:32 +02:00
|
|
|
"Please run winecfg, open \"Audio\" page and set\n"
|
|
|
|
"\"Hardware Acceleration\" to \"Emulation\".\n");
|
2003-04-10 20:33:46 +02:00
|
|
|
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
|
|
|
}
|
2004-05-20 03:16:10 +02:00
|
|
|
if (ossdev->full_duplex && ossdev->bTriggerSupport &&
|
|
|
|
(req_access == O_RDONLY || req_access == O_WRONLY))
|
|
|
|
{
|
|
|
|
int enable;
|
|
|
|
if (req_access == O_WRONLY)
|
|
|
|
ossdev->bOutputEnabled=1;
|
|
|
|
else
|
|
|
|
ossdev->bInputEnabled=1;
|
|
|
|
enable = getEnables(ossdev);
|
|
|
|
TRACE("Calling SNDCTL_DSP_SETTRIGGER with %x\n",enable);
|
|
|
|
if (ioctl(ossdev->fd, SNDCTL_DSP_SETTRIGGER, &enable) < 0)
|
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_SETTRIGGER, %d) failed (%s)\n",ossdev->dev_name, enable, strerror(errno));
|
|
|
|
}
|
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
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
2004-10-27 00:04:55 +02:00
|
|
|
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
|
|
|
{
|
2004-12-06 21:55:25 +01:00
|
|
|
fcntl(ossdev->fd, F_SETFL, fcntl(ossdev->fd, F_GETFL) & ~O_NDELAY);
|
|
|
|
/* reset the device before we close it in case it is in a bad state */
|
|
|
|
ioctl(ossdev->fd, SNDCTL_DSP_RESET, 0);
|
|
|
|
if (close(ossdev->fd) != 0) FIXME("Cannot close %d: %s\n", ossdev->fd, strerror(errno));
|
2002-12-10 20:06:51 +01:00
|
|
|
}
|
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
|
2004-04-13 00:01:47 +02:00
|
|
|
* 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) {
|
2004-04-13 00:01:47 +02:00
|
|
|
if (ioctl(ossdev->fd, SNDCTL_DSP_RESET, NULL) == -1)
|
2003-03-07 21:37:25 +01:00
|
|
|
{
|
|
|
|
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);
|
2004-04-13 00:01:47 +02:00
|
|
|
} else
|
2003-03-07 21:37:25 +01:00
|
|
|
WARN("Not resetting device because it is in full duplex mode!\n");
|
2004-04-13 00:01:47 +02:00
|
|
|
|
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
|
|
|
|
2004-12-06 21:55:25 +01:00
|
|
|
static const int win_std_oss_fmts[2]={AFMT_U8,AFMT_S16_LE};
|
|
|
|
static const int win_std_rates[5]={96000,48000,44100,22050,11025};
|
|
|
|
static const int win_std_formats[2][2][5]=
|
2003-01-11 23:47:51 +01:00
|
|
|
{{{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}},
|
|
|
|
};
|
|
|
|
|
2004-03-29 22:27:50 +02:00
|
|
|
static void OSS_Info(int fd)
|
|
|
|
{
|
|
|
|
/* 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, oss_caps;
|
|
|
|
if (ioctl(fd, SNDCTL_DSP_GETFMTS, &oss_mask) >= 0) {
|
|
|
|
TRACE("Formats=%08x ( ", oss_mask);
|
|
|
|
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 ");
|
|
|
|
#ifdef AFMT_AC3
|
|
|
|
if (oss_mask & AFMT_AC3) TRACE("AFMT_AC3 ");
|
|
|
|
#endif
|
|
|
|
#ifdef AFMT_VORBIS
|
|
|
|
if (oss_mask & AFMT_VORBIS) TRACE("AFMT_VORBIS ");
|
|
|
|
#endif
|
|
|
|
#ifdef AFMT_S32_LE
|
|
|
|
if (oss_mask & AFMT_S32_LE) TRACE("AFMT_S32_LE ");
|
|
|
|
#endif
|
|
|
|
#ifdef AFMT_S32_BE
|
|
|
|
if (oss_mask & AFMT_S32_BE) TRACE("AFMT_S32_BE ");
|
|
|
|
#endif
|
|
|
|
#ifdef AFMT_FLOAT
|
|
|
|
if (oss_mask & AFMT_FLOAT) TRACE("AFMT_FLOAT ");
|
|
|
|
#endif
|
|
|
|
#ifdef AFMT_S24_LE
|
|
|
|
if (oss_mask & AFMT_S24_LE) TRACE("AFMT_S24_LE ");
|
|
|
|
#endif
|
2004-04-13 00:01:47 +02:00
|
|
|
#ifdef AFMT_S24_BE
|
2004-03-29 22:27:50 +02:00
|
|
|
if (oss_mask & AFMT_S24_BE) TRACE("AFMT_S24_BE ");
|
|
|
|
#endif
|
|
|
|
#ifdef AFMT_SPDIF_RAW
|
|
|
|
if (oss_mask & AFMT_SPDIF_RAW) TRACE("AFMT_SPDIF_RAW ");
|
|
|
|
#endif
|
|
|
|
TRACE(")\n");
|
|
|
|
}
|
|
|
|
if (ioctl(fd, SNDCTL_DSP_GETCAPS, &oss_caps) >= 0) {
|
|
|
|
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
|
|
|
|
#ifdef DSP_CAP_BIND
|
|
|
|
TRACE("\tBind: %s\n", oss_caps & DSP_CAP_BIND ? "true" : "false");
|
|
|
|
#endif
|
|
|
|
#ifdef DSP_CAP_INPUT
|
|
|
|
TRACE("\tInput: %s\n", oss_caps & DSP_CAP_INPUT ? "true" : "false");
|
|
|
|
#endif
|
|
|
|
#ifdef DSP_CAP_OUTPUT
|
|
|
|
TRACE("\tOutput: %s\n", oss_caps & DSP_CAP_OUTPUT ? "true" : "false");
|
|
|
|
#endif
|
|
|
|
#ifdef DSP_CAP_VIRTUAL
|
|
|
|
TRACE("\tVirtual: %s\n", oss_caps & DSP_CAP_VIRTUAL ? "true" : "false");
|
|
|
|
#endif
|
|
|
|
#ifdef DSP_CAP_ANALOGOUT
|
|
|
|
TRACE("\tAnalog Out: %s\n", oss_caps & DSP_CAP_ANALOGOUT ? "true" : "false");
|
|
|
|
#endif
|
|
|
|
#ifdef DSP_CAP_ANALOGIN
|
|
|
|
TRACE("\tAnalog In: %s\n", oss_caps & DSP_CAP_ANALOGIN ? "true" : "false");
|
|
|
|
#endif
|
|
|
|
#ifdef DSP_CAP_DIGITALOUT
|
|
|
|
TRACE("\tDigital Out: %s\n", oss_caps & DSP_CAP_DIGITALOUT ? "true" : "false");
|
|
|
|
#endif
|
|
|
|
#ifdef DSP_CAP_DIGITALIN
|
|
|
|
TRACE("\tDigital In: %s\n", oss_caps & DSP_CAP_DIGITALIN ? "true" : "false");
|
|
|
|
#endif
|
|
|
|
#ifdef DSP_CAP_ADMASK
|
|
|
|
TRACE("\tA/D Mask: %s\n", oss_caps & DSP_CAP_ADMASK ? "true" : "false");
|
|
|
|
#endif
|
|
|
|
#ifdef DSP_CAP_SHADOW
|
|
|
|
TRACE("\tShadow: %s\n", oss_caps & DSP_CAP_SHADOW ? "true" : "false");
|
|
|
|
#endif
|
|
|
|
#ifdef DSP_CH_MASK
|
|
|
|
TRACE("\tChannel Mask: %x\n", oss_caps & DSP_CH_MASK);
|
|
|
|
#endif
|
|
|
|
#ifdef DSP_CAP_SLAVE
|
|
|
|
TRACE("\tSlave: %s\n", oss_caps & DSP_CAP_SLAVE ? "true" : "false");
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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;
|
2006-05-08 02:45:44 +02:00
|
|
|
BOOL has_mixer = FALSE;
|
2003-03-15 01:54:11 +01:00
|
|
|
TRACE("(%p) %s\n", ossdev, ossdev->dev_name);
|
2000-05-10 00:35:47 +02:00
|
|
|
|
2004-03-29 22:27:50 +02: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
|
|
|
|
2007-08-08 00:11:01 +02:00
|
|
|
#if defined(SNDCTL_MIXERINFO)
|
|
|
|
{
|
|
|
|
int mixer;
|
|
|
|
if ((mixer = open(ossdev->mixer_name, O_RDONLY|O_NDELAY)) >= 0) {
|
|
|
|
oss_mixerinfo info;
|
|
|
|
info.dev = 0;
|
|
|
|
if (ioctl(mixer, SNDCTL_MIXERINFO, &info) >= 0) {
|
|
|
|
lstrcpynA(ossdev->ds_desc.szDesc, info.name, sizeof(info.name));
|
|
|
|
strcpy(ossdev->ds_desc.szDrvname, "wineoss.drv");
|
|
|
|
MultiByteToWideChar(CP_ACP, 0, info.name, sizeof(info.name),
|
|
|
|
ossdev->out_caps.szPname,
|
|
|
|
sizeof(ossdev->out_caps.szPname) / sizeof(WCHAR));
|
|
|
|
TRACE("%s: %s\n", ossdev->mixer_name, ossdev->ds_desc.szDesc);
|
|
|
|
has_mixer = TRUE;
|
|
|
|
} else {
|
|
|
|
WARN("%s: cannot read SNDCTL_MIXERINFO!\n", ossdev->mixer_name);
|
|
|
|
}
|
|
|
|
close(mixer);
|
|
|
|
} else {
|
|
|
|
WARN("open(%s) failed (%s)\n", ossdev->mixer_name , strerror(errno));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#elif defined(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) {
|
2005-04-18 12:30:55 +02:00
|
|
|
lstrcpynA(ossdev->ds_desc.szDesc, info.name, sizeof(info.name));
|
2005-01-28 18:21:07 +01:00
|
|
|
strcpy(ossdev->ds_desc.szDrvname, "wineoss.drv");
|
2004-12-06 21:55:25 +01:00
|
|
|
MultiByteToWideChar(CP_ACP, 0, info.name, sizeof(info.name),
|
|
|
|
ossdev->out_caps.szPname,
|
|
|
|
sizeof(ossdev->out_caps.szPname) / sizeof(WCHAR));
|
2005-05-29 22:02:58 +02:00
|
|
|
TRACE("%s: %s\n", ossdev->mixer_name, ossdev->ds_desc.szDesc);
|
2006-05-08 02:45:44 +02:00
|
|
|
has_mixer = TRUE;
|
2003-03-17 01:00:53 +01:00
|
|
|
} 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 {
|
2006-01-27 12:10:25 +01:00
|
|
|
WARN("open(%s) failed (%s)\n", ossdev->mixer_name , strerror(errno));
|
2003-03-17 01:00:53 +01:00
|
|
|
}
|
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
|
|
|
|
2004-03-29 22:27:50 +02:00
|
|
|
if (WINE_TRACE_ON(wave))
|
|
|
|
OSS_Info(ossdev->fd);
|
|
|
|
|
2003-01-08 00:08:05 +01:00
|
|
|
ossdev->out_caps.wMid = 0x00FF; /* Manufac ID */
|
|
|
|
ossdev->out_caps.wPid = 0x0001; /* Product ID */
|
2004-12-06 21:55:25 +01:00
|
|
|
|
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;
|
2006-05-08 02:45:44 +02:00
|
|
|
ossdev->out_caps.dwSupport = has_mixer ? WAVECAPS_VOLUME : 0;
|
2002-08-09 03:02:25 +02:00
|
|
|
|
2003-03-15 01:54:11 +01:00
|
|
|
/* direct sound caps */
|
2004-07-06 20:43:57 +02:00
|
|
|
ossdev->ds_caps.dwFlags = DSCAPS_CERTIFIED;
|
2007-08-25 12:29:12 +02:00
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_SECONDARY8BIT;
|
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_SECONDARY16BIT;
|
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_SECONDARYMONO;
|
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_SECONDARYSTEREO;
|
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_CONTINUOUSRATE;
|
|
|
|
|
2003-03-15 01:54:11 +01:00
|
|
|
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;
|
2004-04-13 00:01: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
|
|
|
}
|
2004-04-13 00:01:47 +02:00
|
|
|
if (f == 0)
|
2003-03-15 01:54:11 +01:00
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_PRIMARY8BIT;
|
|
|
|
else if (f == 1)
|
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_PRIMARY16BIT;
|
2003-01-11 23:47:51 +01:00
|
|
|
|
2005-05-30 13:12:07 +02:00
|
|
|
for (c = 1; c <= MAX_CHANNELS; c++) {
|
2003-01-11 23:47:51 +01:00
|
|
|
arg=c;
|
2005-05-30 13:12:07 +02:00
|
|
|
rc=ioctl(ossdev->fd, SNDCTL_DSP_CHANNELS, &arg);
|
2005-11-21 12:56:55 +01:00
|
|
|
if( rc == -1) break;
|
2003-01-16 01:19:04 +01:00
|
|
|
if (rc!=0 || arg!=c) {
|
2005-05-30 13:12:07 +02:00
|
|
|
TRACE("DSP_CHANNELS: 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
|
|
|
}
|
2005-05-30 13:12:07 +02:00
|
|
|
if (c == 1) {
|
2003-03-15 01:54:11 +01:00
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_PRIMARYMONO;
|
2005-05-30 13:12:07 +02:00
|
|
|
} else if (c == 2) {
|
|
|
|
ossdev->out_caps.wChannels = 2;
|
2006-05-08 02:45:44 +02:00
|
|
|
if (has_mixer)
|
|
|
|
ossdev->out_caps.dwSupport|=WAVECAPS_LRVOLUME;
|
2003-03-15 01:54:11 +01:00
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_PRIMARYSTEREO;
|
2005-05-30 13:12:07 +02:00
|
|
|
} else
|
|
|
|
ossdev->out_caps.wChannels = c;
|
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",
|
2005-05-30 13:12:07 +02:00
|
|
|
rc,arg,win_std_rates[r],win_std_oss_fmts[f],c);
|
|
|
|
if (rc==0 && arg!=0 && NEAR_MATCH(arg,win_std_rates[r]) && c < 3)
|
|
|
|
ossdev->out_caps.dwFormats|=win_std_formats[f][c-1][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) {
|
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");
|
|
|
|
|
|
|
|
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);
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("out wChannels = %d, dwFormats = %08X, dwSupport = %08X\n",
|
2005-05-30 13:12:07 +02:00
|
|
|
ossdev->out_caps.wChannels, 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)
|
2004-03-29 22:27:50 +02:00
|
|
|
return FALSE;
|
2003-09-27 04:20:19 +02:00
|
|
|
|
2002-10-07 20:23:40 +02:00
|
|
|
ioctl(ossdev->fd, SNDCTL_DSP_RESET, 0);
|
2000-05-10 00:35:47 +02:00
|
|
|
|
2007-08-08 00:11:01 +02:00
|
|
|
#if defined(SNDCTL_MIXERINFO)
|
|
|
|
{
|
|
|
|
int mixer;
|
|
|
|
if ((mixer = open(ossdev->mixer_name, O_RDONLY|O_NDELAY)) >= 0) {
|
|
|
|
oss_mixerinfo info;
|
|
|
|
info.dev = 0;
|
|
|
|
if (ioctl(mixer, SNDCTL_MIXERINFO, &info) >= 0) {
|
|
|
|
MultiByteToWideChar(CP_ACP, 0, info.name, -1,
|
|
|
|
ossdev->in_caps.szPname,
|
|
|
|
sizeof(ossdev->in_caps.szPname) / sizeof(WCHAR));
|
|
|
|
TRACE("%s: %s\n", ossdev->mixer_name, ossdev->ds_desc.szDesc);
|
|
|
|
} else {
|
|
|
|
WARN("%s: cannot read SNDCTL_MIXERINFO!\n", ossdev->mixer_name);
|
|
|
|
}
|
|
|
|
close(mixer);
|
|
|
|
} else {
|
|
|
|
WARN("open(%s) failed (%s)\n", ossdev->mixer_name, strerror(errno));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#elif defined(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) {
|
2004-12-06 21:55:25 +01:00
|
|
|
MultiByteToWideChar(CP_ACP, 0, info.name, -1,
|
|
|
|
ossdev->in_caps.szPname,
|
|
|
|
sizeof(ossdev->in_caps.szPname) / sizeof(WCHAR));
|
2005-05-29 22:02:58 +02:00
|
|
|
TRACE("%s: %s\n", ossdev->mixer_name, ossdev->ds_desc.szDesc);
|
2003-03-17 01:00:53 +01:00
|
|
|
} 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 {
|
2006-01-27 12:10:25 +01:00
|
|
|
WARN("open(%s) failed (%s)\n", ossdev->mixer_name, strerror(errno));
|
2003-03-17 01:00:53 +01:00
|
|
|
}
|
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
|
|
|
|
2004-03-29 22:27:50 +02:00
|
|
|
if (WINE_TRACE_ON(wave))
|
|
|
|
OSS_Info(ossdev->fd);
|
|
|
|
|
2003-01-11 23:47:51 +01:00
|
|
|
ossdev->in_caps.wMid = 0x00FF; /* Manufac ID */
|
|
|
|
ossdev->in_caps.wPid = 0x0001; /* Product ID */
|
2004-12-06 21:55:25 +01:00
|
|
|
|
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;
|
|
|
|
|
2004-06-15 22:25:46 +02:00
|
|
|
/* See the comment in OSS_WaveOutInit for the loop order */
|
2003-01-11 23:47:51 +01:00
|
|
|
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
|
|
|
|
2005-05-30 13:12:07 +02:00
|
|
|
for (c = 1; c <= MAX_CHANNELS; c++) {
|
2003-01-11 23:47:51 +01:00
|
|
|
arg=c;
|
2005-05-30 13:12:07 +02:00
|
|
|
rc=ioctl(ossdev->fd, SNDCTL_DSP_CHANNELS, &arg);
|
2005-11-21 12:56:55 +01:00
|
|
|
if( rc == -1) break;
|
2003-01-16 01:19:04 +01:00
|
|
|
if (rc!=0 || arg!=c) {
|
2005-05-30 13:12:07 +02:00
|
|
|
TRACE("DSP_CHANNELS: 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
|
|
|
}
|
2005-05-30 13:12:07 +02:00
|
|
|
if (c > 1) {
|
|
|
|
ossdev->in_caps.wChannels = c;
|
|
|
|
ossdev->dsc_caps.dwChannels = c;
|
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);
|
2005-05-30 13:12:07 +02:00
|
|
|
TRACE("DSP_SPEED: rc=%d returned %d for %dx%dx%d\n",rc,arg,win_std_rates[r],win_std_oss_fmts[f],c);
|
|
|
|
if (rc==0 && NEAR_MATCH(arg,win_std_rates[r]) && c < 3)
|
|
|
|
ossdev->in_caps.dwFormats|=win_std_formats[f][c-1][r];
|
|
|
|
ossdev->dsc_caps.dwFormats|=win_std_formats[f][c-1][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) {
|
|
|
|
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);
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("in wChannels = %d, dwFormats = %08X, in_caps_support = %08X\n",
|
2005-05-30 13:12:07 +02:00
|
|
|
ossdev->in_caps.wChannels, ossdev->in_caps.dwFormats, ossdev->in_caps_support);
|
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
|
|
|
{
|
2004-03-31 21:57:53 +02:00
|
|
|
int rc,arg;
|
|
|
|
int f,c,r;
|
|
|
|
int caps;
|
2006-05-08 02:45:44 +02:00
|
|
|
BOOL has_mixer = FALSE;
|
2004-03-29 22:27:50 +02:00
|
|
|
TRACE("(%p) %s\n", ossdev, ossdev->dev_name);
|
|
|
|
|
2004-06-15 22:25:46 +02:00
|
|
|
/* The OSS documentation says we must call SNDCTL_SETDUPLEX
|
|
|
|
* *before* checking for SNDCTL_DSP_GETCAPS otherwise we may
|
|
|
|
* get the wrong result. This ioctl must even be done before
|
|
|
|
* setting the fragment size so that only OSS_RawOpenDevice is
|
|
|
|
* in a position to do it. So we set full_duplex speculatively
|
|
|
|
* and adjust right after.
|
|
|
|
*/
|
|
|
|
ossdev->full_duplex=1;
|
|
|
|
rc=OSS_OpenDevice(ossdev, O_RDWR, NULL, 0,-1,-1,-1);
|
|
|
|
ossdev->full_duplex=0;
|
|
|
|
if (rc != 0)
|
2004-03-29 22:27:50 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
ioctl(ossdev->fd, SNDCTL_DSP_RESET, 0);
|
2006-05-08 02:45:44 +02:00
|
|
|
|
2007-08-08 00:11:01 +02:00
|
|
|
#if defined(SNDCTL_MIXERINFO)
|
|
|
|
{
|
|
|
|
int mixer;
|
|
|
|
if ((mixer = open(ossdev->mixer_name, O_RDWR|O_NDELAY)) >= 0) {
|
|
|
|
oss_mixerinfo info;
|
|
|
|
info.dev = 0;
|
|
|
|
if (ioctl(mixer, SNDCTL_MIXERINFO, &info) >= 0) {
|
|
|
|
has_mixer = TRUE;
|
|
|
|
} else {
|
|
|
|
WARN("%s: cannot read SNDCTL_MIXERINFO!\n", ossdev->mixer_name);
|
|
|
|
}
|
|
|
|
close(mixer);
|
|
|
|
} else {
|
|
|
|
WARN("open(%s) failed (%s)\n", ossdev->mixer_name , strerror(errno));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#elif defined(SOUND_MIXER_INFO)
|
2006-05-08 02:45:44 +02:00
|
|
|
{
|
|
|
|
int mixer;
|
|
|
|
if ((mixer = open(ossdev->mixer_name, O_RDWR|O_NDELAY)) >= 0) {
|
|
|
|
mixer_info info;
|
|
|
|
if (ioctl(mixer, SOUND_MIXER_INFO, &info) >= 0) {
|
|
|
|
has_mixer = TRUE;
|
|
|
|
} else {
|
|
|
|
/* 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);
|
|
|
|
}
|
|
|
|
close(mixer);
|
|
|
|
} else {
|
|
|
|
WARN("open(%s) failed (%s)\n", ossdev->mixer_name , strerror(errno));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif /* SOUND_MIXER_INFO */
|
|
|
|
|
2004-03-29 22:27:50 +02:00
|
|
|
TRACE("%s\n", ossdev->ds_desc.szDesc);
|
|
|
|
|
2004-06-15 22:25:46 +02:00
|
|
|
if (ioctl(ossdev->fd, SNDCTL_DSP_GETCAPS, &caps) == 0)
|
|
|
|
ossdev->full_duplex = (caps & DSP_CAP_DUPLEX);
|
|
|
|
|
2004-08-18 02:30:01 +02:00
|
|
|
ossdev->duplex_out_caps = ossdev->out_caps;
|
|
|
|
|
|
|
|
ossdev->duplex_out_caps.wChannels = 1;
|
|
|
|
ossdev->duplex_out_caps.dwFormats = 0x00000000;
|
2006-05-08 02:45:44 +02:00
|
|
|
ossdev->duplex_out_caps.dwSupport = has_mixer ? WAVECAPS_VOLUME : 0;
|
2004-08-18 02:30:01 +02:00
|
|
|
|
2004-03-29 22:27:50 +02:00
|
|
|
if (WINE_TRACE_ON(wave))
|
|
|
|
OSS_Info(ossdev->fd);
|
2002-06-28 19:31:31 +02:00
|
|
|
|
2004-08-18 02:30:01 +02:00
|
|
|
/* See the comment in OSS_WaveOutInit for the loop order */
|
|
|
|
for (f=0;f<2;f++) {
|
|
|
|
arg=win_std_oss_fmts[f];
|
|
|
|
rc=ioctl(ossdev->fd, SNDCTL_DSP_SAMPLESIZE, &arg);
|
|
|
|
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]);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2005-05-30 13:12:07 +02:00
|
|
|
for (c = 1; c <= MAX_CHANNELS; c++) {
|
2004-08-18 02:30:01 +02:00
|
|
|
arg=c;
|
2005-05-30 13:12:07 +02:00
|
|
|
rc=ioctl(ossdev->fd, SNDCTL_DSP_CHANNELS, &arg);
|
2005-11-21 12:56:55 +01:00
|
|
|
if( rc == -1) break;
|
2004-08-18 02:30:01 +02:00
|
|
|
if (rc!=0 || arg!=c) {
|
2005-05-30 13:12:07 +02:00
|
|
|
TRACE("DSP_CHANNELS: rc=%d returned %d for %d\n",rc,arg,c);
|
2004-03-31 21:57:53 +02:00
|
|
|
continue;
|
|
|
|
}
|
2005-05-30 13:12:07 +02:00
|
|
|
if (c == 1) {
|
2004-08-18 02:30:01 +02:00
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_PRIMARYMONO;
|
2005-05-30 13:12:07 +02:00
|
|
|
} else if (c == 2) {
|
|
|
|
ossdev->duplex_out_caps.wChannels = 2;
|
2006-05-08 02:45:44 +02:00
|
|
|
if (has_mixer)
|
|
|
|
ossdev->duplex_out_caps.dwSupport|=WAVECAPS_LRVOLUME;
|
2004-08-18 02:30:01 +02:00
|
|
|
ossdev->ds_caps.dwFlags |= DSCAPS_PRIMARYSTEREO;
|
2005-05-30 13:12:07 +02:00
|
|
|
} else
|
|
|
|
ossdev->duplex_out_caps.wChannels = c;
|
2004-03-31 21:57:53 +02:00
|
|
|
|
2004-08-18 02:30:01 +02: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",
|
2005-05-30 13:12:07 +02:00
|
|
|
rc,arg,win_std_rates[r],win_std_oss_fmts[f],c);
|
|
|
|
if (rc==0 && arg!=0 && NEAR_MATCH(arg,win_std_rates[r]) && c < 3)
|
|
|
|
ossdev->duplex_out_caps.dwFormats|=win_std_formats[f][c-1][r];
|
2004-03-31 21:57:53 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2004-08-18 02:30:01 +02:00
|
|
|
|
|
|
|
if (ioctl(ossdev->fd, SNDCTL_DSP_GETCAPS, &arg) == 0) {
|
|
|
|
if ((arg & DSP_CAP_REALTIME) && !(arg & DSP_CAP_BATCH)) {
|
|
|
|
ossdev->duplex_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) &&
|
|
|
|
!(arg & DSP_CAP_BATCH)) {
|
|
|
|
ossdev->duplex_out_caps.dwSupport |= WAVECAPS_DIRECTSOUND;
|
|
|
|
}
|
|
|
|
}
|
2002-10-07 20:23:40 +02:00
|
|
|
OSS_CloseDevice(ossdev);
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("duplex wChannels = %d, dwFormats = %08X, dwSupport = %08X\n",
|
2005-05-30 13:12:07 +02:00
|
|
|
ossdev->duplex_out_caps.wChannels,
|
|
|
|
ossdev->duplex_out_caps.dwFormats,
|
|
|
|
ossdev->duplex_out_caps.dwSupport);
|
2002-06-28 19:31:31 +02:00
|
|
|
}
|
|
|
|
|
2004-09-01 03:28:12 +02:00
|
|
|
static char* StrDup(const char* str, const char* def)
|
|
|
|
{
|
|
|
|
char* dst;
|
|
|
|
if (str==NULL)
|
|
|
|
str=def;
|
|
|
|
dst=HeapAlloc(GetProcessHeap(),0,strlen(str)+1);
|
|
|
|
strcpy(dst, str);
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
2002-06-28 19:31:31 +02:00
|
|
|
/******************************************************************
|
|
|
|
* OSS_WaveInit
|
|
|
|
*
|
|
|
|
* Initialize internal structures from OSS information
|
|
|
|
*/
|
2005-12-08 12:00:33 +01:00
|
|
|
LRESULT OSS_WaveInit(void)
|
2002-06-28 19:31:31 +02:00
|
|
|
{
|
2004-09-01 03:28:12 +02:00
|
|
|
char* str;
|
|
|
|
int i;
|
|
|
|
|
2007-10-09 08:57:39 +02:00
|
|
|
/* FIXME: Remove unneeded members of WOutDev and WInDev */
|
|
|
|
TRACE("()\n");
|
2002-06-28 19:31:31 +02:00
|
|
|
|
2004-09-01 03:28:12 +02:00
|
|
|
str=getenv("AUDIODEV");
|
|
|
|
if (str!=NULL)
|
2003-03-15 01:54:11 +01:00
|
|
|
{
|
2007-10-01 09:16:59 +02:00
|
|
|
WOutDev[0].ossdev.dev_name = WInDev[0].ossdev.dev_name = StrDup(str,"");
|
|
|
|
WOutDev[0].ossdev.mixer_name = WInDev[0].ossdev.mixer_name = StrDup(getenv("MIXERDEV"),"/dev/mixer");
|
2004-09-01 03:28:12 +02:00
|
|
|
for (i = 1; i < MAX_WAVEDRV; ++i)
|
|
|
|
{
|
2007-10-01 09:16:59 +02:00
|
|
|
WOutDev[i].ossdev.dev_name = WInDev[i].ossdev.dev_name = StrDup("",NULL);
|
|
|
|
WOutDev[i].ossdev.mixer_name = WInDev[i].ossdev.mixer_name = StrDup("",NULL);
|
2004-09-01 03:28:12 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2007-10-01 09:16:59 +02:00
|
|
|
WOutDev[0].ossdev.dev_name = WInDev[0].ossdev.dev_name = StrDup("/dev/dsp",NULL);
|
|
|
|
WOutDev[0].ossdev.mixer_name = WInDev[0].ossdev.mixer_name = StrDup("/dev/mixer",NULL);
|
2004-09-01 03:28:12 +02:00
|
|
|
for (i = 1; i < MAX_WAVEDRV; ++i)
|
|
|
|
{
|
2007-10-01 09:16:59 +02:00
|
|
|
WOutDev[i].ossdev.dev_name = WInDev[i].ossdev.dev_name = HeapAlloc(GetProcessHeap(),0,11);
|
|
|
|
sprintf(WOutDev[i].ossdev.dev_name, "/dev/dsp%d", i);
|
|
|
|
WOutDev[i].ossdev.mixer_name = WInDev[i].ossdev.mixer_name = HeapAlloc(GetProcessHeap(),0,13);
|
|
|
|
sprintf(WOutDev[i].ossdev.mixer_name, "/dev/mixer%d", i);
|
2004-09-01 03:28:12 +02:00
|
|
|
}
|
|
|
|
}
|
2003-03-15 01:54:11 +01:00
|
|
|
|
2004-09-01 03:28:12 +02:00
|
|
|
for (i = 0; i < MAX_WAVEDRV; ++i)
|
|
|
|
{
|
2007-10-01 09:16:59 +02:00
|
|
|
WOutDev[i].ossdev.interface_name = WInDev[i].ossdev.interface_name =
|
|
|
|
HeapAlloc(GetProcessHeap(),0,9+strlen(WOutDev[i].ossdev.dev_name)+1);
|
|
|
|
sprintf(WOutDev[i].ossdev.interface_name, "wineoss: %s", WOutDev[i].ossdev.dev_name);
|
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
|
|
|
{
|
2007-10-01 09:16:59 +02:00
|
|
|
if (*WOutDev[i].ossdev.dev_name == '\0' || OSS_WaveOutInit(&WOutDev[i].ossdev))
|
2002-10-09 22:37:09 +02:00
|
|
|
{
|
|
|
|
WOutDev[numOutDev].state = WINE_WS_CLOSED;
|
2007-10-01 09:16:59 +02: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
|
|
|
{
|
2007-10-01 09:16:59 +02:00
|
|
|
if (*WInDev[i].ossdev.dev_name=='\0' || OSS_WaveInInit(&WInDev[i].ossdev))
|
2002-10-09 22:37:09 +02:00
|
|
|
{
|
|
|
|
WInDev[numInDev].state = WINE_WS_CLOSED;
|
|
|
|
numInDev++;
|
|
|
|
}
|
|
|
|
}
|
2002-06-28 19:31:31 +02:00
|
|
|
|
|
|
|
/* finish with the full duplex bits */
|
|
|
|
for (i = 0; i < MAX_WAVEDRV; i++)
|
2007-10-01 09:16:59 +02:00
|
|
|
if (*WOutDev[i].ossdev.dev_name!='\0')
|
|
|
|
OSS_WaveFullDuplexInit(&WOutDev[i].ossdev);
|
2001-12-21 21:28:43 +01:00
|
|
|
|
2005-05-29 22:02:58 +02:00
|
|
|
TRACE("%d wave out devices\n", numOutDev);
|
|
|
|
for (i = 0; i < numOutDev; i++) {
|
2007-10-01 09:16:59 +02:00
|
|
|
TRACE("%d: %s, %s, %s\n", i, WOutDev[i].ossdev.dev_name,
|
|
|
|
WOutDev[i].ossdev.mixer_name, WOutDev[i].ossdev.interface_name);
|
2005-05-29 22:02:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
TRACE("%d wave in devices\n", numInDev);
|
|
|
|
for (i = 0; i < numInDev; i++) {
|
2007-10-01 09:16:59 +02:00
|
|
|
TRACE("%d: %s, %s, %s\n", i, WInDev[i].ossdev.dev_name,
|
|
|
|
WInDev[i].ossdev.mixer_name, WInDev[i].ossdev.interface_name);
|
2005-05-29 22:02:58 +02:00
|
|
|
}
|
|
|
|
|
2000-05-10 00:35:47 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2005-12-08 12:00:33 +01:00
|
|
|
/******************************************************************
|
|
|
|
* OSS_WaveExit
|
|
|
|
*
|
|
|
|
* Delete/clear internal structures of OSS information
|
|
|
|
*/
|
|
|
|
LRESULT OSS_WaveExit(void)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
TRACE("()\n");
|
|
|
|
|
|
|
|
for (i = 0; i < MAX_WAVEDRV; ++i)
|
|
|
|
{
|
2007-10-01 09:16:59 +02:00
|
|
|
HeapFree(GetProcessHeap(), 0, WOutDev[i].ossdev.dev_name);
|
|
|
|
HeapFree(GetProcessHeap(), 0, WOutDev[i].ossdev.mixer_name);
|
|
|
|
HeapFree(GetProcessHeap(), 0, WOutDev[i].ossdev.interface_name);
|
2005-12-08 12:00:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
ZeroMemory(WOutDev, sizeof(WOutDev));
|
|
|
|
ZeroMemory(WInDev, sizeof(WInDev));
|
|
|
|
|
|
|
|
numOutDev = 0;
|
|
|
|
numInDev = 0;
|
|
|
|
|
|
|
|
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
|
2004-12-06 21:55:25 +01:00
|
|
|
omr->msg_event = CreateEventW(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);
|
2007-03-10 22:11:51 +01:00
|
|
|
omr->msg_crst.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": OSS_MSG_RING.msg_crst");
|
2001-11-12 16:55:37 +01:00
|
|
|
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);
|
2007-03-10 22:11:51 +01:00
|
|
|
omr->msg_crst.DebugInfo->Spare[0] = 0;
|
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)
|
|
|
|
{
|
2004-12-06 21:55:25 +01:00
|
|
|
hEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
|
2002-01-12 22:15:08 +01:00
|
|
|
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)
|
2004-08-18 02:30:01 +02:00
|
|
|
FIXME("two fast messages in the queue!!!! toget = %d(%s), tosave=%d(%s)\n",
|
|
|
|
omr->msg_toget,getCmdString(omr->messages[omr->msg_toget].msg),
|
|
|
|
omr->msg_tosave,getCmdString(omr->messages[omr->msg_tosave].msg));
|
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;
|
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
|
|
|
{
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("wMsg = 0x%04x (%s) dwParm1 = %04X dwParam2 = %04X\n", wMsg,
|
2003-11-14 22:03:24 +01:00
|
|
|
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;
|
2005-02-23 22:00:02 +01:00
|
|
|
DWORD notplayed;
|
2001-12-21 21:28:43 +01:00
|
|
|
if (!info) info = &dspspace;
|
|
|
|
|
2007-10-01 09:16:59 +02:00
|
|
|
if (ioctl(wwo->ossdev.fd, SNDCTL_DSP_GETOSPACE, info) < 0) {
|
|
|
|
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;
|
|
|
|
}
|
2005-02-23 22:00:02 +01:00
|
|
|
|
|
|
|
/* GETOSPACE is not always accurate when we're down to the last fragment or two;
|
2005-03-02 14:53:50 +01:00
|
|
|
** we try to accommodate that here by assuming that the dsp is empty by looking
|
2005-02-23 22:00:02 +01:00
|
|
|
** at the clock rather than the result of GETOSPACE */
|
|
|
|
notplayed = wwo->dwBufferSize - info->bytes;
|
|
|
|
if (notplayed > 0 && notplayed < (info->fragsize * 2))
|
|
|
|
{
|
|
|
|
if (wwo->dwProjectedFinishTime && GetTickCount() >= wwo->dwProjectedFinishTime)
|
|
|
|
{
|
|
|
|
TRACE("Adjusting for a presumed OSS bug and assuming all data has been played.\n");
|
|
|
|
wwo->dwPlayedTotal = wwo->dwWrittenTotal;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
/* Some OSS drivers will clean up nicely if given a POST, so give 'em the chance... */
|
2007-10-01 09:16:59 +02:00
|
|
|
ioctl(wwo->ossdev.fd, SNDCTL_DSP_POST, 0);
|
2005-02-23 22:00:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
wwo->dwPlayedTotal = wwo->dwWrittenTotal - notplayed;
|
2001-12-21 21:28:43 +01:00
|
|
|
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 {
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("Starting loop (%dx) with %p\n", lpWaveHdr->dwLoops, lpWaveHdr);
|
2001-11-09 21:26:59 +01:00
|
|
|
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
|
|
|
|
2005-02-23 22:00:02 +01:00
|
|
|
/**************************************************************************
|
|
|
|
* wodPlayer_TicksTillEmpty [internal]
|
|
|
|
* Returns the number of ticks until we think the DSP should be empty
|
|
|
|
*/
|
|
|
|
static DWORD wodPlayer_TicksTillEmpty(const WINE_WAVEOUT *wwo)
|
|
|
|
{
|
|
|
|
return ((wwo->dwWrittenTotal - wwo->dwPlayedTotal) * 1000)
|
|
|
|
/ wwo->waveFormat.Format.nAvgBytesPerSec;
|
|
|
|
}
|
|
|
|
|
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 */
|
2004-08-16 23:09:52 +02:00
|
|
|
return wwo->dwFragmentSize * 1000 / wwo->waveFormat.Format.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 {
|
2004-08-16 23:09:52 +02:00
|
|
|
dwMillis = (lpWaveHdr->reserved - wwo->dwPlayedTotal) * 1000 / wwo->waveFormat.Format.nAvgBytesPerSec;
|
2001-12-14 23:44:29 +01:00
|
|
|
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
|
|
|
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("Writing wavehdr %p.%u[%u]/%u\n",
|
2002-04-01 23:02:49 +02:00
|
|
|
wwo->lpPlayPtr, wwo->dwPartialOffset, wwo->lpPlayPtr->dwBufferLength, toWrite);
|
|
|
|
|
|
|
|
if (toWrite > 0)
|
|
|
|
{
|
2007-10-01 09:16:59 +02:00
|
|
|
written = write(wwo->ossdev.fd, wwo->lpPlayPtr->lpData + wwo->dwPartialOffset, toWrite);
|
2004-03-29 22:27:50 +02:00
|
|
|
if (written <= 0) {
|
2007-10-01 09:16:59 +02:00
|
|
|
TRACE("write(%s, %p, %d) failed (%s) returned %d\n", wwo->ossdev.dev_name,
|
2004-03-29 22:27:50 +02:00
|
|
|
wwo->lpPlayPtr->lpData + wwo->dwPartialOffset, toWrite, strerror(errno), written);
|
|
|
|
return FALSE;
|
|
|
|
}
|
2002-04-01 23:02:49 +02:00
|
|
|
}
|
|
|
|
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;
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("dwWrittenTotal=%u\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
|
|
|
|
*/
|
2004-12-06 21:55:25 +01:00
|
|
|
#if 0
|
|
|
|
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
|
|
|
}
|
2004-12-06 21:55:25 +01:00
|
|
|
#else
|
|
|
|
for (;;)
|
|
|
|
{
|
|
|
|
lpWaveHdr = wwo->lpQueuePtr;
|
|
|
|
if (!lpWaveHdr) {TRACE("Empty queue\n"); break;}
|
|
|
|
if (!force)
|
|
|
|
{
|
|
|
|
if (lpWaveHdr == wwo->lpPlayPtr) {TRACE("play %p\n", lpWaveHdr); break;}
|
|
|
|
if (lpWaveHdr == wwo->lpLoopPtr) {TRACE("loop %p\n", lpWaveHdr); break;}
|
2006-10-06 22:59:51 +02:00
|
|
|
if (lpWaveHdr->reserved > wwo->dwPlayedTotal) {TRACE("still playing %p (%u/%u)\n", lpWaveHdr, lpWaveHdr->reserved, wwo->dwPlayedTotal);break;}
|
2004-12-06 21:55:25 +01:00
|
|
|
}
|
|
|
|
wwo->lpQueuePtr = lpWaveHdr->lpNext;
|
|
|
|
|
|
|
|
lpWaveHdr->dwFlags &= ~WHDR_INQUEUE;
|
|
|
|
lpWaveHdr->dwFlags |= WHDR_DONE;
|
|
|
|
|
|
|
|
wodNotifyClient(wwo, WOM_DONE, (DWORD)lpWaveHdr, 0);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
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 */
|
2007-10-01 09:16:59 +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)) {
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("Received %s %x\n", getCmdString(msg), 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
|
|
|
|
2004-12-06 21:55:25 +01:00
|
|
|
if (!wodUpdatePlayedTotal(wwo, &dspspace)) return INFINITE;
|
2001-12-21 21:28:43 +01:00
|
|
|
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
|
|
|
|
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 {
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("Setting time to elapse for %p to %u\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)
|
2007-10-01 09:16:59 +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);
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("waiting %ums (%u,%u)\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);
|
2005-02-23 22:00:02 +01:00
|
|
|
if (dwNextFeedTime != INFINITE)
|
|
|
|
wwo->dwProjectedFinishTime = GetTickCount() + wodPlayer_TicksTillEmpty(wwo);
|
|
|
|
else
|
|
|
|
wwo->dwProjectedFinishTime = 0;
|
|
|
|
|
2001-12-14 23:44:29 +01:00
|
|
|
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");
|
2007-10-01 09:16:59 +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]
|
|
|
|
*/
|
2004-12-06 21:55:25 +01:00
|
|
|
static DWORD wodGetDevCaps(WORD wDevID, LPWAVEOUTCAPSW lpCaps, DWORD dwSize)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("(%u, %p, %u);\n", wDevID, lpCaps, dwSize);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2004-08-18 02:30:01 +02:00
|
|
|
if (lpCaps == NULL) {
|
|
|
|
WARN("not enabled\n");
|
|
|
|
return MMSYSERR_NOTENABLED;
|
|
|
|
}
|
2002-08-09 03:02:25 +02:00
|
|
|
|
2002-10-09 22:37:09 +02:00
|
|
|
if (wDevID >= numOutDev) {
|
2004-08-18 02:30:01 +02:00
|
|
|
WARN("numOutDev reached !\n");
|
1999-04-11 14:16:24 +02:00
|
|
|
return MMSYSERR_BADDEVICEID;
|
|
|
|
}
|
|
|
|
|
2007-10-01 09:16:59 +02:00
|
|
|
if (WOutDev[wDevID].ossdev.open_access == O_RDWR)
|
|
|
|
memcpy(lpCaps, &WOutDev[wDevID].ossdev.duplex_out_caps, min(dwSize, sizeof(*lpCaps)));
|
2004-08-18 02:30:01 +02:00
|
|
|
else
|
2007-10-01 09:16:59 +02:00
|
|
|
memcpy(lpCaps, &WOutDev[wDevID].ossdev.out_caps, min(dwSize, sizeof(*lpCaps)));
|
2004-08-18 02:30:01 +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
|
|
|
* wodOpen [internal]
|
|
|
|
*/
|
2004-10-27 00:04:55 +02:00
|
|
|
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
|
|
|
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("(%u, %p[cb=%08x], %08X);\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... */
|
2004-08-16 23:09:52 +02:00
|
|
|
if (!supportedFormat(lpDesc->lpFormat)) {
|
2006-10-06 22:59:51 +02:00
|
|
|
WARN("Bad format: tag=%04X nChannels=%d nSamplesPerSec=%d !\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) {
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("Query format: tag=%04X nChannels=%d nSamplesPerSec=%d !\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
|
|
|
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("OSS_OpenDevice requested this format: %dx%dx%d %s\n",
|
2004-08-13 21:42:36 +02:00
|
|
|
lpDesc->lpFormat->nSamplesPerSec,
|
|
|
|
lpDesc->lpFormat->wBitsPerSample,
|
2004-08-18 02:30:01 +02:00
|
|
|
lpDesc->lpFormat->nChannels,
|
|
|
|
lpDesc->lpFormat->wFormatTag == WAVE_FORMAT_PCM ? "WAVE_FORMAT_PCM" :
|
|
|
|
lpDesc->lpFormat->wFormatTag == WAVE_FORMAT_EXTENSIBLE ? "WAVE_FORMAT_EXTENSIBLE" :
|
|
|
|
"UNSUPPORTED");
|
2004-08-13 21:42:36 +02:00
|
|
|
|
2000-06-24 19:54:43 +02:00
|
|
|
wwo = &WOutDev[wDevID];
|
|
|
|
|
2004-04-13 00:01:47 +02:00
|
|
|
if ((dwFlags & WAVE_DIRECTSOUND) &&
|
2007-10-01 09:16:59 +02:00
|
|
|
!(wwo->ossdev.duplex_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) {
|
2007-10-01 09:16:59 +02:00
|
|
|
if (wwo->ossdev.duplex_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
|
|
|
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("requesting %d %d byte fragments (%d ms/fragment)\n",
|
2004-04-13 00:01:47 +02:00
|
|
|
audio_fragment >> 16, 1 << (audio_fragment & 0xffff),
|
2003-11-04 05:20:47 +01:00
|
|
|
((1 << (audio_fragment & 0xffff)) * 1000) / lpDesc->lpFormat->nAvgBytesPerSec);
|
|
|
|
|
2004-03-29 22:27:50 +02:00
|
|
|
if (wwo->state != WINE_WS_CLOSED) {
|
|
|
|
WARN("already allocated\n");
|
|
|
|
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) */
|
2007-10-01 09:16:59 +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,
|
2005-05-30 13:12:07 +02:00
|
|
|
lpDesc->lpFormat->nChannels,
|
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)) {
|
2007-10-01 09:16:59 +02:00
|
|
|
lpDesc->lpFormat->nSamplesPerSec=wwo->ossdev.sample_rate;
|
|
|
|
lpDesc->lpFormat->nChannels=wwo->ossdev.channels;
|
|
|
|
lpDesc->lpFormat->wBitsPerSample=(wwo->ossdev.format == AFMT_U8 ? 8 : 16);
|
2003-01-08 00:08:05 +01:00
|
|
|
lpDesc->lpFormat->nBlockAlign=lpDesc->lpFormat->nChannels*lpDesc->lpFormat->wBitsPerSample/8;
|
|
|
|
lpDesc->lpFormat->nAvgBytesPerSec=lpDesc->lpFormat->nSamplesPerSec*lpDesc->lpFormat->nBlockAlign;
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("OSS_OpenDevice returned this format: %dx%dx%d\n",
|
2003-01-08 00:08:05 +01:00
|
|
|
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);
|
|
|
|
|
2004-08-16 23:09:52 +02:00
|
|
|
memcpy(&wwo->waveDesc, lpDesc, sizeof(WAVEOPENDESC));
|
|
|
|
copy_format(lpDesc->lpFormat, &wwo->waveFormat);
|
1999-09-22 18:45:33 +02:00
|
|
|
|
2004-08-16 23:09:52 +02:00
|
|
|
if (wwo->waveFormat.Format.wBitsPerSample == 0) {
|
2002-06-28 19:31:31 +02:00
|
|
|
WARN("Resetting zeroed wBitsPerSample\n");
|
2004-08-16 23:09:52 +02:00
|
|
|
wwo->waveFormat.Format.wBitsPerSample = 8 *
|
|
|
|
(wwo->waveFormat.Format.nAvgBytesPerSec /
|
|
|
|
wwo->waveFormat.Format.nSamplesPerSec) /
|
|
|
|
wwo->waveFormat.Format.nChannels;
|
2002-06-28 19:31:31 +02:00
|
|
|
}
|
2001-11-09 21:26:59 +01:00
|
|
|
/* Read output space info for future reference */
|
2007-10-01 09:16:59 +02:00
|
|
|
if (ioctl(wwo->ossdev.fd, SNDCTL_DSP_GETOSPACE, &info) < 0) {
|
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_GETOSPACE) failed (%s)\n", wwo->ossdev.dev_name, strerror(errno));
|
|
|
|
OSS_CloseDevice(&wwo->ossdev);
|
2002-10-07 20:23:40 +02:00
|
|
|
wwo->state = WINE_WS_CLOSED;
|
2000-08-25 23:33:45 +02:00
|
|
|
return MMSYSERR_NOTENABLED;
|
|
|
|
}
|
2001-11-09 21:26:59 +01:00
|
|
|
|
2004-03-29 22:27:50 +02:00
|
|
|
TRACE("got %d %d byte fragments (%d ms/fragment)\n", info.fragstotal,
|
2007-10-01 09:16:59 +02:00
|
|
|
info.fragsize, (info.fragsize * 1000) / (wwo->ossdev.sample_rate *
|
|
|
|
wwo->ossdev.channels * (wwo->ossdev.format == AFMT_U8 ? 1 : 2)));
|
2004-04-13 00:01:47 +02:00
|
|
|
|
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)) {
|
2007-09-24 20:33:50 +02:00
|
|
|
/* we've tried to set 1K fragments or less, but it didn't work */
|
|
|
|
WARN("fragment size set failed, size is now %d\n", info.fragsize);
|
2001-03-21 04:37:33 +01:00
|
|
|
}
|
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
|
|
|
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("fd=%d fragstotal=%d fragsize=%d BufferSize=%d\n",
|
2007-10-01 09:16:59 +02:00
|
|
|
wwo->ossdev.fd, info.fragstotal, info.fragsize, wwo->dwBufferSize);
|
2004-08-16 23:09:52 +02:00
|
|
|
if (wwo->dwFragmentSize % wwo->waveFormat.Format.nBlockAlign) {
|
2006-10-06 22:59:51 +02:00
|
|
|
ERR("Fragment doesn't contain an integral number of data blocks fragsize=%d BlockAlign=%d\n",wwo->dwFragmentSize,wwo->waveFormat.Format.nBlockAlign);
|
2004-04-09 21:05:09 +02:00
|
|
|
/* Some SoundBlaster 16 cards return an incorrect (odd) fragment
|
|
|
|
* size for 16 bit sound. This will cause a system crash when we try
|
|
|
|
* to write just the specified odd number of bytes. So if we
|
|
|
|
* detect something is wrong we'd better fix it.
|
|
|
|
*/
|
2004-08-16 23:09:52 +02:00
|
|
|
wwo->dwFragmentSize-=wwo->dwFragmentSize % wwo->waveFormat.Format.nBlockAlign;
|
2004-04-09 21:05:09 +02:00
|
|
|
}
|
|
|
|
|
2001-11-12 16:55:37 +01:00
|
|
|
OSS_InitRingMessage(&wwo->msgRing);
|
2000-10-23 01:43:15 +02:00
|
|
|
|
2004-12-06 21:55:25 +01:00
|
|
|
wwo->hStartUpEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
|
2003-01-15 01:44:50 +01:00
|
|
|
wwo->hThread = CreateThread(NULL, 0, wodPlayer, (LPVOID)(DWORD)wDevID, 0, &(wwo->dwThreadID));
|
2005-05-14 20:49:40 +02:00
|
|
|
if (wwo->hThread)
|
|
|
|
SetThreadPriority(wwo->hThread, THREAD_PRIORITY_TIME_CRITICAL);
|
2003-01-15 01:44:50 +01:00
|
|
|
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
|
|
|
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("wBitsPerSample=%u, nAvgBytesPerSec=%u, nSamplesPerSec=%u, nChannels=%u nBlockAlign=%u!\n",
|
2004-08-16 23:09:52 +02:00
|
|
|
wwo->waveFormat.Format.wBitsPerSample, wwo->waveFormat.Format.nAvgBytesPerSec,
|
|
|
|
wwo->waveFormat.Format.nSamplesPerSec, wwo->waveFormat.Format.nChannels,
|
|
|
|
wwo->waveFormat.Format.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);
|
|
|
|
|
2007-10-01 09:16:59 +02:00
|
|
|
OSS_CloseDevice(&wwo->ossdev);
|
2002-10-07 20:23:40 +02:00
|
|
|
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
|
|
|
{
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("(%u, %p, %08X);\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;
|
|
|
|
|
2004-08-16 23:09:52 +02:00
|
|
|
if ((lpWaveHdr->dwBufferLength & (WOutDev[wDevID].waveFormat.Format.nBlockAlign - 1)) != 0)
|
2002-06-28 19:31:31 +02:00
|
|
|
{
|
2006-10-06 22:59:51 +02:00
|
|
|
WARN("WaveHdr length isn't a multiple of the PCM block size: %d %% %d\n",lpWaveHdr->dwBufferLength,WOutDev[wDevID].waveFormat.Format.nBlockAlign);
|
2004-08-16 23:09:52 +02:00
|
|
|
lpWaveHdr->dwBufferLength &= ~(WOutDev[wDevID].waveFormat.Format.nBlockAlign - 1);
|
2002-06-28 19:31:31 +02:00
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
1999-04-11 14:16:24 +02:00
|
|
|
/**************************************************************************
|
|
|
|
* 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
|
|
|
WINE_WAVEOUT* wwo;
|
1999-05-24 10:19:48 +02:00
|
|
|
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("(%u, %p, %u);\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
|
2007-10-01 09:16:59 +02:00
|
|
|
if (wwo->ossdev.open_access == O_RDWR) {
|
|
|
|
if (wwo->ossdev.duplex_out_caps.dwSupport & WAVECAPS_SAMPLEACCURATE)
|
2004-08-18 02:30:01 +02:00
|
|
|
OSS_AddRingMessage(&wwo->msgRing, WINE_WM_UPDATE, 0, TRUE);
|
|
|
|
} else {
|
2007-10-01 09:16:59 +02:00
|
|
|
if (wwo->ossdev.out_caps.dwSupport & WAVECAPS_SAMPLEACCURATE)
|
2004-08-18 02:30:01 +02:00
|
|
|
OSS_AddRingMessage(&wwo->msgRing, WINE_WM_UPDATE, 0, TRUE);
|
|
|
|
}
|
2002-08-26 23:49:42 +02:00
|
|
|
#endif
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2004-08-16 23:09:52 +02:00
|
|
|
return bytes_to_mmtime(lpTime, wwo->dwPlayedTotal, &wwo->waveFormat);
|
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
|
|
|
{
|
2004-03-29 22:27:50 +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
|
|
|
|
2004-03-29 22:27:50 +02:00
|
|
|
if (lpdwVol == NULL) {
|
|
|
|
WARN("not enabled\n");
|
|
|
|
return MMSYSERR_NOTENABLED;
|
|
|
|
}
|
|
|
|
if (wDevID >= numOutDev) {
|
2004-04-13 00:01:47 +02:00
|
|
|
WARN("invalid parameter\n");
|
2004-03-29 22:27:50 +02:00
|
|
|
return MMSYSERR_INVALPARAM;
|
|
|
|
}
|
2007-10-01 09:16:59 +02:00
|
|
|
if (WOutDev[wDevID].ossdev.open_access == O_RDWR) {
|
|
|
|
if (!(WOutDev[wDevID].ossdev.duplex_out_caps.dwSupport & WAVECAPS_VOLUME)) {
|
2006-05-08 02:45:44 +02:00
|
|
|
TRACE("Volume not supported\n");
|
|
|
|
return MMSYSERR_NOTSUPPORTED;
|
|
|
|
}
|
|
|
|
} else {
|
2007-10-01 09:16:59 +02:00
|
|
|
if (!(WOutDev[wDevID].ossdev.out_caps.dwSupport & WAVECAPS_VOLUME)) {
|
2006-05-08 02:45:44 +02:00
|
|
|
TRACE("Volume not supported\n");
|
|
|
|
return MMSYSERR_NOTSUPPORTED;
|
|
|
|
}
|
|
|
|
}
|
2002-06-28 19:31:31 +02:00
|
|
|
|
2007-10-01 09:16:59 +02:00
|
|
|
if ((mixer = open(WOutDev[wDevID].ossdev.mixer_name, O_RDONLY|O_NDELAY)) < 0) {
|
2004-03-29 22:27:50 +02:00
|
|
|
WARN("mixer device not available !\n");
|
|
|
|
return MMSYSERR_NOTENABLED;
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
|
|
|
if (ioctl(mixer, SOUND_MIXER_READ_PCM, &volume) == -1) {
|
2006-01-27 12:10:25 +01:00
|
|
|
close(mixer);
|
2004-04-13 00:01:47 +02:00
|
|
|
WARN("ioctl(%s, SOUND_MIXER_READ_PCM) failed (%s)\n",
|
2007-10-01 09:16:59 +02:00
|
|
|
WOutDev[wDevID].ossdev.mixer_name, strerror(errno));
|
2004-03-29 22:27:50 +02:00
|
|
|
return MMSYSERR_NOTENABLED;
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
|
|
|
close(mixer);
|
2004-03-29 22:27:50 +02:00
|
|
|
|
1999-05-24 10:19:48 +02:00
|
|
|
left = LOBYTE(volume);
|
|
|
|
right = HIBYTE(volume);
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("left=%d right=%d !\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;
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("last_left=%d last_right=%d !\n", last_left, last_right);
|
2003-10-31 00:08:46 +01:00
|
|
|
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]
|
|
|
|
*/
|
2004-10-27 00:04:55 +02:00
|
|
|
DWORD wodSetVolume(WORD wDevID, DWORD dwParam)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
2004-03-29 22:27:50 +02:00
|
|
|
int mixer;
|
1998-10-11 16:14:24 +02:00
|
|
|
int volume;
|
1999-05-24 10:19:48 +02:00
|
|
|
DWORD left, right;
|
|
|
|
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("(%u, %08X);\n", wDevID, dwParam);
|
1999-05-24 10:19:48 +02:00
|
|
|
|
|
|
|
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) {
|
2004-03-29 22:27:50 +02:00
|
|
|
WARN("invalid parameter: wDevID > %d\n", numOutDev);
|
|
|
|
return MMSYSERR_INVALPARAM;
|
2003-09-19 02:10:51 +02:00
|
|
|
}
|
2007-10-01 09:16:59 +02:00
|
|
|
if (WOutDev[wDevID].ossdev.open_access == O_RDWR) {
|
|
|
|
if (!(WOutDev[wDevID].ossdev.duplex_out_caps.dwSupport & WAVECAPS_VOLUME)) {
|
2006-05-08 02:45:44 +02:00
|
|
|
TRACE("Volume not supported\n");
|
|
|
|
return MMSYSERR_NOTSUPPORTED;
|
|
|
|
}
|
|
|
|
} else {
|
2007-10-01 09:16:59 +02:00
|
|
|
if (!(WOutDev[wDevID].ossdev.out_caps.dwSupport & WAVECAPS_VOLUME)) {
|
2006-05-08 02:45:44 +02:00
|
|
|
TRACE("Volume not supported\n");
|
|
|
|
return MMSYSERR_NOTSUPPORTED;
|
|
|
|
}
|
|
|
|
}
|
2007-10-01 09:16:59 +02:00
|
|
|
if ((mixer = open(WOutDev[wDevID].ossdev.mixer_name, O_WRONLY|O_NDELAY)) < 0) {
|
|
|
|
WARN("open(%s) failed (%s)\n", WOutDev[wDevID].ossdev.mixer_name, strerror(errno));
|
2004-03-29 22:27:50 +02:00
|
|
|
return MMSYSERR_NOTENABLED;
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
1994-07-07 18:23:58 +02:00
|
|
|
if (ioctl(mixer, SOUND_MIXER_WRITE_PCM, &volume) == -1) {
|
2006-01-27 12:10:25 +01:00
|
|
|
close(mixer);
|
2004-03-29 22:27:50 +02:00
|
|
|
WARN("ioctl(%s, SOUND_MIXER_WRITE_PCM) failed (%s)\n",
|
2007-10-01 09:16:59 +02:00
|
|
|
WOutDev[wDevID].ossdev.mixer_name, strerror(errno));
|
2004-03-29 22:27:50 +02:00
|
|
|
return MMSYSERR_NOTENABLED;
|
1998-10-11 16:14:24 +02:00
|
|
|
}
|
2006-01-27 12:10:25 +01:00
|
|
|
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
|
|
|
{
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("(%u, %s, %08X, %08X, %08X);\n",
|
2004-07-06 20:43:57 +02:00
|
|
|
wDevID, getMessage(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);
|
2005-03-17 19:56:14 +01:00
|
|
|
case WODM_PREPARE: return MMSYSERR_NOTSUPPORTED;
|
|
|
|
case WODM_UNPREPARE: return MMSYSERR_NOTSUPPORTED;
|
2004-12-06 21:55:25 +01:00
|
|
|
case WODM_GETDEVCAPS: return wodGetDevCaps (wDevID, (LPWAVEOUTCAPSW)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
|
|
|
|
2005-05-29 22:02:58 +02:00
|
|
|
case DRV_QUERYDEVICEINTERFACESIZE: return wodDevInterfaceSize (wDevID, (LPDWORD)dwParam1);
|
|
|
|
case DRV_QUERYDEVICEINTERFACE: return wodDevInterface (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);
|
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
|
|
|
}
|
|
|
|
|
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)
|
|
|
|
{
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("wMsg = 0x%04x (%s) dwParm1 = %04X dwParam2 = %04X\n", wMsg,
|
2003-11-14 22:03:24 +01:00
|
|
|
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]
|
|
|
|
*/
|
2004-12-06 21:55:25 +01:00
|
|
|
static DWORD widGetDevCaps(WORD wDevID, LPWAVEINCAPSW lpCaps, DWORD dwSize)
|
1994-07-07 18:23:58 +02:00
|
|
|
{
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("(%u, %p, %u);\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
|
|
|
|
2007-10-01 09:16:59 +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 */
|
2007-10-01 09:16:59 +02:00
|
|
|
wwi->ossdev.bInputEnabled = FALSE;
|
|
|
|
enable = getEnables(&wwi->ossdev);
|
|
|
|
if (ioctl(wwi->ossdev.fd, SNDCTL_DSP_SETTRIGGER, &enable) < 0)
|
|
|
|
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)
|
|
|
|
*/
|
2007-10-01 09:16:59 +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 */
|
2004-08-16 23:09:52 +02:00
|
|
|
dwSleepTime = (wwi->dwFragmentSize * 1000) / wwi->waveFormat.Format.nAvgBytesPerSec;
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("sleeptime=%d 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;
|
|
|
|
|
2007-10-01 09:16:59 +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 */
|
2007-10-01 09:16:59 +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
|
|
|
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("bytesRead=%d (direct)\n", bytesRead);
|
2004-03-29 22:27:50 +02:00
|
|
|
if (bytesRead != (DWORD) -1)
|
2000-10-24 04:20:01 +02:00
|
|
|
{
|
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
|
|
|
}
|
2004-03-29 22:27:50 +02:00
|
|
|
} else {
|
2007-10-01 09:16:59 +02:00
|
|
|
TRACE("read(%s, %p, %d) failed (%s)\n", wwi->ossdev.dev_name,
|
2004-03-29 22:27:50 +02:00
|
|
|
lpWaveHdr->lpData + lpWaveHdr->dwBytesRecorded,
|
|
|
|
wwi->dwFragmentSize, strerror(errno));
|
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 */
|
2007-10-01 09:16:59 +02:00
|
|
|
bytesRead = read(wwi->ossdev.fd, buffer, wwi->dwFragmentSize);
|
2000-11-25 03:10:53 +01:00
|
|
|
pOffset = buffer;
|
|
|
|
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("bytesRead=%d (local)\n", bytesRead);
|
2000-11-25 03:10:53 +01:00
|
|
|
|
2004-03-29 22:27:50 +02:00
|
|
|
if (bytesRead == (DWORD) -1) {
|
2007-10-01 09:16:59 +02:00
|
|
|
TRACE("read(%s, %p, %d) failed (%s)\n", wwi->ossdev.dev_name,
|
2004-03-29 22:27:50 +02:00
|
|
|
buffer, wwi->dwFragmentSize, strerror(errno));
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
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);
|
2004-08-18 02:30:01 +02:00
|
|
|
TRACE("msg = %s, hdr = %p, ev = %p\n", getCmdString(msg), hdr, ev);
|
2003-03-04 03:11:21 +01:00
|
|
|
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
|
|
|
|
*/
|
2006-10-06 22:59:51 +02:00
|
|
|
WARN("buffer under run! %u bytes dropped.\n", bytesRead);
|
2003-03-04 03:11:21 +01:00
|
|
|
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))
|
|
|
|
{
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("msg=%s param=0x%x\n", getCmdString(msg), 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
|
|
|
|
2007-10-01 09:16:59 +02:00
|
|
|
if (wwi->ossdev.bTriggerSupport)
|
2000-11-25 03:10:53 +01:00
|
|
|
{
|
|
|
|
/* start the recording */
|
2007-10-01 09:16:59 +02:00
|
|
|
wwi->ossdev.bInputEnabled = TRUE;
|
|
|
|
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-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 */
|
2007-10-01 09:16:59 +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)
|
|
|
|
{
|
2007-10-01 09:16:59 +02:00
|
|
|
if (wwi->ossdev.bTriggerSupport)
|
2003-11-04 05:20:47 +01:00
|
|
|
{
|
|
|
|
/* stop the recording */
|
2007-10-01 09:16:59 +02:00
|
|
|
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-04 05:20:47 +01:00
|
|
|
}
|
|
|
|
}
|
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)
|
|
|
|
{
|
2007-10-01 09:16:59 +02:00
|
|
|
if (wwi->ossdev.bTriggerSupport)
|
2003-11-14 22:03:24 +01:00
|
|
|
{
|
|
|
|
/* stop the recording */
|
2007-10-01 09:16:59 +02:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
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;
|
2007-10-01 09:16:59 +02:00
|
|
|
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));
|
2004-03-12 20:43:44 +01:00
|
|
|
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]
|
|
|
|
*/
|
2004-10-27 00:04:55 +02:00
|
|
|
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;
|
2004-03-29 22:27:50 +02:00
|
|
|
audio_buf_info info;
|
2002-06-28 19:31:31 +02:00
|
|
|
int audio_fragment;
|
|
|
|
DWORD ret;
|
2000-06-24 19:54:43 +02:00
|
|
|
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("(%u, %p, %08X);\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;
|
|
|
|
}
|
2004-03-29 22:27:50 +02:00
|
|
|
if (wDevID >= numInDev) {
|
|
|
|
WARN("bad device id: %d >= %d\n", wDevID, numInDev);
|
|
|
|
return MMSYSERR_BADDEVICEID;
|
|
|
|
}
|
1999-09-22 18:45:33 +02:00
|
|
|
|
|
|
|
/* only PCM format is supported so far... */
|
2004-08-16 23:09:52 +02:00
|
|
|
if (!supportedFormat(lpDesc->lpFormat)) {
|
2006-10-06 22:59:51 +02:00
|
|
|
WARN("Bad format: tag=%04X nChannels=%d nSamplesPerSec=%d !\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) {
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("Query format: tag=%04X nChannels=%d nSamplesPerSec=%d !\n",
|
1999-09-22 18:45:33 +02:00
|
|
|
lpDesc->lpFormat->wFormatTag, lpDesc->lpFormat->nChannels,
|
|
|
|
lpDesc->lpFormat->nSamplesPerSec);
|
|
|
|
return MMSYSERR_NOERROR;
|
|
|
|
}
|
|
|
|
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("OSS_OpenDevice requested this format: %dx%dx%d %s\n",
|
2004-08-18 02:30:01 +02:00
|
|
|
lpDesc->lpFormat->nSamplesPerSec,
|
|
|
|
lpDesc->lpFormat->wBitsPerSample,
|
|
|
|
lpDesc->lpFormat->nChannels,
|
|
|
|
lpDesc->lpFormat->wFormatTag == WAVE_FORMAT_PCM ? "WAVE_FORMAT_PCM" :
|
|
|
|
lpDesc->lpFormat->wFormatTag == WAVE_FORMAT_EXTENSIBLE ? "WAVE_FORMAT_EXTENSIBLE" :
|
|
|
|
"UNSUPPORTED");
|
|
|
|
|
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
|
|
|
|
2004-04-13 00:01:47 +02:00
|
|
|
if ((dwFlags & WAVE_DIRECTSOUND) &&
|
2007-10-01 09:16:59 +02:00
|
|
|
!(wwi->ossdev.in_caps_support & WAVECAPS_DIRECTSOUND))
|
2003-02-15 00:59:15 +01:00
|
|
|
/* not supported, ignore it */
|
|
|
|
dwFlags &= ~WAVE_DIRECTSOUND;
|
|
|
|
|
|
|
|
if (dwFlags & WAVE_DIRECTSOUND) {
|
2003-03-04 03:11:21 +01:00
|
|
|
TRACE("has DirectSoundCapture driver\n");
|
2007-10-01 09:16:59 +02:00
|
|
|
if (wwi->ossdev.in_caps_support & WAVECAPS_SAMPLEACCURATE)
|
2003-02-15 00:59:15 +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;
|
|
|
|
} else {
|
2003-03-04 03:11:21 +01:00
|
|
|
TRACE("doesn't have DirectSoundCapture driver\n");
|
2007-10-01 09:16:59 +02:00
|
|
|
if (wwi->ossdev.open_count > 0) {
|
2003-09-27 04:20:19 +02:00
|
|
|
TRACE("Using output device audio_fragment\n");
|
2004-04-13 00:01:47 +02:00
|
|
|
/* FIXME: This may not be optimal for capture but it allows us
|
2003-09-27 04:20:19 +02:00
|
|
|
* to do hardware playback without hardware capture. */
|
2007-10-01 09:16:59 +02:00
|
|
|
audio_fragment = wwi->ossdev.audio_fragment;
|
2003-09-27 04:20:19 +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.
|
|
|
|
*/
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("requesting %d %d byte fragments (%d ms)\n", audio_fragment >> 16,
|
2004-04-13 00:01:47 +02:00
|
|
|
1 << (audio_fragment & 0xffff),
|
2003-11-04 05:20:47 +01:00
|
|
|
((1 << (audio_fragment & 0xffff)) * 1000) / lpDesc->lpFormat->nAvgBytesPerSec);
|
2003-02-15 00:59:15 +01:00
|
|
|
|
2007-10-01 09:16:59 +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,
|
2005-05-30 13:12:07 +02:00
|
|
|
lpDesc->lpFormat->nChannels,
|
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);
|
|
|
|
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);
|
|
|
|
|
2004-08-16 23:09:52 +02:00
|
|
|
memcpy(&wwi->waveDesc, lpDesc, sizeof(WAVEOPENDESC));
|
|
|
|
copy_format(lpDesc->lpFormat, &wwi->waveFormat);
|
1999-09-22 18:45:33 +02:00
|
|
|
|
2004-08-16 23:09:52 +02:00
|
|
|
if (wwi->waveFormat.Format.wBitsPerSample == 0) {
|
2000-08-25 23:33:45 +02:00
|
|
|
WARN("Resetting zeroed wBitsPerSample\n");
|
2004-08-16 23:09:52 +02:00
|
|
|
wwi->waveFormat.Format.wBitsPerSample = 8 *
|
|
|
|
(wwi->waveFormat.Format.nAvgBytesPerSec /
|
|
|
|
wwi->waveFormat.Format.nSamplesPerSec) /
|
|
|
|
wwi->waveFormat.Format.nChannels;
|
2000-06-24 19:54:43 +02:00
|
|
|
}
|
2000-08-25 23:33:45 +02:00
|
|
|
|
2007-10-01 09:16:59 +02:00
|
|
|
if (ioctl(wwi->ossdev.fd, SNDCTL_DSP_GETISPACE, &info) < 0) {
|
2004-03-29 22:27:50 +02:00
|
|
|
ERR("ioctl(%s, SNDCTL_DSP_GETISPACE) failed (%s)\n",
|
2007-10-01 09:16:59 +02:00
|
|
|
wwi->ossdev.dev_name, strerror(errno));
|
|
|
|
OSS_CloseDevice(&wwi->ossdev);
|
2002-10-07 20:23:40 +02:00
|
|
|
wwi->state = WINE_WS_CLOSED;
|
2000-08-25 23:33:45 +02:00
|
|
|
return MMSYSERR_NOTENABLED;
|
|
|
|
}
|
2004-03-29 22:27:50 +02:00
|
|
|
|
|
|
|
TRACE("got %d %d byte fragments (%d ms/fragment)\n", info.fragstotal,
|
2007-10-01 09:16:59 +02:00
|
|
|
info.fragsize, (info.fragsize * 1000) / (wwi->ossdev.sample_rate *
|
|
|
|
wwi->ossdev.channels * (wwi->ossdev.format == AFMT_U8 ? 1 : 2)));
|
2004-04-13 00:01:47 +02:00
|
|
|
|
2004-03-29 22:27:50 +02:00
|
|
|
wwi->dwFragmentSize = info.fragsize;
|
2000-08-25 23:33:45 +02:00
|
|
|
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("dwFragmentSize=%u\n", wwi->dwFragmentSize);
|
|
|
|
TRACE("wBitsPerSample=%u, nAvgBytesPerSec=%u, nSamplesPerSec=%u, nChannels=%u nBlockAlign=%u!\n",
|
2004-08-16 23:09:52 +02:00
|
|
|
wwi->waveFormat.Format.wBitsPerSample, wwi->waveFormat.Format.nAvgBytesPerSec,
|
|
|
|
wwi->waveFormat.Format.nSamplesPerSec, wwi->waveFormat.Format.nChannels,
|
|
|
|
wwi->waveFormat.Format.nBlockAlign);
|
2000-06-24 19:54:43 +02:00
|
|
|
|
2001-12-21 21:28:43 +01:00
|
|
|
OSS_InitRingMessage(&wwi->msgRing);
|
|
|
|
|
2004-12-06 21:55:25 +01:00
|
|
|
wwi->hStartUpEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
|
2000-06-24 19:54:43 +02:00
|
|
|
wwi->hThread = CreateThread(NULL, 0, widRecorder, (LPVOID)(DWORD)wDevID, 0, &(wwi->dwThreadID));
|
2005-05-14 20:49:40 +02:00
|
|
|
if (wwi->hThread)
|
|
|
|
SetThreadPriority(wwi->hThread, THREAD_PRIORITY_TIME_CRITICAL);
|
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);
|
2007-10-01 09:16:59 +02:00
|
|
|
OSS_CloseDevice(&wwi->ossdev);
|
2002-10-07 20:23:40 +02:00
|
|
|
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
|
|
|
{
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("(%u, %p, %08X);\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
|
|
|
* 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
|
|
|
WINE_WAVEIN* wwi;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("(%u, %p, %u);\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
|
2007-10-01 09:16:59 +02:00
|
|
|
if (wwi->ossdev.in_caps_support & WAVECAPS_SAMPLEACCURATE)
|
2004-07-24 01:01:21 +02:00
|
|
|
OSS_AddRingMessage(&(wwi->msgRing), WINE_WM_UPDATE, 0, TRUE);
|
2004-03-12 20:43:44 +01:00
|
|
|
#endif
|
2000-06-24 19:54:43 +02:00
|
|
|
|
2004-08-16 23:09:52 +02:00
|
|
|
return bytes_to_mmtime(lpTime, wwi->dwTotalRecorded, &wwi->waveFormat);
|
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
|
|
|
{
|
2006-10-06 22:59:51 +02:00
|
|
|
TRACE("(%u, %s, %08X, %08X, %08X);\n",
|
2004-07-06 20:43:57 +02:00
|
|
|
wDevID, getMessage(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);
|
2005-03-17 19:56:14 +01:00
|
|
|
case WIDM_PREPARE: return MMSYSERR_NOTSUPPORTED;
|
|
|
|
case WIDM_UNPREPARE: return MMSYSERR_NOTSUPPORTED;
|
2004-12-06 21:55:25 +01:00
|
|
|
case WIDM_GETDEVCAPS: return widGetDevCaps (wDevID, (LPWAVEINCAPSW)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);
|
2005-05-29 22:02:58 +02:00
|
|
|
case DRV_QUERYDEVICEINTERFACESIZE: return widDevInterfaceSize (wDevID, (LPDWORD)dwParam1);
|
|
|
|
case DRV_QUERYDEVICEINTERFACE: return widDevInterface (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);
|
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
|
|
|
}
|
|
|
|
|
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
|
|
|
{
|
2006-10-06 22:59:51 +02:00
|
|
|
FIXME("(%u, %04X, %08X, %08X, %08X):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
|
|
|
{
|
2006-10-06 22:59:51 +02:00
|
|
|
FIXME("(%u, %04X, %08X, %08X, %08X):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 */
|