CHMlib Logo Leading Translation Management System for Translation Agencies, Top Translation Management Software for Freelance Translators, Time Tracking Software, Word Count, Character Count and Line Count Software, Computer Assisted Translation Tool for Easy Word Count, Clipboard Character Count Software, User-Friendly Translation Memory Software, Terminology Management Software, Terminology Management Server, Microsoft Glossary Software, Dictionary of Acronyms, Social Network for Translators and Translation Agencies, Acronyms and Abbreviations Search Engine, Russian Translation Lab, Ukrainian Translation Lab.
You are reading help file online using chmlib.com
CrisisHelper - First Aid in Tough Times of World Economic Crisis


The Microsoft.com Speech website Microsoft Speech SDK

SAPI 5.1

ISpMMSysAudio::GetDeviceId

ISpMMSysAudio::GetDeviceId passes back the multimedia device ID being used by the audio object.

HRESULT GetDeviceId(
   UINT  *puDeviceId
);

Parameters

puDeviceId
[out] Pointer receiving the device ID.

Return values

Value Description
S_OK Function completed successfully.
E_POINTER puDeviceId is a bad pointer.

Remarks

The default device ID for SpMMSysAudio objects that are created using CoCreateInstance is the WAVE_MAPPER. For audio objects created using an object token, the ID will always be a specific wave in or wave out device ID.

Example

The following code snippet illustrates the use of ISpMMSysAudio::GetDeviceId using CoCreateInstance.

    HRESULT hr = S_OK;

    // create the multimedia input object
    hr = cpMMSysAudio.CoCreateInstance(CLSID_SpMMAudioIn);
    // Check hr

    // get the default device id
    UINT uiDeviceId;
    hr = cpMMSysAudio->GetDeviceId(&uiDeviceId);
    // Check hr

    // uiDeviceId == WAVE_MAPPER

The following code snippet illustrates the use of ISpMMSysAudio::GetDeviceId using an ISpObjectToken

    HRESULT hr = S_OK;

    // get the current multimedia object's object token
    hr = cpMMSysAudio.QueryInterface(&cpObjectWithToken);
    // Check hr

    // Find the preferred multimedia object token
    hr = SpFindBestToken(SPCAT_AUDIOIN, L"Technology=MMSys", NULL, &cpObjectToken);
    // Check hr

    // set the current multimedia object to the preferred multimedia object token
    hr = cpObjectWithToken->SetObjectToken(cpObjectToken);
    // Check hr

    // get the device id for the object 
    UINT uiDeviceId;
    hr = cpMMSysAudio->GetDeviceId(&uiDeviceId);
    // Check hr

    // uiDeviceId != WAVE_MAPPER


You are reading help file online using chmlib.com

If you want your help file to be removed or added please send e-mail to chmlibcom@gmail.com
Partner sites: Logo Design, Simple Anti-Crisis Accounting Software, Voice Search for Web