VirtualBox

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


Ignore:
Timestamp:
May 12, 2021 12:52:13 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
144349
Message:

Audio/ValKit: First tones can be played back by VKAT now. bugref:10008

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

Legend:

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

    r89005 r89010  
    9393
    9494    memcpy(&pTone->Props, pProps, sizeof(PDMAUDIOPCMPROPS));
     95
     96    pTone->enmType = AUDIOTESTTONETYPE_SINE; /* Only type implemented so far. */
    9597
    9698    return pTone->rdFreqHz;
  • trunk/src/VBox/Devices/Audio/AudioTest.h

    r88985 r89010  
    2727
    2828/**
     29 * Enumeration for an audio test tone (wave) type.
     30 */
     31typedef enum AUDIOTESTTONETYPE
     32{
     33    /** Invalid type. */
     34    AUDIOTESTTONETYPE_INVALID = 0,
     35    /** Sine wave. */
     36    AUDIOTESTTONETYPE_SINE,
     37    /** Square wave. Not implemented yet. */
     38    AUDIOTESTTONETYPE_SQUARE,
     39    /** Triangluar wave. Not implemented yet. */
     40    AUDIOTESTTONETYPE_TRIANGLE,
     41    /** Sawtooth wave. Not implemented yet. */
     42    AUDIOTESTTONETYPE_SAWTOOTH,
     43    /** The usual 32-bit hack. */
     44    AUDIOTESTTONETYPE_32BIT_HACK = 0x7fffffff
     45} AUDIOTESTTONETYPE;
     46
     47/**
    2948 * Structure for handling an audio (sine wave) test tone.
    3049 */
    3150typedef struct AUDIOTESTTONE
    3251{
     52    /** The tone's wave type. */
     53    AUDIOTESTTONETYPE   enmType;
    3354    /** The PCM properties. */
    34     PDMAUDIOPCMPROPS Props;
     55    PDMAUDIOPCMPROPS    Props;
    3556    /** Current sample index for generate the sine wave. */
    36     uint64_t         uSample;
     57    uint64_t            uSample;
    3758    /** The fixed portion of the sin() input. */
    38     double           rdFixed;
     59    double              rdFixed;
    3960    /** Frequency (in Hz) of the sine wave to generate. */
    40     double           rdFreqHz;
     61    double              rdFreqHz;
    4162} AUDIOTESTTONE;
    4263/** Pointer to an audio test tone. */
  • trunk/src/VBox/Devices/Audio/VBoxDDVKAT.h

    r88959 r89010  
    137137DECLINLINE(int) CFGMR3QueryStringDef(PCFGMNODE pNode, const char *pszName, char *pszString, size_t cchString, const char *pszDef)
    138138{
    139     RT_NOREF(pNode, pszName, pszString, cchString, pszDef);
    140     return 0;
     139    RT_NOREF(pNode, pszName);
     140    return RTStrCopy(pszString, cchString, pszDef); /* Just return the expected default value. */
    141141}
    142142
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