00001 // 00002 // AudioSessionTypes.h -- Copyright Microsoft Corporation, All Rights Reserved. 00003 // 00004 // Description: Type definitions used by the audio session manager RPC/COM interfaces 00005 // 00006 #pragma once 00007 00008 #ifndef __AUDIOSESSIONTYPES__ 00009 #define __AUDIOSESSIONTYPES__ 00010 00011 #if defined(__midl) 00012 #define MIDL_SIZE_IS(x) [size_is(x)] 00013 #define MIDL_STRING [string] 00014 #define MIDL_ANYSIZE_ARRAY 00015 #else // !defined(__midl) 00016 #define MIDL_SIZE_IS(x) 00017 #define MIDL_STRING 00018 #define MIDL_ANYSIZE_ARRAY ANYSIZE_ARRAY 00019 #endif // defined(__midl) 00020 00021 //------------------------------------------------------------------------- 00022 // Description: AudioClient share mode 00023 // 00024 // AUDCLNT_SHAREMODE_SHARED - The device will be opened in shared mode and use the 00025 // WAS format. 00026 // AUDCLNT_SHAREMODE_EXCLUSIVE - The device will be opened in exclusive mode and use the 00027 // application specified format. 00028 // 00029 typedef enum _AUDCLNT_SHAREMODE 00030 { 00031 AUDCLNT_SHAREMODE_SHARED, 00032 AUDCLNT_SHAREMODE_EXCLUSIVE 00033 } AUDCLNT_SHAREMODE; 00034 00035 //------------------------------------------------------------------------- 00036 // Description: AudioClient stream flags 00037 // 00038 // Can be a combination of AUDCLNT_STREAMFLAGS and AUDCLNT_SYSFXFLAGS: 00039 // 00040 // AUDCLNT_STREAMFLAGS (this group of flags uses the high word, w/exception of high-bit which is reserved, 0x7FFF0000): 00041 // 00042 // AUDCLNT_STREAMFLAGS_CROSSPROCESS - Audio policy control for this stream will be shared with 00043 // with other process sessions that use the same audio session 00044 // GUID. 00045 // AUDCLNT_STREAMFLAGS_LOOPBACK - Initializes a renderer endpoint for a loopback audio application. 00046 // In this mode, a capture stream will be opened on the specified 00047 // renderer endpoint. Shared mode and a renderer endpoint is required. 00048 // Otherwise the IAudioClient::Initialize call will fail. If the 00049 // initialize is successful, a capture stream will be available 00050 // from the IAudioClient object. 00051 // 00052 // AUDCLNT_STREAMFLAGS_EVENTCALLBACK - An exclusive mode client will supply an event handle that will be 00053 // signaled when an IRP completes (or a waveRT buffer completes) telling 00054 // it to fill the next buffer 00055 // 00056 // AUDCLNT_STREAMFLAGS_NOPERSIST - Session state will not be persisted 00057 // 00058 // AUDCLNT_SYSFXFLAGS (these flags use low word 0x0000FFFF): 00059 // 00060 // none defined currently 00061 // 00062 #define AUDCLNT_STREAMFLAGS_CROSSPROCESS 0x00010000 00063 #define AUDCLNT_STREAMFLAGS_LOOPBACK 0x00020000 00064 #define AUDCLNT_STREAMFLAGS_EVENTCALLBACK 0x00040000 00065 #define AUDCLNT_STREAMFLAGS_NOPERSIST 0x00080000 00066 00067 //------------------------------------------------------------------------- 00068 // Description: Device share mode - sharing mode for the audio device. 00069 // 00070 // DeviceShared - The device can be shared with other processes. 00071 // DeviceExclusive - The device will only be used by this process. 00072 // 00073 typedef enum _DeviceShareMode 00074 { 00075 DeviceShared, 00076 DeviceExclusive 00077 } DeviceShareMode; 00078 00079 00080 //------------------------------------------------------------------------- 00081 // Description: AudioSession State. 00082 // 00083 // AudioSessionStateInactive - The session has no active audio streams. 00084 // AudioSessionStateActive - The session has active audio streams. 00085 // AudioSessionStateExpired - The session is dormant. 00086 typedef enum _AudioSessionState 00087 { 00088 AudioSessionStateInactive = 0, 00089 AudioSessionStateActive = 1, 00090 AudioSessionStateExpired = 2 00091 } AudioSessionState; 00092 00093 #endif 00094