VirtualBox

Changeset 88920 in vbox


Ignore:
Timestamp:
May 6, 2021 11:19:09 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
144255
Message:

AudioMixer: Dropped the unused scratch buffer associated with AUDMIXSINK. bugref:9890

Location:
trunk/src/VBox/Devices/Audio
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/AudioMixer.cpp

    r88918 r88920  
    776776        pSink->VolumeCombined.uLeft  = PDMAUDIO_VOLUME_MAX;
    777777        pSink->VolumeCombined.uRight = PDMAUDIO_VOLUME_MAX;
    778 
    779         const size_t cbScratchBuf = _1K; /** @todo Make this configurable? */
    780 
    781         pSink->pabScratchBuf = (uint8_t *)RTMemAlloc(cbScratchBuf);
    782         AssertPtrReturn(pSink->pabScratchBuf, VERR_NO_MEMORY);
    783         pSink->cbScratchBuf  = cbScratchBuf;
    784778    }
    785779
     
    853847    RTStrFree(pSink->pszName);
    854848    pSink->pszName = NULL;
    855 
    856     RTMemFree(pSink->pabScratchBuf);
    857     pSink->pabScratchBuf = NULL;
    858     pSink->cbScratchBuf = 0;
    859849
    860850    AudioMixBufDestroy(&pSink->MixBuf);
  • trunk/src/VBox/Devices/Audio/AudioMixer.h

    r88918 r88920  
    4848    /** The master volume of this mixer. */
    4949    PDMAUDIOVOLUME          VolMaster;
    50     /** List of audio mixer sinks. */
     50    /** List of audio mixer sinks (AUDMIXSINK). */
    5151    RTLISTANCHOR            lstSinks;
    5252    /** Number of used audio sinks. */
     
    5757/** Pointer to an audio mixer instance. */
    5858typedef AUDIOMIXER *PAUDIOMIXER;
     59
     60/** @name AUDMIXER_FLAGS_XXX - For AudioMixerCreate().
     61 * @{ */
     62/** No mixer flags specified. */
     63#define AUDMIXER_FLAGS_NONE             0
     64/** Debug mode enabled.
     65 *  This writes .WAV file to the host, usually to the temporary directory. */
     66#define AUDMIXER_FLAGS_DEBUG            RT_BIT(0)
     67/** Validation mask. */
     68#define AUDMIXER_FLAGS_VALID_MASK       UINT32_C(0x00000001)
     69/** @} */
    5970
    6071
     
    123134    /** The sink direction (either PDMAUDIODIR_IN or PDMAUDIODIR_OUT). */
    124135    PDMAUDIODIR             enmDir;
    125     /** Scratch buffer for multiplexing / mixing. Might be NULL if not needed. */
    126     uint8_t                *pabScratchBuf;
    127     /** Size (in bytes) of pabScratchBuf. Might be 0 if not needed. */
    128     size_t                  cbScratchBuf;
    129     /** The sink's PCM format. */
     136    /** The sink's PCM format (i.e. the guest device side). */
    130137    PDMAUDIOPCMPROPS        PCMProps;
    131138    /** Sink status bits - AUDMIXSINK_STS_XXX. */
     
    133140    /** Number of streams assigned. */
    134141    uint8_t                 cStreams;
    135     /** List of assigned streams.
     142    /** List of assigned streams (AUDMIXSTREAM).
    136143     * @note All streams have the same PCM properties, so the mixer does not do
    137144     *       any conversion.  bird: That is *NOT* true any more, the mixer has
     
    209216
    210217
    211 /** @name AUDMIXER_FLAGS_XXX - For AudioMixerCreate().
    212  * @{ */
    213 /** No mixer flags specified. */
    214 #define AUDMIXER_FLAGS_NONE             0
    215 /** Debug mode enabled.
    216  *  This writes .WAV file to the host, usually to the temporary directory. */
    217 #define AUDMIXER_FLAGS_DEBUG            RT_BIT(0)
    218 /** Validation mask. */
    219 #define AUDMIXER_FLAGS_VALID_MASK       UINT32_C(0x00000001)
    220 /** @} */
    221 
    222 
    223218int AudioMixerCreate(const char *pszName, uint32_t fFlags, PAUDIOMIXER *ppMixer);
    224219int AudioMixerCreateSink(PAUDIOMIXER pMixer, const char *pszName, PDMAUDIODIR enmDir, PPDMDEVINS pDevIns, PAUDMIXSINK *ppSink);
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