VirtualBox

Changeset 91494 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 30, 2021 8:37:40 AM (3 years ago)
Author:
vboxsync
Message:

Audio/Validation Kit: Some more assertions for audioTestToneFileFind(). ​bugref:10008

File:
1 edited

Legend:

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

    r91492 r91494  
    405405            break;
    406406
    407         Assert(PDMAudioPropsIsSizeAligned(&pToneParms->Props, (uint32_t)cbRead));
     407        AssertReturn(PDMAudioPropsIsSizeAligned(&pToneParms->Props, (uint32_t)cbRead), 0);
    408408
    409409        size_t const cbFrame = PDMAudioPropsFrameSize(&pToneParms->Props);
     410        AssertReturn(cbFrame, 0);
     411        AssertReturn(cbRead % cbFrame == 0, 0);
    410412
    411413        for (size_t i = 0; i < cbRead / cbFrame; i += cbFrame) /** @todo Slow as heck, but works for now. */
     
    421423    }
    422424
     425    AssertReturn(PDMAudioPropsIsSizeAligned(&pToneParms->Props, offFound), 0);
    423426    return offFound;
    424427}
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