VirtualBox

Changeset 88693 in vbox for trunk/include/VBox/vmm


Ignore:
Timestamp:
Apr 23, 2021 9:49:34 PM (4 years ago)
Author:
vboxsync
Message:

Audio: Added optional pfnStreamConfigHint methods to PDMIAUDIOCONNECTOR and PDMIHOSTAUDIO so the WASAPI backend can get some useful cache hints to avoid potentially horried EMT blocking when the guest tries to play audio later. This is rather crude, but with typical guest config it helps a lot. bugref:9890

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmaudioifs.h

    r88534 r88693  
    10521052
    10531053    /**
     1054     * Gives the audio drivers a hint about a typical configuration.
     1055     *
     1056     * This is a little hack for windows (and maybe other hosts) where stream
     1057     * creation can take a relatively long time, making it very unsuitable for EMT.
     1058     * The audio backend can use this hint to cache pre-configured stream setups,
     1059     * so that when the guest actually wants to play something EMT won't be blocked
     1060     * configuring host audio.
     1061     *
     1062     * @param   pInterface      Pointer to this interface.
     1063     * @param   pCfg            The typical configuration.  Can be modified by the
     1064     *                          drivers in unspecified ways.
     1065     */
     1066    DECLR3CALLBACKMEMBER(void, pfnStreamConfigHint, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAMCFG pCfg));
     1067
     1068    /**
    10541069     * Creates an audio stream.
    10551070     *
     
    12021217
    12031218/** PDMIAUDIOCONNECTOR interface ID. */
    1204 #define PDMIAUDIOCONNECTOR_IID                  "473a3a3c-cda9-454c-90f9-63751320e62a"
     1219#define PDMIAUDIOCONNECTOR_IID                  "9e7d9efb-45ac-4364-9e9d-67b6990df94c"
    12051220
    12061221
     
    12281243
    12291244    /**
    1230      * Returns (enumerates) host audio device information.
     1245     * Returns (enumerates) host audio device information (optional).
    12311246     *
    12321247     * @returns VBox status code.
     
    12371252
    12381253    /**
    1239      * Returns the current status from the audio backend.
     1254     * Returns the current status from the audio backend (optional).
    12401255     *
    12411256     * @returns PDMAUDIOBACKENDSTS enum.
     
    12441259     */
    12451260    DECLR3CALLBACKMEMBER(PDMAUDIOBACKENDSTS, pfnGetStatus, (PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir));
     1261
     1262    /**
     1263     * Gives the audio backend a hint about a typical configuration (optional).
     1264     *
     1265     * This is a little hack for windows (and maybe other hosts) where stream
     1266     * creation can take a relatively long time, making it very unsuitable for EMT.
     1267     * The audio backend can use this hint to cache pre-configured stream setups,
     1268     * so that when the guest actually wants to play something EMT won't be blocked
     1269     * configuring host audio.
     1270     *
     1271     * @param   pInterface      Pointer to this interface.
     1272     * @param   pCfg            The typical configuration.  (Feel free to change it
     1273     *                          to the actual stream config that would be used,
     1274     *                          however caller will probably ignore this.)
     1275     */
     1276    DECLR3CALLBACKMEMBER(void, pfnStreamConfigHint, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAMCFG pCfg));
    12461277
    12471278    /**
     
    13031334
    13041335    /**
    1305      * Returns the number of buffered bytes that hasn't been played yet.
     1336     * Returns the number of buffered bytes that hasn't been played yet (optional).
    13061337     *
    13071338     * This function is used by DrvAudio to detect when it is appropriate to fully
     
    13621393
    13631394/** PDMIHOSTAUDIO interface ID. */
    1364 #define PDMIHOSTAUDIO_IID                           "71b1dcc3-46d7-4c27-a76a-63cd229adb74"
     1395#define PDMIHOSTAUDIO_IID                           "ccfd4020-1a41-4158-8c42-6f7c98f0aaa8"
    13651396
    13661397
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette