locked
how get some properties of audio endpoint device

    Question

  • hi, i try to get audio endpoint device capabilities like ability to play raw data or hardware offloading.

    in WASAPI example, ability to play raw get something like this:

    auto PropertiesToRetrieve = ref new Platform::Collections::Vector<String^>();
    	PropertiesToRetrieve->Append("System.Devices.AudioDevice.RawProcessingSupported");
    
    	auto task = concurrency::create_task(Windows::Devices::Enumeration::DeviceInformation::CreateFromIdAsync(device_id, PropertiesToRetrieve));
    
    	task.then([this](Windows::Devices::Enumeration::DeviceInformation^ device_info)
    	{
    		auto properties = device_info->Properties;
    		auto obj = properties->Lookup("System.Devices.AudioDevice.RawProcessingSupported");
    		if (obj) tb1->Text += "System.Devices.AudioDevice.RawProcessingSupported" + (obj->Equals(true));
    	});

    1. can i get like this info about hw offloading, exclusive mode and etc?

    2. where can i find the list of "System.Devices.AudioDevice properties?


    • Edited by Romka2411 Wednesday, August 13, 2014 5:29 PM
    Wednesday, August 13, 2014 4:15 PM

Answers

  • Hi Romka2411,

    To get the device information you may need consider EasClientDeviceInformation class.

    However WASAPI is not fully supported in Windows Store App, you may need to validate them by yourself. For instance IConnect::GetConnectedTo in particular say "Applies to: desktop apps only" and so are cannot be successfully called from Windows Store apps. Contrast this with IAudioClient which is available to Metro style apps and is marked "Applies to: desktop apps | Windows Store apps".

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Romka2411 Friday, August 15, 2014 10:33 AM
    Thursday, August 14, 2014 8:32 AM
    Moderator

All replies

  • Hi Romka2411,

    To get the device information you may need consider EasClientDeviceInformation class.

    However WASAPI is not fully supported in Windows Store App, you may need to validate them by yourself. For instance IConnect::GetConnectedTo in particular say "Applies to: desktop apps only" and so are cannot be successfully called from Windows Store apps. Contrast this with IAudioClient which is available to Metro style apps and is marked "Applies to: desktop apps | Windows Store apps".

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Romka2411 Friday, August 15, 2014 10:33 AM
    Thursday, August 14, 2014 8:32 AM
    Moderator
  • thanks, i use IAudioClient2 now by the reason i wish port my app further on WP8.1.

    But, when i saw a list of HRESULT errors of IAudioClient, there was something like "exclusive only" and "hw offloading only". When or where i could get this errors? Is so specific audio endpoint exists?

    Thursday, August 14, 2014 9:35 AM