Sample Code

Windows Driver Samples/ Microsoft Virtual Audio Device Driver Sample/ C++/ hw.h/

/*++

Copyright (c) 1997-2000  Microsoft Corporation All Rights Reserved

Module Name:

    hw.h

Abstract:

    Declaration of MSVAD HW class. 
    MSVAD HW has an array for storing mixer and volume settings
    for the topology.

--*/

#ifndef _MSVAD_HW_H_
#define _MSVAD_HW_H_

//=============================================================================
// Defines
//=============================================================================
// BUGBUG we should dynamically allocate this...
#define MAX_TOPOLOGY_NODES      20

//=============================================================================
// Classes
//=============================================================================
///////////////////////////////////////////////////////////////////////////////
// CMSVADHW
// This class represents virtual MSVAD HW. An array representing volume
// registers and mute registers.

class CMSVADHW
{
public:
protected:
    BOOL                        m_MuteControls[MAX_TOPOLOGY_NODES];
    LONG                        m_VolumeControls[MAX_TOPOLOGY_NODES];
    ULONG                       m_ulMux;            // Mux selection
    BOOL                        m_bDevSpecific;
    INT                         m_iDevSpecific;
    UINT                        m_uiDevSpecific;

private:

public:
    CMSVADHW();
    
    void                        MixerReset();
    BOOL                        bGetDevSpecific();
    void                        bSetDevSpecific
    (
        IN  BOOL                bDevSpecific
    );
    INT                         iGetDevSpecific();
    void                        iSetDevSpecific
    (
        IN  INT                 iDevSpecific
    );
    UINT                        uiGetDevSpecific();
    void                        uiSetDevSpecific
    (
        IN  UINT                uiDevSpecific
    );
    BOOL                        GetMixerMute
    (
        IN  ULONG               ulNode
    );
    void                        SetMixerMute
    (
        IN  ULONG               ulNode,
        IN  BOOL                fMute
    );
    ULONG                       GetMixerMux();
    void                        SetMixerMux
    (
        IN  ULONG               ulNode
    );
    LONG                        GetMixerVolume
    (   
        IN  ULONG               ulNode,
        IN  LONG                lChannel
    );
    void                        SetMixerVolume
    (   
        IN  ULONG               ulNode,
        IN  LONG                lChannel,
        IN  LONG                lVolume
    );

protected:
private:
};
typedef CMSVADHW                *PCMSVADHW;

#endif

Our Services

  • What our customers say about us?

© 2011-2024 All Rights Reserved. Joya Systems. 4425 South Mopac Building II Suite 101 Austin, TX 78735 Tel: 800-DEV-KERNEL

Privacy Policy. Terms of use. Valid XHTML & CSS