VirtualBox

Changeset 70318 in vbox


Ignore:
Timestamp:
Dec 22, 2017 1:21:02 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
119915
Message:

Audio/DrvHostCoreAudio.cpp: Forward ported having the default audio queue configuration split up in more but smaller buffers (32).

File:
1 edited

Legend:

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

    r69118 r70318  
    3838#include <AudioToolbox/AudioConverter.h>
    3939#include <AudioToolbox/AudioToolbox.h>
     40
     41
     42/* Audio Queue buffer configuration. */
     43#define AQ_BUF_COUNT    32      /* Number of buffers. */
     44#define AQ_BUF_SIZE     512     /* Size of each buffer in bytes. */
     45#define AQ_BUF_TOTAL    (AQ_BUF_COUNT * AQ_BUF_SIZE)
     46#define AQ_BUF_SAMPLES  (AQ_BUF_TOTAL / 4)  /* Hardcoded 4 bytes per sample! */
    4047
    4148/* Enables utilizing the Core Audio converter unit for converting
     
    372379    AudioQueueRef               audioQueue;
    373380    /** The audio buffers which are used with the above audio queue. */
    374     AudioQueueBufferRef         audioBuffer[3];
     381    AudioQueueBufferRef         audioBuffer[AQ_BUF_COUNT];
    375382    /** The acquired (final) audio format for this stream. */
    376383    AudioStreamBasicDescription asbdStream;
     
    12961303        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
    12971304
    1298     const size_t cbBufSize = _4K; /** @todo Make this configurable! */
     1305    const size_t cbBufSize = AQ_BUF_SIZE; /** @todo Make this configurable! */
    12991306
    13001307    /*
     
    23212328            if (RT_SUCCESS(rc))
    23222329            {
    2323                 pCfgAcq->cFrameBufferHint = _4K; /** @todo Make this configurable. */
     2330                pCfgAcq->cFrameBufferHint = AQ_BUF_SAMPLES; /** @todo Make this configurable. */
    23242331            }
    23252332            if (RT_SUCCESS(rc))
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