VirtualBox

Changeset 89327 in vbox for trunk/include


Ignore:
Timestamp:
May 28, 2021 12:22:27 AM (4 years ago)
Author:
vboxsync
Message:

Audio: Reworking the capture (recording) code path, part 4: Combine PDMIAUDIOCONNECTOR::pfnStreamCapture and PDMIAUDIOCONNECTOR::pfnStreamRead, remove PDMIAUDIOCONNECTOR::pfnStreamSetVoplume, eliminate mixer buffers in DrvAudio. Added pre-buffering of input streams (delay fetching samples from the backend till we've reached the desired buffer fill there). bugref:9890

File:
1 edited

Legend:

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

    r89258 r89327  
    963963/** @name PDMAUDIOSTREAM_CREATE_F_XXX
    964964 * @{ */
    965 /** Does not need any mixing buffers, the device takes care of all conversion. */
     965/** Does not need any mixing buffers, the device takes care of all conversion.
     966 * @note this is now default and assumed always set. */
    966967#define PDMAUDIOSTREAM_CREATE_F_NO_MIXBUF       RT_BIT_32(0)
    967968/** @} */
     
    11601161
    11611162    /**
    1162      * Returns the number of readable data (in bytes) of a specific audio input stream.
    1163      *
    1164      * @returns Number of bytes of readable data.
    1165      * @param   pInterface      Pointer to the interface structure containing the called function pointer.
    1166      * @param   pStream         Pointer to audio stream.
    1167      */
    1168     DECLR3CALLBACKMEMBER(uint32_t, pfnStreamGetReadable, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream));
    1169 
    1170     /**
    1171      * Returns the number of writable data (in bytes) of a specific audio output stream.
    1172      *
    1173      * @returns Number of bytes writable data.
    1174      * @param   pInterface      Pointer to the interface structure containing the called function pointer.
    1175      * @param   pStream         Pointer to audio stream.
    1176      */
    1177     DECLR3CALLBACKMEMBER(uint32_t, pfnStreamGetWritable, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream));
    1178 
    1179     /**
    11801163     * Returns the state of a specific audio stream (destilled status).
    11811164     *
     
    11881171
    11891172    /**
    1190      * Sets the audio volume of a specific audio stream.
    1191      *
    1192      * @returns VBox status code.
     1173     * Returns the number of bytes that can be written to an audio output stream.
     1174     *
     1175     * @returns Number of bytes writable data.
    11931176     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
    11941177     * @param   pStream         Pointer to audio stream.
    1195      * @param   pVol            Pointer to audio volume structure to set the stream's audio volume to.
    1196      */
    1197     DECLR3CALLBACKMEMBER(int, pfnStreamSetVolume, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream, PPDMAUDIOVOLUME pVol));
    1198 
    1199     /**
    1200      * Plays (writes to) an audio (output) stream.
     1178     */
     1179    DECLR3CALLBACKMEMBER(uint32_t, pfnStreamGetWritable, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream));
     1180
     1181    /**
     1182     * Plays (writes to) an audio output stream.
    12011183     *
    12021184     * @returns VBox status code.
     
    12111193
    12121194    /**
    1213      * Reads PCM audio data from the host (input).
     1195     * Returns the number of bytes that can be read from an input stream.
     1196     *
     1197     * @returns Number of bytes of readable data.
     1198     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
     1199     * @param   pStream         Pointer to audio stream.
     1200     */
     1201    DECLR3CALLBACKMEMBER(uint32_t, pfnStreamGetReadable, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream));
     1202
     1203    /**
     1204     * Captures (reads) samples from an audio input stream.
    12141205     *
    12151206     * @returns VBox status code.
     
    12201211     * @param   pcbRead         Bytes of audio data read. Optional.
    12211212     */
    1222     DECLR3CALLBACKMEMBER(int, pfnStreamRead, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream,
    1223                                               void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead));
    1224 
    1225     /**
    1226      * Captures (transfers) available audio frames from the host backend.
    1227      *
    1228      * Only works with input streams.
    1229      *
    1230      * @returns VBox status code.
    1231      * @param   pInterface           Pointer to the interface structure containing the called function pointer.
    1232      * @param   pStream              Pointer to audio stream.
    1233      * @param   pcFramesCaptured     Number of frames captured. Optional.
    1234      */
    12351213    DECLR3CALLBACKMEMBER(int, pfnStreamCapture, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream,
    1236                                                  uint32_t *pcFramesCaptured));
    1237 
     1214                                                 void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead));
    12381215} PDMIAUDIOCONNECTOR;
    12391216
    12401217/** PDMIAUDIOCONNECTOR interface ID. */
    1241 #define PDMIAUDIOCONNECTOR_IID                  "ff9cabf0-4138-4c3a-aa99-28bf7a6feae7"
     1218#define PDMIAUDIOCONNECTOR_IID                  "36fee65e-cbb3-4bb7-a028-e88e6acc1c46"
    12421219
    12431220
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