VirtualBox

Changeset 65890 in vbox for trunk/src/VBox/Devices/Audio


Ignore:
Timestamp:
Feb 27, 2017 4:16:55 PM (8 years ago)
Author:
vboxsync
Message:

Audio/ValKit: Corrected deletion of data files for an empty streams, bugref:7673

File:
1 edited

Legend:

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

    r65726 r65890  
    177177
    178178                if (RT_FAILURE(rc))
     179                {
    179180                    LogRel(("VaKitAudio: Creating output file '%s' failed with %Rrc\n", szFile, rc));
     181                }
     182                else
     183                {
     184                    size_t cch;
     185                    char szTimingInfo[128];
     186                    cch = RTStrPrintf(szTimingInfo, sizeof(szTimingInfo), "# %dHz %dch %dbps\n",
     187                        pCfgReq->Props.uHz, pCfgReq->Props.cChannels, pCfgReq->Props.cBits);
     188
     189                    RTFileWrite(pStreamDbg->hFileTiming, szTimingInfo, cch, NULL);
     190                }
    180191            }
    181192            else
     
    312323
    313324    int rc = DrvAudioHlpWAVFileClose(&pStreamDbg->File);
     325    RTFileClose(pStreamDbg->hFileTiming);
     326
    314327    if (RT_SUCCESS(rc))
    315328    {
     
    323336
    324337            RTStrCopy(szFile, sizeof(szFile), pStreamDbg->File.szName);
    325             rc = RTFileDelete(szFile);
     338            RTFileDelete(szFile);
    326339
    327340            RTStrCat(szFile, sizeof(szFile), ".timing");
    328             rc = RTFileDelete(szFile);
    329 
     341            RTFileDelete(szFile);
    330342        }
    331343        else
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