[Topic 8] IMMNotificationClient Interface [내마음대로 해석] 프로그램


[Topic 8] IMMNotificationClient Interface

The IMMNotificationClient interface provides notifications when an audio endpoint device is added or removed, when the state or properties of an endpoint device change, or when there is a change in the default role assigned to an endpoint device.
IMMNotificationClient interface는  오디오 엔드포인트 장치가 추가되거나 삭제될때, 엔드포인트 장치의 속성에 변화가 생겼을때, 또는 엔드포인트 장치에서 디폴트 룰 할당이 변경되었을때 통지를 보내는 것을 제공한다.
Unlike the other interfaces in this section, which are implemented by the MMDevice API system component, an MMDevice API client implements the IMMNotificationClient interface.
이 섹션은 다른 인터페이스와는 달리, MMDevice API 시스템 컴포넌트에 의해 구현된다, MMDevice API는 클라이언트 IMMNotificationClient interface를 구현한다.
To receive notifications, the client passes a pointer to its IMMNotificationClient interface instance as a parameter to the IMMDeviceEnumerator::RegisterEndpointNotificationCallback method.
알림를 수신하려면 , IMMNotificationClient interface 인스턴스의 포인터를 IMMDeviceEnumerator::RegisterEndpointNotificationCallback 함수의 파라미터로 전달한다.

After registering its IMMNotificationClient interface, the client receives event notifications in the form of callbacks through the methods of the interface.
IMMNotificationClient interface 등록한 후에, 클라이언트 콜백의 형태로 인터페이스의 메서드를 통해 이벤트 알림을 받는다.

Each method in the IMMNotificationClient interface receives, as one of its input parameters, an endpoint ID string that identifies the audio endpoint device that is the subject of the notification.
IMMNotificationClient interface의 각 함수는, 하나의 입력 파라미터와 오디오 엔드포인트 장치의 식별을 위한 엔드포인트 ID 문자열을 리턴으로 통지를 받습니다.
The string uniquely identifies the device with respect to all of the other audio endpoint devices in the system.
모든 시스템내에 오디오 엔드포인트 장치들 중 하나의 오디오 엔드포인트 장치를 유일하게 식별할 수 있는 문자열이다.
The methods in the IMMNotificationClient interface implementation should treat this string as opaque.
IMMNotificationClient interface를 구현하는 방법으로 이 문자열을 불투명하게 구현해야 한다.
That is, none of the methods should attempt to parse the contents of the string to obtain information about the device.
즉, 누구든 장치에 대해 정보를 얻기 위해 문자열의 내용을 분석하기위한 시도를 해야 한다.
The reason is that the string format is undefined and might change from one implementation of the MMDevice API system module to the next.
이유는 문자열 형식 정의되지 않았고 MMDevice API는 시스템이 모듈을 하나의 구현에서 다음을 변경할 수도있습니다.

A client can use the endpoint ID string that it receives as an input parameter in a call to an IMMNotificationClient method in two ways:

클라이언트는 두가지 방법으로 MMNotificationClient 함수를 호출하여 입력 파라미터를 수신하기 위해 엔드포인트 ID 문자열을 사용할 수 있다.

- The client can create an instance of the device that the endpoint ID string identifies.
  클라이언트는 장치를 식별하기 위한 에드포인트 ID 문자열을 생성할 수 있다.
  The client does this by calling the IMMDeviceEnumerator::GetDevice method and supplying the endpoint ID string as an input parameter.
  클라이언트는IMMDeviceEnumerator::GetDevice 함수를 호출하고 입력 파라미터로 엔드포인트 ID문자열을 제공할 수 있다.
-The client can compare the endpoint ID string with the endpoint ID string of an existing device instance. To obtain the second endpoint ID string, the client calls the IMMDevice::GetId method of the device instance.
 클라이언트는 존재하는 장치 인스턴스의 엔드포인트 ID 문자열과 함께 엔드포인트 ID 문자열을 비교할 수 있다. 두번째 엔드포인트 ID 문자열을 얻기 위해서는 장치 인스턴스의 IMMDevice::GetId 함수 호출한다.
 If the two strings match, they identify the same device.
  만약 두 문자열이 같다면 그들은 같은 장치를 식별한다.
In implementing the IMMNotificationClient interface, the client should observe these rules to avoid deadlocks and undefined behavior:
IMMNotificationClient interface 구현에서,  데드락과 정의되지 않은 문제를 방지하려면 다음 규칙을 준수해야 한다.

- The methods of the interface must be nonblocking. The client should never wait on a synchronization object during an event callback.
  이 인터페이스 함수는 넌블럭킹이어야 한다.           클라이언트는 이벤트 콜백동안 동기화 개체는 결코 기다려서는 안된다.
- The client should never call the IMMDeviceEnumerator::UnregisterEndpointNotificationCallback method during an event callback.
  이벤트 콜백 동안 IMMDeviceEnumerator::UnregisterEndpointNotificationCallback 함수는 결코 호출되면 안된다.
- The client should never release the final reference on an MMDevice API object during an event callback.
  이벤트 콜백 동안 MMDevice API 객체의 마지막 레퍼런스는 결코 릴리즈 되면 안된다.

For a code example that implements the IMMNotificationClient interface, see Device Events.

Methods
The IMMNotificationClient interface inherits the methods of the IUnknown interface.
In addition, IMMNotificationClient defines the following methods.

--------------------------------------------------------------------------------------------------------------------------------------------
Method      | Description
--------------------------------------------------------------------------------------------------------------------------------------------
OnDefaultDeviceChanged   | Notifies the client that the default audio endpoint device for a particular role has changed.
     |  특정 역활에 대한 기본 오디오 엔드포인트 장치가 변경되었음을 클라이언트에게 알림
--------------------------------------------------------------------------------------------------------------------------------------------
OnDeviceAdded    | Indicates that a new audio endpoint device has been added.
     | 새로운 오디오 엔드포인트 장치가 추가되었음을 나타낸다
--------------------------------------------------------------------------------------------------------------------------------------------
OnDeviceRemoved    | Indicates that an audio endpoint device has been removed.
     | 오디오 엔드포인트 장치가 삭제되었음을 나타낸다.
--------------------------------------------------------------------------------------------------------------------------------------------
OnDeviceStateChanged   | Indicates that the state of an audio endpoint device has changed.
     | 오디오 엔드포인트 장치의 상태가 변경되었음을 나타낸다.
--------------------------------------------------------------------------------------------------------------------------------------------
OnPropertyValueChanged   | Indicates that the value of a property belonging to an audio endpoint device has changed.
     | 오디오 엔드포인트 장치에 속성 성절 값이 변경됨을 나타낸다.
--------------------------------------------------------------------------------------------------------------------------------------------


[Topic 7] IMMEndpoint Interface 프로그램


[Topic 7] IMMEndpoint Interface
The IMMEndpoint interface represents an audio endpoint device. A client obtains a reference to an IMMEndpoint interface instance by following these steps:
IMMEndpoint interface는 오디오 엔드포인트 장치를 표시한다.  IMMEndpoint interface 인스턴스 레퍼런스를 얻기 위해 다음과 같은 절차를 거친다.

1.By using one of the techniques described in IMMDevice Interface, obtain a reference to the IMMDevice interface of an audio endpoint device.
IMMDevice Interface안에 하나의 기법을 이용하여 오디오 엔드포인트 장치의 IMMDevice Interface 레퍼런스를 얻는다.
2.Call the IMMDevice::QueryInterface method with parameter iid set to REFIID IID_IMMEndpoint.
REFIID IID_IMMEndpoint에서 iid 파라미터를 설정하여 IMMDevice::QueryInterface 함수를 호출한다. 

Methods
The IMMEndpoint interface inherits the methods of the IUnknown interface.
In addition, IMMEndpoint defines the following method.

--------------------------------------------------------------------------------------------------------------------------------------------
Method    | Description
--------------------------------------------------------------------------------------------------------------------------------------------
GetDataFlow  | Indicates whether the endpoint is associated with a rendering device or a capture device.
   | 엔드포인트와 렌더링 장치 또는 캡쳐 장치가 연관이 있는지 없는지 표시한다
--------------------------------------------------------------------------------------------------------------------------------------------


[Topic 6] IMMDeviceEnumerator Interface 프로그램



[Topic 6] IMMDeviceEnumerator Interface
The IMMDeviceEnumerator interface provides methods for enumerating multimedia device resources.
IMMDeviceEnumerator interface는 멀티미디어 장치 리소스 열거를 위한 방법을 제공한다.

In the current implementation of the MMDevice API, the only device resources that this interface can enumerate are audio endpoint devices.
이 인터페이스는 현재 MMDevice API에서 유일하게 장치 리소스 오디오 엔드포인트 장치를 열거할 수 있는 인터페이스이다.
A client obtains a reference to an IMMDeviceEnumerator interface by calling the CoCreateInstance function, as described previously (see MMDevice API).
CoCreateInstance 함수를 호출하여 IMMDeviceEnumerator interface의 레퍼런스를얻을 수 있다. 이전에 설명했다 (MMDevice API 참조)


The device resources enumerated by the methods in the IMMDeviceEnumerator interface are represented as collections of objects with IMMDevice interfaces.
IMMDeviceEnumerator interface은 IMMDevice interfaces와 함께 수집된 객체를 수집하고 표시하는 함수들에 의해 장치 리소스를 열거한다.
A collection has an IMMDeviceCollection interface.
IMMDeviceCollection interface은 수집한다.
The IMMDeviceEnumerator::EnumAudioEndpoints method creates a device collection.
IMMDeviceEnumerator::EnumAudioEndpoints 함수는 장치 컬렉션을 생성한다.
To obtain a pointer to the IMMDevice interface of an item in a device collection, the client calls the IMMDeviceCollection::Item method.
수집된 장치 안에서  IMMDevice interface의 item의 포인터를 얻기 위해, 클라이언트는 IMMDeviceCollection::Item 함수를 호출한다.
For code examples that use the IMMDeviceEnumerator interface, see the following topics:
IMMDeviceEnumerator interface를 사용하는 예제 코드는, 다음 주제을 보면 된다.

- Device Properties
- Rendering a Stream

Methods
The IMMDeviceEnumerator interface inherits the methods of the IUnknown interface.
IMMDeviceEnumerator interface는 IUnknown interface의 함수를 상속받는다.
In addition, IMMDeviceEnumerator defines the following methods.
추가로, IMMDeviceEnumerator 은 다음과 같은 함수를 포함한다.

--------------------------------------------------------------------------------------------------------------------------------------------
Method      | Description
--------------------------------------------------------------------------------------------------------------------------------------------
EnumAudioEndpoints   | Generates a collection of audio endpoint devices that meet the specified criteria.
     | 지정한 기준을 만족하는 오디오 종점 장치의 컬렉션을 생성.
--------------------------------------------------------------------------------------------------------------------------------------------
GetDefaultAudioEndpoint   | Retrieves the default audio endpoint for the specified data-flow direction and role.
     | 지정된 데이터 흐름의 방향과 룰을 가져오기 위한 디폴트 오디오 엔드포인트를 반환한다.
--------------------------------------------------------------------------------------------------------------------------------------------
GetDevice    | Retrieves an endpoint device that is specified by an endpoint device-identification string.
     | 지정된 엔드포인트 장치 식별 문자열에 의해 에드포인트 장치를 반환한다.
--------------------------------------------------------------------------------------------------------------------------------------------
RegisterEndpointNotificationCallback | Registers a client's notification callback interface.
     | 클라이언트들 통지할 콜백 인터페이스를 등록한다.
--------------------------------------------------------------------------------------------------------------------------------------------
UnregisterEndpointNotificationCallback | Deletes the registration of a notification interface that the client registered in
     | a previous call to the IMMDeviceEnumerator::RegisterEndpointNotificationCallback method.
     | IMMDeviceEnumerator::RegisterEndpointNotificationCallback 함수 호출에 의해 등록된 클라이언트를 삭제한다.
--------------------------------------------------------------------------------------------------------------------------------------------


1 2 3 4 5 6 7 8 9 10 다음