locked
Reading Audio endpoint property store in Metro App RRS feed

  • Question

  • Hi,

    I am aware that MMDeviceAPI is not available for Metro App. So for enumeration of audio endpoints, there are equivalent class available for Metro App. However, I would like to know for reading information from audio property store, what is an available functionality in MMDeviceAPI, is there any way to achieve this in Metro Apps? The current Enumeration.DeviceInformation.Properties seems to only provide a very limited set of OS property keys.

    Thank you.

    Angela

    Friday, March 9, 2012 7:40 AM

Answers

  • Hello Angela,

    I think I'm starting to understand what you are trying to do. I don't know if this will work for you but you can try to use the Device Query APIs and retrieve various properties exposed by devices. I honestly don't know if the properties you are looking for will be exposed but this is certainly with a try. Take a look at the "Windows.Devices.Enumeration" namespace.

    You are correct. MFTs are application specific.

    It sounds to me that your Metro style app will have a dependency on your APO. Keep in mind that you can't install an APO from a Metro style app. Split installation (desktop and Metro at the same time) will not be supported. Because this is a two step install this is a bad user experience and your application will not be accepted in the store.

    What you are trying to accomplish is not going to be supported. If you are an OEM you should not be writing a standard Metro style app and should be looking at writing a device app. If you are already writing a device app please ignore.

    Metro style device app

    http://msdn.microsoft.com/en-us/library/windows/apps/hh464909.aspx

    Thanks,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/


    Saturday, March 17, 2012 1:03 AM
    Moderator
  • Hello Angela,

    If you are an OEM or IHV and working on an application that can access your custom device and modify its settings you should absolutely be writing a device app and not a standard Metro style app. Device apps contain additional metadata that helps the Metro shell identify and surface your device app.

    We currently only give you access to the underlying device in a limited capacity. You might have some luck using the "Dev query" APIs in the "Windows.Devices.Enumeration" namespace. There is some really simple sample code that might work for you on the DeviceInformation class page. If you can't get to your settings this way I'm afraid that we just didn't surface what you are looking for.

    DeviceInformation

    http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.enumeration.deviceinformation.aspx

    I hope this helps,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Thursday, March 22, 2012 12:55 AM
    Moderator

All replies

  • Hello Angela,

    We do have a subset of WASAPI audio functions available in the Metro style environment. Since I don't know exactly what additional properties you are looking for I can't really suggest any specific object to look at. Please take a look at what we have available and let me know if you have any specific questions.

    Win32 and COM for Metro style apps (multimedia)

    http://msdn.microsoft.com/en-us/library/windows/apps/hh452756.aspx

    I hope this helps,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Friday, March 9, 2012 10:18 PM
    Moderator
  • Hi James,

    Thank you for replying this thread. I am referring to the Audio property store interface exposed by the MMDevice API. Eg.

    IMMDevice *pEndpoint;
    IPropertyStore *pProps;
    
    /*Get the pEndpoint initialized from MMDeviceEnumerator */
    
    hr = pEndpoint->OpenPropertyStore(STGM_READ, &pProps);
    
    hr = pProps->GetValue(PKEY_somePkey, &someVar);

    I would like to know if it is possible to read properties keys from audio prop store in Metro like what we did using MMDevice API.

    Thank you.

    Angela


    • Edited by Angela Yan Monday, March 12, 2012 6:13 AM
    Monday, March 12, 2012 6:10 AM
  • Hi,

    Any update for this question?

    Thank you.

    Angela

    Wednesday, March 14, 2012 6:09 AM
  • Hello Angela,

    I don't believe that we expose the audio device or endpoint information directly. However, let me check with my contact on the WASAPI team and I'll get back to you with confirmation.

    Thanks,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Thursday, March 15, 2012 12:19 AM
    Moderator
  • Hi James,

    Thank you very much for your effort.

    If it is true that we can no longer access audio property store information within Metro Appz, it would be a huge loss. Because endpoint property store (and Fx property store) does not only contain OS information on the endpoints, but also includes 3rd party custom information for the endpoints (including information for the APO). We are implementing a professional Audio application, and one of most fundamental requirement is to gain custom information from audio property store.  If we can't get access to the audio property store, it would just likely mean that we can't implement a Metro App for our audio application.

    Thank you.

    Angela

    Thursday, March 15, 2012 3:08 AM
  • Hello Angela,

    At this time Metro really isn't designed to be a platform for professional audio applications. Due to the way the app sandbox works you won't be able to get information at the audio engine layer (i.e. access to APO information). Do you own the APO? You can implement the FX as an MFT and load it into the media pipeline via your application. This is the recommended way of adding FX to your application. Maybe if you tell me more about what it is you are trying to accomplish I can suggest a better solution.

    -James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Friday, March 16, 2012 2:30 AM
    Moderator
  • Hi James,

    Thank you.

    However, in property store we have more than APO information that we want to access. Our driver would put some custom information in the property store per endpoint. 

    And can all APO effects being implemented into MFT in Metro? I am not sure whether all the DSP algo can just be ported into MFT. In addition, I was under the impression that MFT only provides effect for the particular application that loads it. For other applications (such as OS Apps like Windows Media Player), if they do not intentionally load the MFT, their playback would not have the effect from MFT. That is an entirely different story for APO. If the APO is loaded for an audio endpoint, any application that uses this endpoint as an output device will go through the APO effects without the need to load anything. Or is my impression wrong? Is there a MFT documentation for Metro somewhere that I can sort out this?

    Thank you.

    Angela

    Friday, March 16, 2012 3:16 AM
  • Hello Angela,

    I think I'm starting to understand what you are trying to do. I don't know if this will work for you but you can try to use the Device Query APIs and retrieve various properties exposed by devices. I honestly don't know if the properties you are looking for will be exposed but this is certainly with a try. Take a look at the "Windows.Devices.Enumeration" namespace.

    You are correct. MFTs are application specific.

    It sounds to me that your Metro style app will have a dependency on your APO. Keep in mind that you can't install an APO from a Metro style app. Split installation (desktop and Metro at the same time) will not be supported. Because this is a two step install this is a bad user experience and your application will not be accepted in the store.

    What you are trying to accomplish is not going to be supported. If you are an OEM you should not be writing a standard Metro style app and should be looking at writing a device app. If you are already writing a device app please ignore.

    Metro style device app

    http://msdn.microsoft.com/en-us/library/windows/apps/hh464909.aspx

    Thanks,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/


    Saturday, March 17, 2012 1:03 AM
    Moderator
  • Hi James,

    Thank you for the info about the device Apps. 

    But I thought there is not much difference between writing a device Apps and a standard Metro Apps. Other than device Apps needs to provide device metadata and an additional xml file. But the implementation of the device App is no different than a standard Metro Apps. Is my understanding correct?

    And to clarify thing, the properties I mentioned, I actually mean those property key and value pairs residing in 

    HKLM\Software\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\{xxxx}\

    The last part of {xxxx} is part of the audio endpoint ID. Although it is part of the registry, previously these information can be achieved using IPropertyStore interface that obtained from MMDeviceEnumerator interface. But currently since MMDevice API is not available anymore, I can't seem to get access to the IPropertyStore interface. I wonder if there is any other way to retrieve this property key-value pairs. 

    And I have tried the "Properties" property in Windows.Devices.Enumeration.DeviceInformation. It only provides a few sets of property key-value pairs from the OS. I want to know if there is any way to retrieve custom property key-value pairs.

    And of course, any replacement for IMMNotificationClient in Metro as well. 

    Thank you.

    Angela

    Tuesday, March 20, 2012 8:14 AM
  • Hello Angela,

    If you are an OEM or IHV and working on an application that can access your custom device and modify its settings you should absolutely be writing a device app and not a standard Metro style app. Device apps contain additional metadata that helps the Metro shell identify and surface your device app.

    We currently only give you access to the underlying device in a limited capacity. You might have some luck using the "Dev query" APIs in the "Windows.Devices.Enumeration" namespace. There is some really simple sample code that might work for you on the DeviceInformation class page. If you can't get to your settings this way I'm afraid that we just didn't surface what you are looking for.

    DeviceInformation

    http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.enumeration.deviceinformation.aspx

    I hope this helps,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Thursday, March 22, 2012 12:55 AM
    Moderator