Index: trunk/src/VBox/Devices/Audio/AudioMixer.cpp
===================================================================
--- trunk/src/VBox/Devices/Audio/AudioMixer.cpp	(revision 88916)
+++ trunk/src/VBox/Devices/Audio/AudioMixer.cpp	(revision 88917)
@@ -121,5 +121,5 @@
  *                      AUDIOMIXERSINK_STATUS_STR_MAX in length.
  */
-static const char *dbgAudioMixerSinkStatusToStr(AUDMIXSINKSTS fStatus, char pszDst[AUDIOMIXERSINK_STATUS_STR_MAX])
+static const char *dbgAudioMixerSinkStatusToStr(uint32_t fStatus, char pszDst[AUDIOMIXERSINK_STATUS_STR_MAX])
 {
     if (!fStatus)
@@ -215,5 +215,5 @@
  * @returns VBox status code.
  * @param   pcszName            Name of the audio mixer.
- * @param   fFlags              Creation flags.
+ * @param   fFlags              Creation flags - AUDMIXER_FLAGS_XXX.
  * @param   ppMixer             Pointer which returns the created mixer object.
  */
@@ -531,16 +531,14 @@
  *                      in some unspecified way (see
  *                      PDMIAUDIOCONNECTOR::pfnStreamCreate).
- * @param   fFlags      Stream flags. Currently unused, set to 0.
  * @param   pDevIns     The device instance to register statistics with.
  * @param   ppStream    Pointer which receives the newly created audio stream.
  */
 int AudioMixerSinkCreateStream(PAUDMIXSINK pSink, PPDMIAUDIOCONNECTOR pConn, PPDMAUDIOSTREAMCFG pCfg,
-                               AUDMIXSTREAMFLAGS fFlags, PPDMDEVINS pDevIns, PAUDMIXSTREAM *ppStream)
+                               PPDMDEVINS pDevIns, PAUDMIXSTREAM *ppStream)
 {
     AssertPtrReturn(pSink, VERR_INVALID_POINTER);
     AssertPtrReturn(pConn, VERR_INVALID_POINTER);
-    AssertPtrReturn(pCfg,  VERR_INVALID_POINTER);
-    /** @todo Validate fFlags. */
-    /* ppStream is optional. */
+    AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
+    AssertPtrNullReturn(ppStream, VERR_INVALID_POINTER);
     RT_NOREF(pDevIns); /* we'll probably be adding more statistics */
 
@@ -560,6 +558,4 @@
     PAUDMIXSTREAM pMixStream = (PAUDMIXSTREAM)RTMemAllocZ(sizeof(AUDMIXSTREAM));
     AssertReturn(pMixStream, VERR_NO_MEMORY);
-
-    pMixStream->fFlags = fFlags;
 
     /* Assign the backend's name to the mixer stream's name for easier identification in the (release) log. */
@@ -579,5 +575,5 @@
             if (RT_SUCCESS(rc))
             {
-                LogFlowFunc(("[%s] fFlags=0x%x (enmDir=%ld, %u bits, %RU8 channels, %RU32Hz)\n", pSink->pszName, fFlags, pCfg->enmDir,
+                LogFlowFunc(("[%s] (enmDir=%ld, %u bits, %RU8 channels, %RU32Hz)\n", pSink->pszName, pCfg->enmDir,
                              PDMAudioPropsSampleBits(&pCfg->Props), PDMAudioPropsChannels(&pCfg->Props), pCfg->Props.uHz));
 
@@ -1000,8 +996,8 @@
  * Returns the current status of a mixer sink.
  *
- * @returns The sink's current status.
+ * @returns The sink's current status (AUDMIXSINK_STS_XXX).
  * @param   pSink               Mixer sink to return status for.
  */
-AUDMIXSINKSTS AudioMixerSinkGetStatus(PAUDMIXSINK pSink)
+uint32_t AudioMixerSinkGetStatus(PAUDMIXSINK pSink)
 {
     if (!pSink)
@@ -1013,10 +1009,10 @@
 
     /* If the dirty flag is set, there is unprocessed data in the sink. */
-    AUDMIXSINKSTS stsSink = pSink->fStatus;
+    uint32_t const fStsSink = pSink->fStatus;
 
     rc2 = RTCritSectLeave(&pSink->CritSect);
     AssertRC(rc2);
 
-    return stsSink;
+    return fStsSink;
 }
 
Index: trunk/src/VBox/Devices/Audio/AudioMixer.h
===================================================================
--- trunk/src/VBox/Devices/Audio/AudioMixer.h	(revision 88916)
+++ trunk/src/VBox/Devices/Audio/AudioMixer.h	(revision 88917)
@@ -59,31 +59,4 @@
 
 
-/** Defines an audio mixer stream's flags. */
-#define AUDMIXSTREAMFLAGS uint32_t
-
-/** No flags specified. */
-#define AUDMIXSTREAM_F_NONE                     0
-/** The mixing stream is flagged as being enabled (active). */
-#define AUDMIXSTREAM_F_ENABLED                  RT_BIT(0)
-
-/** Defines an audio mixer stream's internal status. */
-#define AUDMIXSTREAMSTATUS uint32_t
-
-/** @name AUDMIXSTREAM_STATUS_XXX - mixer stream status.
- * (This is a destilled version of PDMAUDIOSTREAM_STS_XXX.)
- * @{ */
-/** No status set. */
-#define AUDMIXSTREAM_STATUS_NONE                0
-/** The mixing stream is enabled (active). */
-#define AUDMIXSTREAM_STATUS_ENABLED             RT_BIT(0)
-/** The mixing stream can be read from.
- * Always set together with AUDMIXSTREAM_STATUS_ENABLED. */
-#define AUDMIXSTREAM_STATUS_CAN_READ            RT_BIT(1)
-/** The mixing stream can be written to.
- * Always set together with AUDMIXSTREAM_STATUS_ENABLED. */
-#define AUDMIXSTREAM_STATUS_CAN_WRITE           RT_BIT(2)
-/** @} */
-
-
 /**
  * Audio mixer stream.
@@ -91,5 +64,5 @@
 typedef struct AUDMIXSTREAM
 {
-    /** List node. */
+    /** List entry on AUDMIXSINK::lstStreams. */
     RTLISTNODE              Node;
     /** Name of this stream. */
@@ -99,6 +72,4 @@
     /** Sink this stream is attached to. */
     PAUDMIXSINK             pSink;
-    /** Stream flags of type AUDMIXSTREAM_F_. */
-    uint32_t                fFlags;
     /** Stream status of type AUDMIXSTREAM_STATUS_. */
     uint32_t                fStatus;
@@ -119,9 +90,92 @@
     /** The streams's critical section. */
     RTCRITSECT              CritSect;
-} AUDMIXSTREAM, *PAUDMIXSTREAM;
-
-/** Defines an audio sink's current status. */
-#define AUDMIXSINKSTS uint32_t
-
+} AUDMIXSTREAM;
+/** Pointer to an audio mixer stream. */
+typedef AUDMIXSTREAM *PAUDMIXSTREAM;
+
+/** @name AUDMIXSTREAM_STATUS_XXX - mixer stream status.
+ * (This is a destilled version of PDMAUDIOSTREAM_STS_XXX.)
+ * @{ */
+/** No status set. */
+#define AUDMIXSTREAM_STATUS_NONE                UINT32_C(0)
+/** The mixing stream is enabled (active). */
+#define AUDMIXSTREAM_STATUS_ENABLED             RT_BIT_32(0)
+/** The mixing stream can be read from.
+ * Always set together with AUDMIXSTREAM_STATUS_ENABLED. */
+#define AUDMIXSTREAM_STATUS_CAN_READ            RT_BIT_32(1)
+/** The mixing stream can be written to.
+ * Always set together with AUDMIXSTREAM_STATUS_ENABLED. */
+#define AUDMIXSTREAM_STATUS_CAN_WRITE           RT_BIT_32(2)
+/** @} */
+
+
+/**
+ * Audio mixer sink.
+ */
+typedef struct AUDMIXSINK
+{
+    /** List entry on AUDIOMIXER::lstSinks. */
+    RTLISTNODE              Node;
+    /** Pointer to mixer object this sink is bound to. */
+    PAUDIOMIXER             pParent;
+    /** Name of this sink. */
+    char                   *pszName;
+    /** The sink direction (either PDMAUDIODIR_IN or PDMAUDIODIR_OUT). */
+    PDMAUDIODIR             enmDir;
+    /** Scratch buffer for multiplexing / mixing. Might be NULL if not needed. */
+    uint8_t                *pabScratchBuf;
+    /** Size (in bytes) of pabScratchBuf. Might be 0 if not needed. */
+    size_t                  cbScratchBuf;
+    /** The sink's PCM format. */
+    PDMAUDIOPCMPROPS        PCMProps;
+    /** Sink status bits - AUDMIXSINK_STS_XXX. */
+    uint32_t                fStatus;
+    /** Number of streams assigned. */
+    uint8_t                 cStreams;
+    /** List of assigned streams.
+     * @note All streams have the same PCM properties, so the mixer does not do
+     *       any conversion.  bird: That is *NOT* true any more, the mixer has
+     *       encoders/decoder states for each stream (well, input is still a todo).
+     *
+     * @todo Use something faster -- vector maybe?  bird: It won't be faster.  You
+     *       will have a vector of stream pointers (because you cannot have a vector
+     *       of full AUDMIXSTREAM structures since they'll move when the vector is
+     *       reallocated and we need pointers to them to give out to devices), which
+     *       is the same cost as going via Node.pNext/pPrev. */
+    RTLISTANCHOR            lstStreams;
+    /** The volume of this sink. The volume always will
+     *  be combined with the mixer's master volume. */
+    PDMAUDIOVOLUME          Volume;
+    /** The volume of this sink, combined with the last set  master volume. */
+    PDMAUDIOVOLUME          VolumeCombined;
+    /** Timestamp since last update (in ms). */
+    uint64_t                tsLastUpdatedMs;
+    /** Last read (recording) / written (playback) timestamp (in ns). */
+    uint64_t                tsLastReadWrittenNs;
+    /** Union for input/output specifics. */
+    union
+    {
+        struct
+        {
+            /** The current recording source. Can be NULL if not set. */
+            PAUDMIXSTREAM  pStreamRecSource;
+        } In;
+        /*struct
+        {
+        } Out; */
+    };
+    struct
+    {
+        PAUDIOHLPFILE       pFile;
+    } Dbg;
+    /** This sink's mixing buffer, acting as
+     * a parent buffer for all streams this sink owns. */
+    AUDIOMIXBUF             MixBuf;
+    /** The sink's critical section. */
+    RTCRITSECT              CritSect;
+} AUDMIXSINK;
+
+/** @name AUDMIXSINK_STS_XXX - Sink status bits.
+ * @{ */
 /** No status specified. */
 #define AUDMIXSINK_STS_NONE                  0
@@ -136,77 +190,6 @@
  *   recorded but not transferred to the destination yet. */
 #define AUDMIXSINK_STS_DIRTY                 RT_BIT(2)
-
-/**
- * Audio input sink specifics.
- *
- * Do not use directly. Instead, use AUDMIXSINK.
- */
-typedef struct AUDMIXSINKIN
-{
-    /** The current recording source. Can be NULL if not set. */
-    PAUDMIXSTREAM  pStreamRecSource;
-} AUDMIXSINKIN;
-
-/**
- * Audio output sink specifics.
- *
- * Do not use directly. Instead, use AUDMIXSINK.
- */
-typedef struct AUDMIXSINKOUT
-{
-} AUDMIXSINKOUT;
-
-/**
- * Audio mixer sink.
- */
-typedef struct AUDMIXSINK
-{
-    RTLISTNODE              Node;
-    /** Pointer to mixer object this sink is bound to. */
-    PAUDIOMIXER             pParent;
-    /** Name of this sink. */
-    char                   *pszName;
-    /** The sink direction (either PDMAUDIODIR_IN or PDMAUDIODIR_OUT). */
-    PDMAUDIODIR             enmDir;
-    /** The sink's critical section. */
-    RTCRITSECT              CritSect;
-    /** This sink's mixing buffer, acting as
-     * a parent buffer for all streams this sink owns. */
-    AUDIOMIXBUF          MixBuf;
-    /** Scratch buffer for multiplexing / mixing. Might be NULL if not needed. */
-    uint8_t                *pabScratchBuf;
-    /** Size (in bytes) of pabScratchBuf. Might be 0 if not needed. */
-    size_t                  cbScratchBuf;
-    /** Union for input/output specifics. */
-    union
-    {
-        AUDMIXSINKIN        In;
-        AUDMIXSINKOUT       Out;
-    };
-    /** Sink status of type AUDMIXSINK_STS_XXX. */
-    AUDMIXSINKSTS           fStatus;
-    /** The sink's PCM format. */
-    PDMAUDIOPCMPROPS        PCMProps;
-    /** Number of streams assigned. */
-    uint8_t                 cStreams;
-    /** List of assigned streams.
-     * @note All streams have the same PCM properties, so the mixer does not do
-     *       any conversion. */
-    /** @todo Use something faster -- vector maybe? */
-    RTLISTANCHOR            lstStreams;
-    /** The volume of this sink. The volume always will
-     *  be combined with the mixer's master volume. */
-    PDMAUDIOVOLUME          Volume;
-    /** The volume of this sink, combined with the last set  master volume. */
-    PDMAUDIOVOLUME          VolumeCombined;
-    /** Timestamp since last update (in ms). */
-    uint64_t                tsLastUpdatedMs;
-    /** Last read (recording) / written (playback) timestamp (in ns). */
-    uint64_t                tsLastReadWrittenNs;
-    struct
-    {
-        PAUDIOHLPFILE       pFile;
-    } Dbg;
-} AUDMIXSINK;
+/** @} */
+
 
 /**
@@ -225,4 +208,7 @@
 } AUDMIXOP;
 
+
+/** @name AUDMIXER_FLAGS_XXX - For AudioMixerCreate().
+ * @{ */
 /** No mixer flags specified. */
 #define AUDMIXER_FLAGS_NONE             0
@@ -232,4 +218,6 @@
 /** Validation mask. */
 #define AUDMIXER_FLAGS_VALID_MASK       UINT32_C(0x00000001)
+/** @} */
+
 
 int AudioMixerCreate(const char *pszName, uint32_t fFlags, PAUDIOMIXER *ppMixer);
@@ -242,5 +230,5 @@
 int     AudioMixerSinkAddStream(PAUDMIXSINK pSink, PAUDMIXSTREAM pStream);
 int     AudioMixerSinkCreateStream(PAUDMIXSINK pSink, PPDMIAUDIOCONNECTOR pConnector, PPDMAUDIOSTREAMCFG pCfg,
-                                   AUDMIXSTREAMFLAGS fFlags, PPDMDEVINS pDevIns, PAUDMIXSTREAM *ppStream);
+                                   PPDMDEVINS pDevIns, PAUDMIXSTREAM *ppStream);
 int     AudioMixerSinkCtl(PAUDMIXSINK pSink, PDMAUDIOSTREAMCMD enmCmd);
 void AudioMixerSinkDestroy(PAUDMIXSINK pSink, PPDMDEVINS pDevIns);
@@ -249,5 +237,5 @@
 PDMAUDIODIR   AudioMixerSinkGetDir(PAUDMIXSINK pSink);
 PAUDMIXSTREAM AudioMixerSinkGetRecordingSource(PAUDMIXSINK pSink);
-AUDMIXSINKSTS AudioMixerSinkGetStatus(PAUDMIXSINK pSink);
+uint32_t AudioMixerSinkGetStatus(PAUDMIXSINK pSink);
 bool AudioMixerSinkIsActive(PAUDMIXSINK pSink);
 int AudioMixerSinkRead(PAUDMIXSINK pSink, AUDMIXOP enmOp, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead);
Index: trunk/src/VBox/Devices/Audio/DevHda.cpp
===================================================================
--- trunk/src/VBox/Devices/Audio/DevHda.cpp	(revision 88916)
+++ trunk/src/VBox/Devices/Audio/DevHda.cpp	(revision 88917)
@@ -2329,5 +2329,5 @@
 
     PAUDMIXSTREAM pMixStrm = NULL;
-    int rc = AudioMixerSinkCreateStream(pMixSink, pDrv->pConnector, &StreamCfg, 0 /* fFlags */, pDevIns, &pMixStrm);
+    int rc = AudioMixerSinkCreateStream(pMixSink, pDrv->pConnector, &StreamCfg, pDevIns, &pMixStrm);
     LogFlowFunc(("LUN#%RU8: Created stream \"%s\" for sink, rc=%Rrc\n", pDrv->uLUN, StreamCfg.szName, rc));
     if (RT_SUCCESS(rc))
Index: trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
===================================================================
--- trunk/src/VBox/Devices/Audio/DevIchAc97.cpp	(revision 88916)
+++ trunk/src/VBox/Devices/Audio/DevIchAc97.cpp	(revision 88917)
@@ -1868,5 +1868,5 @@
 
         PAUDMIXSTREAM pMixStrm;
-        rc = AudioMixerSinkCreateStream(pMixSink, pDrv->pConnector, pStreamCfg, 0 /* fFlags */, pDevIns, &pMixStrm);
+        rc = AudioMixerSinkCreateStream(pMixSink, pDrv->pConnector, pStreamCfg, pDevIns, &pMixStrm);
         LogFlowFunc(("LUN#%RU8: Created stream \"%s\" for sink, rc=%Rrc\n", pDrv->uLUN, pStreamCfg->szName, rc));
         if (RT_SUCCESS(rc))
Index: trunk/src/VBox/Devices/Audio/DevSB16.cpp
===================================================================
--- trunk/src/VBox/Devices/Audio/DevSB16.cpp	(revision 88916)
+++ trunk/src/VBox/Devices/Audio/DevSB16.cpp	(revision 88917)
@@ -2002,5 +2002,5 @@
 
         PAUDMIXSTREAM pMixStrm;
-        rc = AudioMixerSinkCreateStream(pMixSink, pDrv->pConnector, pStreamCfg, 0 /* fFlags */, pDevIns, &pMixStrm);
+        rc = AudioMixerSinkCreateStream(pMixSink, pDrv->pConnector, pStreamCfg, pDevIns, &pMixStrm);
         LogFlowFunc(("LUN#%RU8: Created stream \"%s\" for sink, rc=%Rrc\n", pDrv->uLUN, pStreamCfg->szName, rc));
         if (RT_SUCCESS(rc))
