VirtualBox

Changeset 65765 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Feb 13, 2017 12:53:37 PM (8 years ago)
Author:
vboxsync
Message:

Audio/DrvHostCoreAudio.cpp: Use PDMAUDIOSTREAMCFG_S2B for circular buffer size, logging, assertions, comments.

File:
1 edited

Legend:

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

    r65762 r65765  
    14461446int coreAudioOutputQueueProcBuffer(PCOREAUDIOSTREAM pCAStream, AudioQueueBufferRef audioBuffer)
    14471447{
     1448    AssertPtr(pCAStream);
     1449
    14481450    PRTCIRCBUF pCircBuf = pCAStream->pCircBuf;
    14491451    AssertPtr(pCircBuf);
     
    16051607    }
    16061608
    1607     rc = RTCircBufCreate(&pCAStream->pCircBuf, 8096 << 1 /*pHstStrmIn->Props.cShift*/); /** @todo FIX THIS !!! */
     1609    rc = RTCircBufCreate(&pCAStream->pCircBuf, PDMAUDIOSTREAMCFG_S2B(pCfgReq, 4096)); /** @todo Make this configurable. */
    16081610    if (RT_FAILURE(rc))
    16091611        return rc;
     
    20622064        memcpy(pvChunk, (uint8_t *)pvBuf + cbWrittenTotal, cbChunk);
    20632065
     2066#ifdef DEBUG_DUMP_PCM_DATA
     2067        RTFILE fh;
     2068        rc = RTFileOpen(&fh, DEBUG_DUMP_PCM_DATA_PATH "ca-playback.pcm",
     2069                        RTFILE_O_OPEN_CREATE | RTFILE_O_APPEND | RTFILE_O_WRITE | RTFILE_O_DENY_NONE);
     2070        if (RT_SUCCESS(rc))
     2071        {
     2072            RTFileWrite(fh, pvChunk, cbChunk, NULL);
     2073            RTFileClose(fh);
     2074        }
     2075        else
     2076            AssertFailed();
     2077#endif
     2078
    20642079        /* Release the ring buffer, so the read thread could start reading this data. */
    20652080        RTCircBufReleaseWriteBlock(pCAStream->pCircBuf, cbChunk);
     
    23232338            if (RT_SUCCESS(rc))
    23242339            {
    2325                 pCfgAcq->cSampleBufferHint = _4K; /** @todo FIX THIS !!! */
     2340                pCfgAcq->cSampleBufferHint = _4K; /** @todo Make this configurable. */
    23262341            }
    23272342            if (RT_SUCCESS(rc))
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