mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:32:59 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
57
sdk/lib/drivers/sound/mmebuddy/functiontable.c
Normal file
57
sdk/lib/drivers/sound/mmebuddy/functiontable.c
Normal file
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Sound System "MME Buddy" Library
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: lib/drivers/sound/mmebuddy/functiontable.c
|
||||
*
|
||||
* PURPOSE: Routes function calls through a function table, calling
|
||||
* implementation-defined routines or a default function, depending
|
||||
* on configuration.
|
||||
*
|
||||
* PROGRAMMERS: Andrew Greenwood (silverblade@reactos.org)
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
/*
|
||||
Attaches a function table to a sound device. Any NULL entries in this
|
||||
table are automatically set to point to a default routine to handle
|
||||
the appropriate function.
|
||||
*/
|
||||
MMRESULT
|
||||
SetSoundDeviceFunctionTable(
|
||||
IN PSOUND_DEVICE SoundDevice,
|
||||
IN PMMFUNCTION_TABLE FunctionTable)
|
||||
{
|
||||
VALIDATE_MMSYS_PARAMETER( IsValidSoundDevice(SoundDevice) );
|
||||
VALIDATE_MMSYS_PARAMETER( FunctionTable );
|
||||
|
||||
/* Zero out the existing function table (if present) */
|
||||
ZeroMemory(&SoundDevice->FunctionTable, sizeof(MMFUNCTION_TABLE));
|
||||
|
||||
if ( ! FunctionTable )
|
||||
return MMSYSERR_INVALPARAM;
|
||||
|
||||
/* Fill in the client-supplied functions */
|
||||
CopyMemory(&SoundDevice->FunctionTable,
|
||||
FunctionTable,
|
||||
sizeof(MMFUNCTION_TABLE));
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/*
|
||||
Retrieves the function table for a sound device, as previously set using
|
||||
SetSoundDeviceFunctionTable.
|
||||
*/
|
||||
MMRESULT
|
||||
GetSoundDeviceFunctionTable(
|
||||
IN PSOUND_DEVICE SoundDevice,
|
||||
OUT PMMFUNCTION_TABLE* FunctionTable)
|
||||
{
|
||||
VALIDATE_MMSYS_PARAMETER( IsValidSoundDevice(SoundDevice) );
|
||||
VALIDATE_MMSYS_PARAMETER( FunctionTable );
|
||||
|
||||
*FunctionTable = &SoundDevice->FunctionTable;
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue