[xiph-cvs] cvs commit: ao/src/plugins/dsound ao_dsound.c dsound.def dsound.dep dsound.dsp dsound.mak
Chris Wolf
cwolf at xiph.org
Wed Sep 5 12:28:08 PDT 2001
cwolf 01/09/05 12:28:08
Added: src/plugins/dsound ao_dsound.c dsound.def dsound.dep
dsound.dsp dsound.mak
Log:
Add skeleton DirectSound plugin.
Revision Changes Path
1.1 ao/src/plugins/dsound/ao_dsound.c
Index: ao_dsound.c
===================================================================
/*
* $Id: ao_dsound.c,v 1.1 2001/09/05 19:28:07 cwolf Exp $
* $Name: $
*
* Skeleton DirectSound plugin, just a place holder until test code
* is integrated.
*
* 04 Sept 2001, Chris Wolf - create.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ao/ao.h>
#include <ao/plugin.h>
#include <dsound.h>
tatic char *ao_dsound_options[] = {"hwnd"};
tatic ao_info ao_dsound_info =
{
AO_TYPE_LIVE,
"DirectSound output",
"dsound",
"Chris Wolf <code at starclass.com>",
"Output via DirectSound",
AO_FMT_NATIVE,
10,
ao_dsound_options,
1
};
typedef struct ao_dsound_internal
{
HWND hwnd; /* Controlling window handle */
LPDIRECTSOUND lpDS; /* DirectSound object */
LPDIRECTSOUNDBUFFER lpDSBuf; /* DirectSound buffer object */
} ao_dsound_internal;
int ao_plugin_test()
{
return 1;
}
ao_info *ao_plugin_driver_info(void)
{
return &ao_dsound_info;
}
int ao_plugin_device_init(ao_device *device)
{
ao_dsound_internal *internal;
internal = (ao_dsound_internal *) malloc(sizeof(ao_dsound_internal));
if (internal == NULL)
return 0; /* Could not initialize device memory */
device->internal = internal;
return 1; /* Memory alloc successful */
}
int ao_plugin_set_option(ao_device *device, const char *key, const char *value)
{
ao_dsound_internal *internal = (ao_dsound_internal *) device->internal;
if (!strcmp(key, "HWND"))
{
internal->hwnd = *(HWND *)atoi(value);
}
return 1;
}
int ao_plugin_open(ao_device *device, ao_sample_format *format)
{
ao_dsound_internal *internal = (ao_dsound_internal *) device->internal;
return 1;
}
int ao_plugin_play(ao_device *device, const char* output_samples,
uint_32 num_bytes)
{
ao_dsound_internal *internal = (ao_dsound_internal *) device->internal;
return 1;
}
int ao_plugin_close(ao_device *device)
{
ao_dsound_internal *internal = (ao_dsound_internal *) device->internal;
return 1;
}
void ao_plugin_device_clear(ao_device *device)
{
ao_dsound_internal *internal = (ao_dsound_internal *) device->internal;
if (device->internal)
free(internal);
}
1.1 ao/src/plugins/dsound/dsound.def
Index: dsound.def
===================================================================
;------------------------------------------------------------------------
; $Id: dsound.def,v 1.1 2001/09/05 19:28:07 cwolf Exp $
; $Name: $
;
; Win32 port, September 2001 Chris Wolf
;------------------------------------------------------------------------
;
; This should be kept syncronized with the publicly exposed API
; defined by plugin.h
;
LIBRARY
; Don't explicitly name DLL here, let the linker do it.
;
DESCRIPTION "Entry points for dsound.dll"
;
EXPORTS
ao_plugin_test
ao_plugin_driver_info
ao_plugin_device_init
ao_plugin_set_option
ao_plugin_open
ao_plugin_play
ao_plugin_close
ao_plugin_device_clear
1.1 ao/src/plugins/dsound/dsound.dep
Index: dsound.dep
===================================================================
# Microsoft Developer Studio Generated Dependency File, included by dsound.mak
.\ao_dsound.c : \
"..\..\..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
"..\..\..\include\ao\ao.h"\
"..\..\..\include\ao\plugin.h"\
"..\..\..\win32\include\os_types.h"\
1.1 ao/src/plugins/dsound/dsound.dsp
Index: dsound.dsp
===================================================================
# Microsoft Developer Studio Project File - Name="dsound" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=dsound - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "dsound.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "dsound.mak" CFG="dsound - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "dsound - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "dsound - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "dsound - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 1
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DSOUND_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /I "..\..\..\win32\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../../../win32/lib/dsound.dll"
!ELSEIF "$(CFG)" == "dsound - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 1
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DSOUND_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\win32\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"../../../win32/lib/dsound_d.dll" /pdbtype:sept
!ENDIF
# Begin Target
# Name "dsound - Win32 Release"
# Name "dsound - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\ao_dsound.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# End Group
# Begin Group "Other Files"
# PROP Default_Filter "*.def"
# Begin Source File
SOURCE=.\dsound.def
# End Source File
# End Group
# End Target
# End Project
1.1 ao/src/plugins/dsound/dsound.mak
Index: dsound.mak
===================================================================
# Microsoft Developer Studio Generated NMAKE File, Based on dsound.dsp
!IF "$(CFG)" == ""
CFG=dsound - Win32 Debug
!MESSAGE No configuration specified. Defaulting to dsound - Win32 Debug.
!ENDIF
!IF "$(CFG)" != "dsound - Win32 Release" && "$(CFG)" != "dsound - Win32 Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "dsound.mak" CFG="dsound - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "dsound - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "dsound - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "dsound - Win32 Release"
OUTDIR=.\Release
INTDIR=.\Release
ALL : "..\..\..\win32\lib\dsound.dll"
CLEAN :
- at erase "$(INTDIR)\ao_dsound.obj"
- at erase "$(INTDIR)\vc60.idb"
- at erase "$(OUTDIR)\dsound.exp"
- at erase "..\..\..\win32\lib\dsound.dll"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\..\..\include" /I "..\..\..\win32\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\dsound.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\dsound.pdb" /machine:I386 /def:".\dsound.def" /out:"../../../win32/lib/dsound.dll" /implib:"$(OUTDIR)\dsound.lib"
DEF_FILE= \
".\dsound.def"
LINK32_OBJS= \
"$(INTDIR)\ao_dsound.obj"
"..\..\..\win32\lib\dsound.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "dsound - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
ALL : "..\..\..\win32\lib\dsound_d.dll"
CLEAN :
- at erase "$(INTDIR)\ao_dsound.obj"
- at erase "$(INTDIR)\vc60.idb"
- at erase "$(INTDIR)\vc60.pdb"
- at erase "$(OUTDIR)\dsound_d.exp"
- at erase "$(OUTDIR)\dsound_d.pdb"
- at erase "..\..\..\win32\lib\dsound_d.dll"
- at erase "..\..\..\win32\lib\dsound_d.ilk"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /I "..\..\..\win32\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\dsound.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\dsound_d.pdb" /debug /machine:I386 /def:".\dsound.def" /out:"../../../win32/lib/dsound_d.dll" /implib:"$(OUTDIR)\dsound_d.lib" /pdbtype:sept
DEF_FILE= \
".\dsound.def"
LINK32_OBJS= \
"$(INTDIR)\ao_dsound.obj"
"..\..\..\win32\lib\dsound_d.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("dsound.dep")
!INCLUDE "dsound.dep"
!ELSE
!MESSAGE Warning: cannot find "dsound.dep"
!ENDIF
!ENDIF
!IF "$(CFG)" == "dsound - Win32 Release" || "$(CFG)" == "dsound - Win32 Debug"
SOURCE=.\ao_dsound.c
"$(INTDIR)\ao_dsound.obj" : $(SOURCE) "$(INTDIR)"
!ENDIF
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list