VirtualBox

Changeset 87995 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Mar 7, 2021 7:44:29 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
143118
Message:

Audio: Switched DrvAudioHlpFramesToBytes parameters. bugref:9890

Location:
trunk/src/VBox/Main/src-client
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/DrvAudioRec.cpp

    r82968 r87995  
    8989#include "ConsoleImpl.h"
    9090
    91 #include "../../Devices/Audio/DrvAudio.h"
     91#include "../../Devices/Audio/DrvAudio.h" /* Ugly! */
    9292#include "WebMWriter.h"
    9393
     
    108108*   Defines                                                                                                                      *
    109109*********************************************************************************************************************************/
    110 
    111 #define AVREC_OPUS_HZ_MAX               48000           /** Maximum sample rate (in Hz) Opus can handle. */
    112 #define AVREC_OPUS_FRAME_MS_DEFAULT     20              /** Default Opus frame size (in ms). */
     110#define AVREC_OPUS_HZ_MAX               48000   /**< Maximum sample rate (in Hz) Opus can handle. */
     111#define AVREC_OPUS_FRAME_MS_DEFAULT     20      /**< Default Opus frame size (in ms). */
    113112
    114113
     
    438437            pCodec->Opus.msFrame = AVREC_OPUS_FRAME_MS_DEFAULT; /* 20ms by default; to prevent division by zero. */
    439438        pCodec->Opus.csFrame = pSink->Codec.Parms.PCMProps.uHz / (1000 /* s in ms */ / pSink->Codec.Opus.msFrame);
    440         pCodec->Opus.cbFrame = DrvAudioHlpFramesToBytes(pCodec->Opus.csFrame, &pSink->Codec.Parms.PCMProps);
     439        pCodec->Opus.cbFrame = DrvAudioHlpFramesToBytes(&pSink->Codec.Parms.PCMProps, pCodec->Opus.csFrame);
    441440
    442441#ifdef VBOX_WITH_STATISTICS
  • trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp

    r82968 r87995  
    9595    const uint32_t cFramesVrdpServer = DrvAudioHlpMilliToFrames(200  /* ms */, &pCfgAcq->Props);
    9696
    97     int rc = RTCircBufCreate(&pStreamVRDE->In.pCircBuf, DrvAudioHlpFramesToBytes(cFramesVrdpServer, &pCfgAcq->Props));
     97    int rc = RTCircBufCreate(&pStreamVRDE->In.pCircBuf, DrvAudioHlpFramesToBytes(&pCfgAcq->Props, cFramesVrdpServer));
    9898    if (RT_SUCCESS(rc))
    9999    {
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