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::SetDeviceId

ISpMMSysAudio::SetDeviceId sets the multimedia device ID.

HRESULT SetDeviceId(
   UINT   uDeviceId
);

Parameters

uDeviceId
[in] The device ID of the device to set.

Return values

Value Description
S_OK Function completed successfully.
SPERR_DEVICE_BUSY Object is not in the SPAS_CLOSED state.
SPERR_ALREADY_INITIALIZED Object was created using an object token.
E_INVALIDARG uDeviceId is invalid. It is not set to WAVE_MAPPER or device does not exist.

Remarks

This method works only on audio objects that were not created using an object token, and only when the object is in the SPAS_CLOSED state. This method should not be used in normal application development. SAPI provides tokens for all the available sound devices in a computer and these can be used to create an initialized SpMMSysAudio object. This method is available for non-standard multimedia audio devices. See the Simple Telephony sample for an example of when this method is useful.

Example

The following code snippet illustrates the use of ISpMMSysAudio::SetDeviceId.

    HRESULT hr = S_OK;

    // create the multimedia output object
    hr = cpMMSysAudio.CoCreateInstance(CLSID_SpMMAudioOut);
    // Check hr

    // set the output device to an alternate multimedia device (e.g. modem)
    hr = cpMMSysAudio->SetDeviceId(ALTERNATE_MM_DEVICE);
    // Check hr


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