locked
found trouble in "Windows Audio Session (WASAPI) sample"

    Question

  • in this sample:

    Windows Audio Session (WASAPI) sample

    i found this (WASAPIRenderer.cpp, line 304):

    if (m_DeviceProps.hnsBufferDuration < hnsMinBufferDuration)
            {
                // using MINIMUM size instead
                m_DeviceProps.hnsBufferDuration = hnsMinBufferDuration;
            }
            else if (hnsMinBufferDuration > hnsMaxBufferDuration)
            {
                // using MAXIMUM size instead
                m_DeviceProps.hnsBufferDuration = hnsMaxBufferDuration;
            }
    "else if (hnsMinBufferDuration > hnsMaxBufferDuration)"
    is there a mistake or catching some hardware issues?
    Tuesday, April 8, 2014 10:12 AM

Answers

  • Yes, we've confirmed this is a bug and are looking into a fix for it.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, April 8, 2014 5:22 PM
    Moderator

All replies

  • Without knowing that sample at all, I would agree that this looks like a bug. I'll see what I can find out about it.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, April 8, 2014 12:33 PM
    Moderator
  • Yes, we've confirmed this is a bug and are looking into a fix for it.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, April 8, 2014 5:22 PM
    Moderator
  • hnsMinBufferDuration and hns MaxBufferDuration - this gets from endpoint audio rendering device properties
    Thursday, April 10, 2014 5:52 AM
  • BTW, I believe the sample has been updated already.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, April 11, 2014 2:58 PM
    Moderator