VirtualBox

Changeset 35419 in vbox


Ignore:
Timestamp:
Jan 7, 2011 9:27:48 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
69286
Message:

Devices/Audio/filteraudio: don't call host audio functions if the host audio backend failed to initialize

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/filteraudio.c

    r34969 r35419  
    334334
    335335    if (!pVoice->fIntercepted)
    336     {
    337336        return filter_conf.pDrv->pcm_ops->run_out(phw);
    338     }
    339337
    340338    /* We return the live count in the case we are not initialized. This should
     
    411409
    412410    status = ASMAtomicReadU32(&pVoice->status);
    413     if (!(status == CA_STATUS_INIT))
     411    if (status != CA_STATUS_INIT)
    414412        return 0;
    415413
     
    551549
    552550    /* Iterate as long as data is available */
    553     while(csWritten < csAvail)
     551    while (csWritten < csAvail)
    554552    {
    555553        /* How much is left? */
     
    666664    int rc = VINF_SUCCESS;
    667665    filterVoiceIn *pVoice;
     666    int rcHost = 0;
    668667
    669668    if (!filter_conf.pDrv)
     
    689688            /* Note: audio.c does not use variable parameters '...', so ok to forward only 'phw' and 'cmd'. */
    690689            Log(("FilterAudio: [Input]: forwarding ctl_in ENABLE for voice %p (hw %p)\n", pVoice, pVoice->phw));
    691             return filter_conf.pDrv->pcm_ops->ctl_in(phw, cmd);
     690            if (pVoice->fHostOK)
     691                rcHost = filter_conf.pDrv->pcm_ops->ctl_in(phw, cmd);
     692            return rcHost;
    692693        }
    693694
     
    731732            /* Note: audio.c does not use variable parameters '...', so ok to forward only 'phw' and 'cmd'. */
    732733            Log(("FilterAudio: [Input]: forwarding ctl_in DISABLE for voice %p (hw %p)\n", pVoice, pVoice->phw));
    733             return filter_conf.pDrv->pcm_ops->ctl_in(phw, cmd);
     734            if (pVoice->fHostOK)
     735                rcHost = filter_conf.pDrv->pcm_ops->ctl_in(phw, cmd);
     736            return rcHost;
    734737        }
    735738
     
    771774    /* Uninitialize both host and filter parts of the voice. */
    772775    Log(("FilterAudio: [Input]: forwarding fini_in for voice %p (hw %p)\n", pVoice, pVoice->phw));
    773     filter_conf.pDrv->pcm_ops->fini_in(phw);
     776    if (pVoice->fHostOK)
     777        filter_conf.pDrv->pcm_ops->fini_in(phw);
    774778
    775779    Log(("FilterAudio: [Input]: fini_in for voice %p (hw %p)\n", pVoice, pVoice->phw));
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