Changeset 68485 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 21, 2017 1:48:12 PM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
r67564 r68485 453 453 CHECK_ERROR_BREAK(sessionMachine, COMSETTER(CPUExecutionCap)(n)); 454 454 } 455 else if (!strcmp(a->argv[1], "audioin")) 456 { 457 ComPtr<IAudioAdapter> adapter; 458 CHECK_ERROR_BREAK(sessionMachine, GetAudioAdapter(adapter.asOutParam())); 459 if (adapter) 460 { 461 if (!strcmp(a->argv[2], "on")) 462 { 463 CHECK_ERROR_RET(adapter, COMSETTER(EnabledIn)(TRUE), RTEXITCODE_FAILURE); 464 } 465 else if (!strcmp(a->argv[2], "off")) 466 { 467 CHECK_ERROR_RET(adapter, COMSETTER(EnabledIn)(FALSE), RTEXITCODE_FAILURE); 468 } 469 else 470 { 471 errorArgument("Invalid value '%s'", Utf8Str(a->argv[2]).c_str()); 472 rc = E_FAIL; 473 break; 474 } 475 if (SUCCEEDED(rc)) 476 fNeedsSaving = true; 477 } 478 else 479 { 480 errorArgument("audio adapter not enabled in VM configuration"); 481 rc = E_FAIL; 482 break; 483 } 484 } 485 else if (!strcmp(a->argv[1], "audioout")) 486 { 487 ComPtr<IAudioAdapter> adapter; 488 CHECK_ERROR_BREAK(sessionMachine, GetAudioAdapter(adapter.asOutParam())); 489 if (adapter) 490 { 491 if (!strcmp(a->argv[2], "on")) 492 { 493 CHECK_ERROR_RET(adapter, COMSETTER(EnabledOut)(TRUE), RTEXITCODE_FAILURE); 494 } 495 else if (!strcmp(a->argv[2], "off")) 496 { 497 CHECK_ERROR_RET(adapter, COMSETTER(EnabledOut)(FALSE), RTEXITCODE_FAILURE); 498 } 499 else 500 { 501 errorArgument("Invalid value '%s'", Utf8Str(a->argv[2]).c_str()); 502 rc = E_FAIL; 503 break; 504 } 505 if (SUCCEEDED(rc)) 506 fNeedsSaving = true; 507 } 508 else 509 { 510 errorArgument("audio adapter not enabled in VM configuration"); 511 rc = E_FAIL; 512 break; 513 } 514 } 455 515 else if (!strcmp(a->argv[1], "clipboard")) 456 516 { -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r68185 r68485 835 835 RTStrmPrintf(pStrm, "]\n"); 836 836 RTStrmPrintf(pStrm, 837 " [--audioin on|off]\n" 838 " [--audioout on|off]\n" 837 839 " [--audiocontroller ac97|hda|sb16]\n" 838 840 " [--audiocodec stac9700|ad1980|stac9221|sb16]\n" … … 983 985 " [--capturefile <filename>] |\n" 984 986 " usbdetach <uuid>|<address> |\n" 987 " audioin on|off |\n" 988 " audioout on|off |\n" 985 989 " clipboard disabled|hosttoguest|guesttohost|\n" 986 990 " bidirectional |\n" -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r66830 r68485 150 150 MODIFYVM_AUDIOCODEC, 151 151 MODIFYVM_AUDIO, 152 MODIFYVM_AUDIOIN, 153 MODIFYVM_AUDIOOUT, 152 154 MODIFYVM_CLIPBOARD, 153 155 MODIFYVM_DRAGANDDROP, … … 329 331 { "--audiocodec", MODIFYVM_AUDIOCODEC, RTGETOPT_REQ_STRING }, 330 332 { "--audio", MODIFYVM_AUDIO, RTGETOPT_REQ_STRING }, 333 { "--audioin", MODIFYVM_AUDIOIN, RTGETOPT_REQ_BOOL_ONOFF }, 334 { "--audioout", MODIFYVM_AUDIOOUT, RTGETOPT_REQ_BOOL_ONOFF }, 331 335 { "--clipboard", MODIFYVM_CLIPBOARD, RTGETOPT_REQ_STRING }, 332 336 { "--draganddrop", MODIFYVM_DRAGANDDROP, RTGETOPT_REQ_STRING }, … … 2325 2329 } 2326 2330 2331 case MODIFYVM_AUDIOIN: 2332 { 2333 ComPtr<IAudioAdapter> audioAdapter; 2334 sessionMachine->COMGETTER(AudioAdapter)(audioAdapter.asOutParam()); 2335 ASSERT(audioAdapter); 2336 2337 CHECK_ERROR(audioAdapter, COMSETTER(EnabledIn)(ValueUnion.f)); 2338 break; 2339 } 2340 2341 case MODIFYVM_AUDIOOUT: 2342 { 2343 ComPtr<IAudioAdapter> audioAdapter; 2344 sessionMachine->COMGETTER(AudioAdapter)(audioAdapter.asOutParam()); 2345 ASSERT(audioAdapter); 2346 2347 CHECK_ERROR(audioAdapter, COMSETTER(EnabledIn)(ValueUnion.f)); 2348 break; 2349 } 2350 2327 2351 case MODIFYVM_CLIPBOARD: 2328 2352 {
Note:
See TracChangeset
for help on using the changeset viewer.