VirtualBox

Changeset 76841 in vbox for trunk


Ignore:
Timestamp:
Jan 16, 2019 4:22:17 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128200
Message:

Audio/SB16: Removed dead code (VBOX_WITH_AUDIO_SB16_CALLBACKS).

File:
1 edited

Legend:

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

    r76553 r76841  
    193193    /** Number of active (running) SDn streams. */
    194194    uint8_t                        cStreamsActive;
    195 #ifndef VBOX_WITH_AUDIO_SB16_CALLBACKS
    196195    /** The timer for pumping data thru the attached LUN drivers. */
    197196    PTMTIMERR3                     pTimerIO;
     
    204203     * Used to calculate the time actually elapsed between two timer callbacks. */
    205204    uint64_t                       uTimerTSIO;
    206 #endif
    207205    PTMTIMER                       pTimerIRQ;
    208206    /** The base interface for LUN\#0. */
     
    223221static int sb16OpenOut(PSB16STATE pThis, PPDMAUDIOSTREAMCFG pCfg);
    224222static void sb16CloseOut(PSB16STATE pThis);
    225 #ifndef VBOX_WITH_AUDIO_SB16_CALLBACKS
    226223static void sb16TimerMaybeStart(PSB16STATE pThis);
    227224static void sb16TimerMaybeStop(PSB16STATE pThis);
    228 #endif
    229225
    230226
     
    313309    if (hold)
    314310    {
    315 #ifndef VBOX_WITH_AUDIO_SB16_CALLBACKS
    316311        pThis->cStreamsActive++;
    317312        sb16TimerMaybeStart(pThis);
    318 #else
    319 # error "Implement me!"
    320 #endif
    321313        PDMDevHlpDMASchedule(pThis->pDevInsR3);
    322314    }
    323 #ifndef VBOX_WITH_AUDIO_SB16_CALLBACKS
    324315    else
    325316    {
     
    328319        sb16TimerMaybeStop(pThis);
    329320    }
    330 #else
    331 # error "Implement me!"
    332 #endif
    333321}
    334322
     
    16481636}
    16491637
    1650 #ifndef VBOX_WITH_AUDIO_SB16_CALLBACKS
    1651 
    16521638static void sb16TimerMaybeStart(PSB16STATE pThis)
    16531639{
     
    17571743    }
    17581744}
    1759 
    1760 #endif /* !VBOX_WITH_AUDIO_SB16_CALLBACKS */
    1761 
    17621745
    17631746/**
     
    24832466    pThis->verCfg  = u16Version;
    24842467
    2485 #ifndef VBOX_WITH_AUDIO_SB16_CALLBACKS
    24862468    uint16_t uTimerHz;
    24872469    rc = CFGMR3QueryU16Def(pCfg, "TimerHz", &uTimerHz, 100 /* Hz */);
     
    24892471        return PDMDEV_SET_ERROR(pDevIns, rc,
    24902472                                N_("SB16 configuration error: failed to read Hertz (Hz) rate as unsigned integer"));
    2491 #endif
    2492 
    24932473    /*
    24942474     * Setup the mixer now that we've got the irq and dma channel numbers.
     
    25912571#endif
    25922572
    2593 #ifndef VBOX_WITH_AUDIO_SB16_CALLBACKS
    25942573    if (RT_SUCCESS(rc))
    25952574    {
     
    26052584            AssertMsgFailedReturn(("Error creating I/O timer, rc=%Rrc\n", rc), rc);
    26062585    }
    2607 #else /* !VBOX_WITH_AUDIO_SB16_CALLBACKS */
    2608     if (RT_SUCCESS(rc))
    2609     {
    2610         /** @todo Merge this callback registration with the validation block above once
    2611          *  this becomes the standard. */
    2612         PSB16DRIVER pDrv;
    2613         RTListForEach(&pThis->lstDrv, pDrv, SB16DRIVER, Node)
    2614         {
    2615             /* Only register primary driver.
    2616              * The device emulation does the output multiplexing then. */
    2617             if (pDrv->fFlags != PDMAUDIODRVFLAGS_PRIMARY)
    2618                 continue;
    2619 
    2620             PDMAUDIOCBRECORD AudioCallbacks[2];
    2621 
    2622             SB16CALLBACKCTX Ctx = { pThis, pDrv };
    2623 
    2624             AudioCallbacks[0].enmType     = PDMAUDIOCALLBACKTYPE_INPUT;
    2625             AudioCallbacks[0].pfnCallback = sb16CallbackInput;
    2626             AudioCallbacks[0].pvCtx       = &Ctx;
    2627             AudioCallbacks[0].cbCtx       = sizeof(SB16CALLBACKCTX);
    2628 
    2629             AudioCallbacks[1].enmType     = PDMAUDIOCALLBACKTYPE_OUTPUT;
    2630             AudioCallbacks[1].pfnCallback = sb16CallbackOutput;
    2631             AudioCallbacks[1].pvCtx       = &Ctx;
    2632             AudioCallbacks[1].cbCtx       = sizeof(SB16CALLBACKCTX);
    2633 
    2634             rc = pDrv->pConnector->pfnRegisterCallbacks(pDrv->pConnector, AudioCallbacks, RT_ELEMENTS(AudioCallbacks));
    2635             if (RT_FAILURE(rc))
    2636                 break;
    2637         }
    2638     }
    2639 #endif /* VBOX_WITH_AUDIO_SB16_CALLBACKS */
    26402586
    26412587#ifdef VBOX_AUDIO_DEBUG_DUMP_PCM_DATA
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