Author: nyadav
Date: Fri Apr 22 17:24:36 2011
New Revision: 51432
URL:
http://svn.reactos.org/svn/reactos?rev=51432&view=rev
Log:
Add audiosrv2dll
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/audiosrv.cpp (with props)
branches/nyadav-audio-branch/dll/win32/audiosrv2/audiosrv2dll.spec (with props)
branches/nyadav-audio-branch/dll/win32/audiosrv2/dllmain.cpp (with props)
Modified:
branches/nyadav-audio-branch/dll/win32/CMakeLists.txt
Modified: branches/nyadav-audio-branch/dll/win32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/dll/win32/C…
==============================================================================
--- branches/nyadav-audio-branch/dll/win32/CMakeLists.txt [iso-8859-1] (original)
+++ branches/nyadav-audio-branch/dll/win32/CMakeLists.txt [iso-8859-1] Fri Apr 22 17:24:36
2011
@@ -7,6 +7,7 @@
add_subdirectory(advpack)
add_subdirectory(atl)
add_subdirectory(authz)
+add_subdirectory(audiosrv2)
add_subdirectory(avicap32)
add_subdirectory(avifil32)
add_subdirectory(batt)
Propchange: branches/nyadav-audio-branch/dll/win32/audiosrv2/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Fri Apr 22 17:24:36 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] Fri Apr
22 17:24:36 2011
@@ -1,0 +1,16 @@
+include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs/audiosrv2)
+
+spec2def(audiosrv2dll.dll audiosrv2dll.spec)
+
+list(APPEND SOURCE
+ dllmain.cpp
+ audiosrv.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/audiosrv2dll.def)
+
+add_library(audiosrv2dll SHARED ${SOURCE})
+set_entrypoint(audiosrv2dll 0)
+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)
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/audiosrv.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/dll/win32/a…
==============================================================================
--- branches/nyadav-audio-branch/dll/win32/audiosrv2/audiosrv.cpp (added)
+++ branches/nyadav-audio-branch/dll/win32/audiosrv2/audiosrv.cpp [iso-8859-1] Fri Apr 22
17:24:36 2011
@@ -1,0 +1,13 @@
+#include <audiosrv.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void dummy()
+{
+}
+
+#ifdef __cplusplus
+}
+#endif
Propchange: branches/nyadav-audio-branch/dll/win32/audiosrv2/audiosrv.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: branches/nyadav-audio-branch/dll/win32/audiosrv2/audiosrv.cpp
------------------------------------------------------------------------------
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] Fri
Apr 22 17:24:36 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.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/dll/win32/a…
==============================================================================
--- branches/nyadav-audio-branch/dll/win32/audiosrv2/dllmain.cpp (added)
+++ branches/nyadav-audio-branch/dll/win32/audiosrv2/dllmain.cpp [iso-8859-1] Fri Apr 22
17:24:36 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.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: branches/nyadav-audio-branch/dll/win32/audiosrv2/dllmain.cpp
------------------------------------------------------------------------------
svn:mime-type = text/plain