VirtualBox

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


Ignore:
Timestamp:
Nov 27, 2019 11:20:26 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
135073
Message:

vmm/pdmaudioifs.h: More of the same. bugref:9218

File:
1 edited

Legend:

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

    r82254 r82255  
    11/** @file
    2  * PDM - Pluggable Device Manager, audio interfaces.
     2 * PDM - Pluggable Device Manager, Audio interfaces.
    33 */
    44
     
    6868 *              just created audio mixer sink will do the job.
    6969 *
    70  * Note: The AUDIOMIXER API is purely optional and is not used by all currently implemented
    71  *       device emulations (e.g. SB16).
     70 * @note The AUDIOMIXER API is purely optional and is not used by all currently
     71 *       implemented device emulations (e.g. SB16).
    7272 *
    7373 *
     
    636636    { a_cBytes, a_cCannels, a_cShift, a_fSigned, a_fSwapEndian, a_uHz }
    637637/** Calculates the cShift value of given sample bits and audio channels.
    638  *  Note: Does only support mono/stereo channels for now. */
     638 * @note Does only support mono/stereo channels for now. */
    639639#define PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(cBytes, cChannels)    ((cChannels == 2) + (cBytes / 2))
    640640/** Calculates the cShift value of a PDMAUDIOPCMPROPS structure. */
     
    802802typedef struct PDMAUDIOSTREAMRATE
    803803{
    804     /** Current (absolute) offset in the output
    805      *  (destination) stream. */
    806     uint64_t        dstOffset;
    807     /** Increment for moving dstOffset for the
    808      *  destination stream. This is needed because the
    809      *  source <-> destination rate might be different. */
    810     uint64_t        dstInc;
    811     /** Current (absolute) offset in the input
    812      *  stream. */
    813     uint32_t        srcOffset;
     804    /** Current (absolute) offset in the output (destination) stream.
     805     * @todo r=bird: Please reveal which unit these members are given in. */
     806    uint64_t        offDst;
     807    /** Increment for moving offDst for the destination stream.
     808     * This is needed because the source <-> destination rate might be different. */
     809    uint64_t        uDstInc;
     810    /** Current (absolute) offset in the input stream. */
     811    uint32_t        offSrc;
    814812    /** Explicit alignment padding. */
    815813    uint32_t        u32AlignmentPadding;
    816814    /** Last processed frame of the input stream.
    817815     *  Needed for interpolation. */
    818     PDMAUDIOFRAME   srcFrameLast;
     816    PDMAUDIOFRAME   SrcFrameLast;
    819817} PDMAUDIOSTREAMRATE;
    820818/** Pointer to rate processing information of a stream. */
     
    847845{
    848846    /** Number of audio frames to convert. */
    849     uint32_t                cFrames;
     847    uint32_t        cFrames;
    850848    union
    851849    {
     
    863861
    864862/**
    865  * Note: All internal handling is done in audio frames, not in bytes!
     863 * @note All internal handling is done in audio frames, not in bytes!
    866864 * @todo r=bird: What does this node actually apply to?
    867865 */
     
    877875 * @param   cbSrc           Number of bytes to convert.
    878876 * @param   pOpts           Conversion options.
     877 * @todo r=bird: The @a paDst size is presumable given in @a pOpts->cFrames?
    879878 */
    880879typedef DECLCALLBACK(uint32_t) FNPDMAUDIOMIXBUFCONVFROM(PPDMAUDIOFRAME paDst, const void *pvSrc, uint32_t cbSrc,
     
    889888 * @param   paSrc           The input frames.
    890889 * @param   pOpts           Conversion options.
     890 * @todo r=bird: The @a paSrc size is presumable given in @a pOpts->cFrames and
     891 *       this implicitly gives the pvDst size too, right?
    891892 */
    892893typedef DECLCALLBACK(void) FNPDMAUDIOMIXBUFCONVTO(void *pvDst, PCPDMAUDIOFRAME paSrc, PCPDMAUDMIXBUFCONVOPTS pOpts);
     
    914915    uint32_t                  offWrite;
    915916    /**
    916      * Total frames already mixed down to the parent buffer (if any). Always starting at
    917      * the parent's offRead position.
    918      *
    919      * Note: Count always is specified in parent frames, as the sample count can differ between parent
    920      *       and child.
     917     * Total frames already mixed down to the parent buffer (if any).
     918     *
     919     * Always starting at the parent's offRead position.
     920     * @note Count always is specified in parent frames, as the sample count can
     921     *       differ between parent and child.
    921922     */
    922923    uint32_t                  cMixed;
     
    935936    /** Internal representation of current volume used for mixing. */
    936937    PDMAUDMIXBUFVOL           Volume;
    937     /** This buffer's audio format. */
    938     PDMAUDIOMIXBUFFMT         AudioFmt;
    939     /** Standard conversion-to function for set AudioFmt. */
     938    /** This buffer's audio format.
     939     * @todo r=bird: This seems to be a value created by AUDMIXBUF_AUDIO_FMT_MAKE(),
     940     *       which is not define here.  Does this structure really belong here at
     941     *       all?  */
     942    PDMAUDIOMIXBUFFMT         uAudioFmt;
     943    /** Standard conversion-to function for set uAudioFmt. */
    940944    PFNPDMAUDIOMIXBUFCONVTO   pfnConvTo;
    941     /** Standard conversion-from function for set AudioFmt. */
     945    /** Standard conversion-from function for set uAudioFmt. */
    942946    PFNPDMAUDIOMIXBUFCONVFROM pfnConvFrom;
    943947    /**
     
    956960} PDMAUDIOMIXBUF;
    957961
    958 /** @name PDMAUDIOFILE_FLAG_XXX
     962/** @name PDMAUDIOFILE_FLAGS_XXX
    959963 * @{ */
    960 typedef uint32_t PDMAUDIOFILEFLAGS;
    961964/** No flags defined. */
    962 #define PDMAUDIOFILE_FLAG_NONE          0
     965#define PDMAUDIOFILE_FLAGS_NONE             UINT32_C(0)
    963966/** Keep the audio file even if it contains no audio data. */
    964 #define PDMAUDIOFILE_FLAG_KEEP_IF_EMPTY RT_BIT(0)
     967#define PDMAUDIOFILE_FLAGS_KEEP_IF_EMPTY    RT_BIT_32(0)
    965968/** Audio file flag validation mask. */
    966 #define PDMAUDIOFILE_FLAG_VALID_MASK    0x1
     969#define PDMAUDIOFILE_FLAGS_VALID_MASK       UINT32_C(0x1)
    967970/** @} */
    968971
    969 /** Audio file default open flags. */
     972/** Audio file default open flags.
     973 * @todo r=bird: What is the exact purpose of this?  */
    970974#define PDMAUDIOFILE_DEFAULT_OPEN_FLAGS (RTFILE_O_OPEN_CREATE | RTFILE_O_APPEND | RTFILE_O_WRITE | RTFILE_O_DENY_WRITE)
    971975
     
    975979typedef enum PDMAUDIOFILETYPE
    976980{
     981    /** The customary invalid zero value. */
     982    PDMAUDIOFILETYPE_INVALID = 0,
    977983    /** Unknown type, do not use. */
    978     PDMAUDIOFILETYPE_UNKNOWN = 0,
     984    PDMAUDIOFILETYPE_UNKNOWN,
    979985    /** Raw (PCM) file. */
    980986    PDMAUDIOFILETYPE_RAW,
     
    985991} PDMAUDIOFILETYPE;
    986992
    987 typedef uint32_t PDMAUDIOFILENAMEFLAGS;
    988 
     993/** @name PDMAUDIOFILENAME_FLAGS_XXX
     994 * @{ */
    989995/** No flags defined. */
    990 #define PDMAUDIOFILENAME_FLAG_NONE          0
     996#define PDMAUDIOFILENAME_FLAGS_NONE         UINT32_C(0)
    991997/** Adds an ISO timestamp to the file name. */
    992 #define PDMAUDIOFILENAME_FLAG_TS            RT_BIT(0)
    993 
    994 /**
    995  * Structure for an audio file handle.
     998#define PDMAUDIOFILENAME_FLAGS_TS           RT_BIT(0)
     999/** @} */
     1000
     1001/**
     1002 * Audio file handle.
    9961003 */
    9971004typedef struct PDMAUDIOFILE
     
    9991006    /** Type of the audio file. */
    10001007    PDMAUDIOFILETYPE    enmType;
    1001     /** Audio file flags. */
    1002     PDMAUDIOFILEFLAGS   fFlags;
    1003     /** File name and path. */
    1004     char                szName[RTPATH_MAX + 1];
     1008    /** Audio file flags, PDMAUDIOFILE_FLAGS_XXX. */
     1009    uint32_t            fFlags;
    10051010    /** Actual file handle. */
    10061011    RTFILE              hFile;
    10071012    /** Data needed for the specific audio file type implemented.
    1008      *  Optional, can be NULL. */
     1013     * Optional, can be NULL. */
    10091014    void               *pvData;
    10101015    /** Data size (in bytes). */
    10111016    size_t              cbData;
    1012 } PDMAUDIOFILE, *PPDMAUDIOFILE;
    1013 
    1014 /** Stream status flag. To be used with PDMAUDIOSTRMSTS_FLAG_ flags. */
    1015 typedef uint32_t PDMAUDIOSTREAMSTS;
    1016 
     1017    /** File name and path. */
     1018    char                szName[RTPATH_MAX];
     1019} PDMAUDIOFILE;
     1020/** Pointer to an audio file handle. */
     1021typedef PDMAUDIOFILE *PPDMAUDIOFILE;
     1022
     1023/** @name PDMAUDIOSTREAMSTS_FLAGS_XXX
     1024 * @{ */
    10171025/** No flags being set. */
    1018 #define PDMAUDIOSTREAMSTS_FLAG_NONE            0
     1026#define PDMAUDIOSTREAMSTS_FLAGS_NONE            UINT32_C(0)
    10191027/** Whether this stream has been initialized by the
    10201028 *  backend or not. */
    1021 #define PDMAUDIOSTREAMSTS_FLAG_INITIALIZED     RT_BIT_32(0)
     1029#define PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED     RT_BIT_32(0)
    10221030/** Whether this stream is enabled or disabled. */
    1023 #define PDMAUDIOSTREAMSTS_FLAG_ENABLED         RT_BIT_32(1)
     1031#define PDMAUDIOSTREAMSTS_FLAGS_ENABLED         RT_BIT_32(1)
    10241032/** Whether this stream has been paused or not. This also implies
    10251033 *  that this is an enabled stream! */
    1026 #define PDMAUDIOSTREAMSTS_FLAG_PAUSED          RT_BIT_32(2)
     1034#define PDMAUDIOSTREAMSTS_FLAGS_PAUSED          RT_BIT_32(2)
    10271035/** Whether this stream was marked as being disabled
    10281036 *  but there are still associated guest output streams
    10291037 *  which rely on its data. */
    1030 #define PDMAUDIOSTREAMSTS_FLAG_PENDING_DISABLE RT_BIT_32(3)
     1038#define PDMAUDIOSTREAMSTS_FLAGS_PENDING_DISABLE RT_BIT_32(3)
    10311039/** Whether this stream is in re-initialization phase.
    10321040 *  All other bits remain untouched to be able to restore
    10331041 *  the stream's state after the re-initialization bas been
    10341042 *  finished. */
    1035 #define PDMAUDIOSTREAMSTS_FLAG_PENDING_REINIT  RT_BIT_32(4)
     1043#define PDMAUDIOSTREAMSTS_FLAGS_PENDING_REINIT  RT_BIT_32(4)
    10361044/** Validation mask. */
    1037 #define PDMAUDIOSTREAMSTS_VALID_MASK           UINT32_C(0x0000001F)
    1038 
    1039 /**
    1040  * Enumeration presenting a backend's current status.
     1045#define PDMAUDIOSTREAMSTS_VALID_MASK            UINT32_C(0x0000001F)
     1046/** Stream status flag, PDMAUDIOSTREAMSTS_FLAGS_XXX. */
     1047typedef uint32_t PDMAUDIOSTREAMSTS;
     1048/** @} */
     1049
     1050/**
     1051 * Backend status.
    10411052 */
    10421053typedef enum PDMAUDIOBACKENDSTS
     
    10611072
    10621073/**
    1063  * Structure for keeping audio input stream specifics.
    1064  * Do not use directly. Instead, use PDMAUDIOSTREAM.
     1074 * The specifics for an audio input stream.
     1075 *
     1076 * Do not use directly, use PDMAUDIOSTREAM instead.
    10651077 */
    10661078typedef struct PDMAUDIOSTREAMIN
     
    10691081    struct
    10701082    {
    1071         STAMCOUNTER TotalFramesCaptured;
    1072         STAMCOUNTER AvgFramesCaptured;
    1073         STAMCOUNTER TotalTimesCaptured;
    1074         STAMCOUNTER TotalFramesRead;
    1075         STAMCOUNTER AvgFramesRead;
    1076         STAMCOUNTER TotalTimesRead;
     1083        STAMCOUNTER     TotalFramesCaptured;
     1084        STAMCOUNTER     AvgFramesCaptured;
     1085        STAMCOUNTER     TotalTimesCaptured;
     1086        STAMCOUNTER     TotalFramesRead;
     1087        STAMCOUNTER     AvgFramesRead;
     1088        STAMCOUNTER     TotalTimesRead;
    10771089    } Stats;
    10781090#endif
     
    10801092    {
    10811093        /** File for writing stream reads. */
    1082         PPDMAUDIOFILE           pFileStreamRead;
     1094        PPDMAUDIOFILE   pFileStreamRead;
    10831095        /** File for writing non-interleaved captures. */
    1084         PPDMAUDIOFILE           pFileCaptureNonInterleaved;
     1096        PPDMAUDIOFILE   pFileCaptureNonInterleaved;
    10851097    } Dbg;
    1086 } PDMAUDIOSTREAMIN, *PPDMAUDIOSTREAMIN;
    1087 
    1088 /**
    1089  * Structure for keeping audio output stream specifics.
    1090  * Do not use directly. Instead, use PDMAUDIOSTREAM.
     1098} PDMAUDIOSTREAMIN;
     1099/** Pointer to the specifics for an audio input stream. */
     1100typedef PDMAUDIOSTREAMIN *PPDMAUDIOSTREAMIN;
     1101
     1102/**
     1103 * The specifics for an audio output stream.
     1104 *
     1105 * Do not use directly, use PDMAUDIOSTREAM instead.
    10911106 */
    10921107typedef struct PDMAUDIOSTREAMOUT
     
    10951110    struct
    10961111    {
    1097         STAMCOUNTER TotalFramesPlayed;
    1098         STAMCOUNTER AvgFramesPlayed;
    1099         STAMCOUNTER TotalTimesPlayed;
    1100         STAMCOUNTER TotalFramesWritten;
    1101         STAMCOUNTER AvgFramesWritten;
    1102         STAMCOUNTER TotalTimesWritten;
     1112        STAMCOUNTER     TotalFramesPlayed;
     1113        STAMCOUNTER     AvgFramesPlayed;
     1114        STAMCOUNTER     TotalTimesPlayed;
     1115        STAMCOUNTER     TotalFramesWritten;
     1116        STAMCOUNTER     AvgFramesWritten;
     1117        STAMCOUNTER     TotalTimesWritten;
    11031118    } Stats;
    11041119#endif
     
    11061121    {
    11071122        /** File for writing stream writes. */
    1108         PPDMAUDIOFILE           pFileStreamWrite;
     1123        PPDMAUDIOFILE   pFileStreamWrite;
    11091124        /** File for writing stream playback. */
    1110         PPDMAUDIOFILE           pFilePlayNonInterleaved;
     1125        PPDMAUDIOFILE   pFilePlayNonInterleaved;
    11111126    } Dbg;
    1112 } PDMAUDIOSTREAMOUT, *PPDMAUDIOSTREAMOUT;
     1127} PDMAUDIOSTREAMOUT;
     1128/** Pointer to the specifics for an audio output stream. */
     1129typedef PDMAUDIOSTREAMOUT *PPDMAUDIOSTREAMOUT;
    11131130
    11141131/** Pointer to an audio stream. */
     
    11221139{
    11231140    /** The stream's audio configuration. */
    1124     PDMAUDIOSTREAMCFG      Cfg;
     1141    PDMAUDIOSTREAMCFG   Cfg;
    11251142    /** This stream's mixing buffer. */
    1126     PDMAUDIOMIXBUF         MixBuf;
     1143    PDMAUDIOMIXBUF      MixBuf;
    11271144} PDMAUDIOSTREAMCTX;
    11281145
     
    11361153{
    11371154    /** List node. */
    1138     RTLISTNODE             Node;
     1155    RTLISTNODE              Node;
    11391156    /** Name of this stream. */
    1140     char                   szName[64];
    1141     /** Number of references to this stream. Only can be
    1142      *  destroyed if the reference count is reaching 0. */
    1143     uint32_t               cRefs;
     1157    char                    szName[64];
     1158    /** Number of references to this stream.
     1159     *  Only can be destroyed when the reference count reaches 0. */
     1160    uint32_t                cRefs;
    11441161    /** Stream status flag. */
    1145     PDMAUDIOSTREAMSTS      fStatus;
     1162    PDMAUDIOSTREAMSTS       fStatus;
    11461163    /** Audio direction of this stream. */
    1147     PDMAUDIODIR            enmDir;
    1148     /** The guest side of the stream. */
    1149     PDMAUDIOSTREAMCTX      Guest;
    1150     /** The host side of the stream. */
    1151     PDMAUDIOSTREAMCTX      Host;
    1152     /** Union for input/output specifics (based on enmDir). */
    1153     union
    1154     {
    1155         PDMAUDIOSTREAMIN   In;
    1156         PDMAUDIOSTREAMOUT  Out;
    1157     } RT_UNION_NM(u);
    1158     /** Timestamp (in ns) since last iteration. */
    1159     uint64_t               tsLastIteratedNs;
    1160     /** Timestamp (in ns) since last playback / capture. */
    1161     uint64_t               tsLastPlayedCapturedNs;
    1162     /** Timestamp (in ns) since last read (input streams) or
    1163      *  write (output streams). */
    1164     uint64_t               tsLastReadWrittenNs;
     1164    PDMAUDIODIR             enmDir;
    11651165    /** For output streams this indicates whether the stream has reached
    11661166     *  its playback threshold, e.g. is playing audio.
    11671167     *  For input streams this  indicates whether the stream has enough input
    11681168     *  data to actually start reading audio. */
    1169     bool                   fThresholdReached;
     1169    bool                    fThresholdReached;
     1170    bool                    afPadding[3];
     1171    /** The guest side of the stream. */
     1172    PDMAUDIOSTREAMCTX       Guest;
     1173    /** The host side of the stream. */
     1174    PDMAUDIOSTREAMCTX       Host;
     1175    /** Union for input/output specifics depending on enmDir. */
     1176    union
     1177    {
     1178        PDMAUDIOSTREAMIN    In;
     1179        PDMAUDIOSTREAMOUT   Out;
     1180    } RT_UNION_NM(u);
     1181    /** Timestamp (in ns) since last iteration. */
     1182    uint64_t                tsLastIteratedNs;
     1183    /** Timestamp (in ns) since last playback / capture. */
     1184    uint64_t                tsLastPlayedCapturedNs;
     1185    /** Timestamp (in ns) since last read (input streams) or
     1186     *  write (output streams). */
     1187    uint64_t                tsLastReadWrittenNs;
    11701188    /** Data to backend-specific stream data.
    11711189     *  This data block will be casted by the backend to access its backend-dependent data.
    11721190     *
    11731191     *  That way the backends do not have access to the audio connector's data. */
    1174     void                  *pvBackend;
     1192    void                   *pvBackend;
    11751193    /** Size (in bytes) of the backend-specific stream data. */
    1176     size_t                 cbBackend;
     1194    size_t                  cbBackend;
    11771195} PDMAUDIOSTREAM;
    11781196
    1179 /** Pointer to a audio connector interface. */
    1180 typedef struct PDMIAUDIOCONNECTOR *PPDMIAUDIOCONNECTOR;
    11811197
    11821198/**
     
    11881204    PDMAUDIOCBSOURCE_INVALID    = 0,
    11891205    /** Device emulation. */
    1190     PDMAUDIOCBSOURCE_DEVICE     = 1,
     1206    PDMAUDIOCBSOURCE_DEVICE,
    11911207    /** Audio connector interface. */
    1192     PDMAUDIOCBSOURCE_CONNECTOR  = 2,
     1208    PDMAUDIOCBSOURCE_CONNECTOR,
    11931209    /** Backend (lower). */
    1194     PDMAUDIOCBSOURCE_BACKEND    = 3,
     1210    PDMAUDIOCBSOURCE_BACKEND,
    11951211    /** Hack to blow the type up to 32-bit. */
    11961212    PDMAUDIOCBSOURCE_32BIT_HACK = 0x7fffffff
     
    12131229} PDMAUDIODEVICECBTYPE;
    12141230
     1231#if 0 /** @todo r=bird: Who needs this exactly?  Fix the style or remove  */
    12151232/**
    12161233 * Device callback data for audio input.
     
    12231240    /** Output: How many bytes have been read. */
    12241241    uint32_t cbOutRead;
    1225 } PDMAUDIODEVICECBDATA_DATA_INPUT, *PPDMAUDIODEVICECBDATA_DATA_INPUT;
     1242} PDMAUDIODEVICECBDATA_DATA_INPUT;
     1243typedef PDMAUDIODEVICECBDATA_DATA_INPUT *PPDMAUDIODEVICECBDATA_DATA_INPUT;
    12261244
    12271245/**
     
    12351253    uint32_t cbOutWritten;
    12361254} PDMAUDIODEVICECBDATA_DATA_OUTPUT, *PPDMAUDIODEVICECBDATA_DATA_OUTPUT;
     1255#endif
    12371256
    12381257/**
     
    12921311     *  Must be 0 if pvCtx is NULL. */
    12931312    size_t              cbCtx;
    1294 } PDMAUDIOCBRECORD, *PPDMAUDIOCBRECORD;
    1295 
     1313} PDMAUDIOCBRECORD;
     1314/** Pointer to an audio callback registration record.   */
     1315typedef PDMAUDIOCBRECORD *PPDMAUDIOCBRECORD;
     1316
     1317/** @todo r=bird: What is this exactly? */
    12961318#define PPDMAUDIOBACKENDSTREAM void *
     1319
     1320/** Pointer to a audio connector interface. */
     1321typedef struct PDMIAUDIOCONNECTOR *PPDMIAUDIOCONNECTOR;
    12971322
    12981323/**
     
    13461371     *
    13471372     * @returns VBox status code.
    1348      * @param   pInterface           Pointer to the interface structure containing the called function pointer.
    1349      * @param   pCfgHost             Stream configuration for host side.
    1350      * @param   pCfgGuest            Stream configuration for guest side.
    1351      * @param   ppStream             Pointer where to return the created audio stream on success.
     1373     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
     1374     * @param   pCfgHost        Stream configuration for host side.
     1375     * @param   pCfgGuest       Stream configuration for guest side.
     1376     * @param   ppStream        Pointer where to return the created audio stream on success.
    13521377     */
    13531378    DECLR3CALLBACKMEMBER(int, pfnStreamCreate, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAMCFG pCfgHost,
     
    13901415     * @param   pcbRead         Bytes of audio data read. Optional.
    13911416     */
    1392     DECLR3CALLBACKMEMBER(int, pfnStreamRead, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead));
     1417    DECLR3CALLBACKMEMBER(int, pfnStreamRead, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream,
     1418                                              void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead));
    13931419
    13941420    /**
     
    14021428     * @param   pcbWritten      Bytes of audio data written. Optional.
    14031429     */
    1404     DECLR3CALLBACKMEMBER(int, pfnStreamWrite, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten));
     1430    DECLR3CALLBACKMEMBER(int, pfnStreamWrite, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream,
     1431                                               const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten));
    14051432
    14061433    /**
     
    14121439     * @param   enmStreamCmd    The stream command to issue.
    14131440     */
    1414     DECLR3CALLBACKMEMBER(int, pfnStreamControl, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd));
     1441    DECLR3CALLBACKMEMBER(int, pfnStreamControl, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream,
     1442                                                 PDMAUDIOSTREAMCMD enmStreamCmd));
    14151443
    14161444    /**
     
    14771505     * @param   pcFramesCaptured     Number of frames captured. Optional.
    14781506     */
    1479     DECLR3CALLBACKMEMBER(int, pfnStreamCapture, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream, uint32_t *pcFramesCaptured));
     1507    DECLR3CALLBACKMEMBER(int, pfnStreamCapture, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream,
     1508                                                 uint32_t *pcFramesCaptured));
    14801509
    14811510    /**
     
    14891518     * @param   cCallbacks           Number of callbacks to register.
    14901519     */
    1491     DECLR3CALLBACKMEMBER(int, pfnRegisterCallbacks, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOCBRECORD paCallbacks, size_t cCallbacks));
     1520    DECLR3CALLBACKMEMBER(int, pfnRegisterCallbacks, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOCBRECORD paCallbacks,
     1521                                                     size_t cCallbacks));
    14921522
    14931523} PDMIAUDIOCONNECTOR;
    14941524
    14951525/** PDMIAUDIOCONNECTOR interface ID. */
    1496 #define PDMIAUDIOCONNECTOR_IID                  "A643B40C-733F-4307-9549-070AF0EE0ED6"
    1497 
    1498 /**
    1499  * Assigns all needed interface callbacks for an audio backend.
    1500  *
    1501  * @param   a_Prefix        The function name prefix.
    1502  */
    1503 #define PDMAUDIO_IHOSTAUDIO_CALLBACKS(a_Prefix) \
    1504     do { \
    1505         pThis->IHostAudio.pfnInit              = RT_CONCAT(a_Prefix,Init); \
    1506         pThis->IHostAudio.pfnShutdown          = RT_CONCAT(a_Prefix,Shutdown); \
    1507         pThis->IHostAudio.pfnGetConfig         = RT_CONCAT(a_Prefix,GetConfig); \
    1508         /** @todo Add pfnGetDevices here as soon as supported by all backends. */ \
    1509         pThis->IHostAudio.pfnGetStatus         = RT_CONCAT(a_Prefix,GetStatus); \
    1510         /** @todo Ditto for pfnSetCallback. */ \
    1511         pThis->IHostAudio.pfnStreamCreate      = RT_CONCAT(a_Prefix,StreamCreate); \
    1512         pThis->IHostAudio.pfnStreamDestroy     = RT_CONCAT(a_Prefix,StreamDestroy); \
    1513         pThis->IHostAudio.pfnStreamControl     = RT_CONCAT(a_Prefix,StreamControl); \
    1514         pThis->IHostAudio.pfnStreamGetReadable = RT_CONCAT(a_Prefix,StreamGetReadable); \
    1515         pThis->IHostAudio.pfnStreamGetWritable = RT_CONCAT(a_Prefix,StreamGetWritable); \
    1516         pThis->IHostAudio.pfnStreamGetStatus   = RT_CONCAT(a_Prefix,StreamGetStatus); \
    1517         pThis->IHostAudio.pfnStreamIterate     = RT_CONCAT(a_Prefix,StreamIterate); \
    1518         pThis->IHostAudio.pfnStreamPlay        = RT_CONCAT(a_Prefix,StreamPlay); \
    1519         pThis->IHostAudio.pfnStreamCapture     = RT_CONCAT(a_Prefix,StreamCapture); \
    1520     } while (0)
     1526#define PDMIAUDIOCONNECTOR_IID                  "00e704ef-0078-4bb6-0005-a5fd000ded9f"
     1527
    15211528
    15221529/**
     
    17311738
    17321739/** PDMIHOSTAUDIO interface ID. */
    1733 #define PDMIHOSTAUDIO_IID                           "640F5A31-8245-491C-538F-29A0F9D08881"
     1740#define PDMIHOSTAUDIO_IID                           "007847a0-0075-4964-007d-343f0010f081"
    17341741
    17351742/** @} */
Note: See TracChangeset for help on using the changeset viewer.

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