Author: nyadav
Date: Tue May 24 10:52:20 2011
New Revision: 51878
URL:
http://svn.reactos.org/svn/reactos?rev=51878&view=rev
Log:
add audiosrv2dll with c files
Added:
branches/nyadav-audio-branch/dll/win32/audiosrv2/ (with props)
branches/nyadav-audio-branch/dll/win32/audiosrv2/CMakeLists.txt (with props)
branches/nyadav-audio-branch/dll/win32/audiosrv2/audiosrv2dll.spec (with props)
branches/nyadav-audio-branch/dll/win32/audiosrv2/dllmain.c (with props)
Propchange: branches/nyadav-audio-branch/dll/win32/audiosrv2/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Tue May 24 10:52:20 2011
@@ -1,0 +1,2 @@
+([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))?
+(\d+)
Propchange: branches/nyadav-audio-branch/dll/win32/audiosrv2/
------------------------------------------------------------------------------
bugtraq:message = See issue #%BUGID% for more details.
Propchange: branches/nyadav-audio-branch/dll/win32/audiosrv2/
------------------------------------------------------------------------------
bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: branches/nyadav-audio-branch/dll/win32/audiosrv2/
------------------------------------------------------------------------------
tsvn:logminsize = 10
Added: branches/nyadav-audio-branch/dll/win32/audiosrv2/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/dll/win32/a…
==============================================================================
--- branches/nyadav-audio-branch/dll/win32/audiosrv2/CMakeLists.txt (added)
+++ branches/nyadav-audio-branch/dll/win32/audiosrv2/CMakeLists.txt [iso-8859-1] Tue May
24 10:52:20 2011
@@ -1,0 +1,16 @@
+
+include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs/audiosrv2)
+
+spec2def(audiosrv2dll.dll audiosrv2dll.spec)
+
+list(APPEND SOURCE
+ dllmain.c
+ ${CMAKE_CURRENT_BINARY_DIR}/audiosrv2dll.def)
+
+add_library(audiosrv2dll SHARED ${SOURCE})
+set_module_type(audiosrv2dll win32dll)
+
+target_link_libraries(audiosrv2dll uuid wine)
+add_importlibs(audiosrv2dll ole32 oleaut32 user32 advapi32 msvcrt kernel32 ntdll)
+add_cab_target(audiosrv2dll 1)
+add_importlib_target(audiosrv2dll.spec)
Propchange: branches/nyadav-audio-branch/dll/win32/audiosrv2/CMakeLists.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: branches/nyadav-audio-branch/dll/win32/audiosrv2/CMakeLists.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: branches/nyadav-audio-branch/dll/win32/audiosrv2/audiosrv2dll.spec
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/dll/win32/a…
==============================================================================
--- branches/nyadav-audio-branch/dll/win32/audiosrv2/audiosrv2dll.spec (added)
+++ branches/nyadav-audio-branch/dll/win32/audiosrv2/audiosrv2dll.spec [iso-8859-1] Tue
May 24 10:52:20 2011
@@ -1,0 +1,1 @@
+@ stdcall getmixerengine()
Propchange: branches/nyadav-audio-branch/dll/win32/audiosrv2/audiosrv2dll.spec
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: branches/nyadav-audio-branch/dll/win32/audiosrv2/audiosrv2dll.spec
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: branches/nyadav-audio-branch/dll/win32/audiosrv2/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/dll/win32/a…
==============================================================================
--- branches/nyadav-audio-branch/dll/win32/audiosrv2/dllmain.c (added)
+++ branches/nyadav-audio-branch/dll/win32/audiosrv2/dllmain.c [iso-8859-1] Tue May 24
10:52:20 2011
@@ -1,0 +1,68 @@
+
+#include <audiosrv.h>
+
+static MixerEngine * lpvMem = NULL;
+static HANDLE hMapObject = NULL;
+
+BOOL APIENTRY DllMain( HMODULE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved
+ )
+{
+BOOL fInit, fIgnore;
+ switch (ul_reason_for_call)
+ {
+ case DLL_PROCESS_ATTACH:
+ hMapObject = CreateFileMapping(
+ INVALID_HANDLE_VALUE, // use paging file
+ NULL, // default security attributes
+ PAGE_READWRITE, // read/write access
+ 0, // size: high 32-bits
+ sizeof(MixerEngine),TEXT("MixerEngine")); // size:
low 32-bits
+ if (hMapObject == NULL)
+ return FALSE;
+
+ fInit = (GetLastError() != ERROR_ALREADY_EXISTS);
+
+ lpvMem = (MixerEngine *)MapViewOfFile(
+ hMapObject, // object to map view of
+ FILE_MAP_WRITE, // read/write access
+ 0, // high offset: map from
+ 0, // low offset: beginning
+ 0); // default: map entire file
+ if (lpvMem == NULL)
+ return FALSE;
+
+ if (fInit)
+ lpvMem->dead=0;
+ lpvMem->masterchannels=0;
+ lpvMem->masterbitspersample=0;
+ lpvMem->masterchannelmask=0;
+ lpvMem->masterdoublebuf[0]=NULL;
+ lpvMem->masterdoublebuf[1]=NULL;
+ lpvMem->masterfreq=0;
+ lpvMem->mastervolume=0;
+ lpvMem->mute=0;
+ lpvMem->portstream=NULL;
+ lpvMem->workingbuffer=0;
+ lpvMem->mixerthread=NULL;
+ lpvMem->playerthread=NULL;
+ lpvMem->EventPool[0]=CreateEvent(NULL,FALSE,FALSE,NULL);
+ lpvMem->EventPool[1]=CreateEvent(NULL,FALSE,FALSE,NULL);
+
+ break;
+ case DLL_THREAD_ATTACH:
+ case DLL_THREAD_DETACH:
+ break;
+ case DLL_PROCESS_DETACH:
+ fIgnore = UnmapViewOfFile(lpvMem);
+ fIgnore = CloseHandle(hMapObject);
+ break;
+ }
+ return TRUE;
+}
+
+__declspec(dllexport) MixerEngine * getmixerengine()
+{
+return lpvMem;
+}
Propchange: branches/nyadav-audio-branch/dll/win32/audiosrv2/dllmain.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: branches/nyadav-audio-branch/dll/win32/audiosrv2/dllmain.c
------------------------------------------------------------------------------
svn:mime-type = text/plain