VirtualBox

Changeset 87853 in vbox


Ignore:
Timestamp:
Feb 23, 2021 5:48:11 PM (4 years ago)
Author:
vboxsync
Message:

Audio/DebugAudio: Always use the requested audio stream format when creating the artificial input stream; that way it's more flexible.

File:
1 edited

Legend:

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

    r87843 r87853  
    174174    /* Chose a random frequency so that every time a recording is started (hopefully) another tone will be generated. */
    175175    pStreamDbg->In.uFreqHz   = auFreqsHz[RTRandU32Ex(0, RT_ELEMENTS(auFreqsHz) - 1)];
    176 
    177     pCfgAcq->Props.uHz         = 22050; /* 22,5 kHz. */
    178     pCfgAcq->Props.cbSample    = 2;     /* 16-bit samples. */
    179     pCfgAcq->Props.cChannels   = 1;     /* Mono. */
    180     pCfgAcq->Props.fSigned     = true;
    181     pCfgAcq->Props.fSwapEndian = false;
    182     pCfgAcq->Props.cShift      = PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(pCfgAcq->Props.cbSample, pCfgAcq->Props.cChannels);
    183176
    184177    return debugCreateFile(pDrv, pStreamDbg, true /* fIn */, pCfgAcq);
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