- Timestamp:
- Jan 9, 2023 5:27:44 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/en_US/man_VBoxManage-modifyvm.xml
r97033 r98032 426 426 <arg choice="plain"><replaceable>IO-base</replaceable> <replaceable>IRQ</replaceable></arg> 427 427 </group></arg> 428 <arg>--audio=<group choice="plain"> 428 <arg>--audio-controller=<group choice="plain"> 429 <arg choice="plain">ac97</arg> 430 <arg choice="plain">hda</arg> 431 <arg choice="plain">sb16</arg> 432 </group></arg> 433 <arg>--audio-codec=<group choice="plain"> 434 <arg choice="plain">stac9700</arg> 435 <arg choice="plain">ad1980</arg> 436 <arg choice="plain">stac9221</arg> 437 <arg choice="plain">sb16</arg> 438 </group></arg> 439 <arg>--audio-driver=<group choice="plain"> 429 440 <arg choice="plain">none</arg> 430 441 <arg choice="plain">default</arg> … … 437 448 <arg choice="plain">coreaudio</arg> 438 449 </group></arg> 439 <arg>--audio-controller=<group choice="plain"> 440 <arg choice="plain">ac97</arg> 441 <arg choice="plain">hda</arg> 442 <arg choice="plain">sb16</arg> 443 </group></arg> 444 <arg>--audio-codec=<group choice="plain"> 445 <arg choice="plain">stac9700</arg> 446 <arg choice="plain">ad1980</arg> 447 <arg choice="plain">stac9221</arg> 448 <arg choice="plain">sb16</arg> 450 <arg>--audio-enabled=<group choice="plain"> 451 <arg choice="plain">on</arg> 452 <arg choice="plain">off</arg> 449 453 </group></arg> 450 454 <arg>--audio-in=<group choice="plain"> … … 1935 1939 </varlistentry> 1936 1940 <varlistentry> 1937 <term><option>--audio=<replaceable>type</replaceable></option></term> 1938 <listitem><para> 1939 Specifies whether the VM has audio support, and if so, 1940 which type. Valid audio type values are: 1941 <term><option>--audio-controller=<replaceable>controller-type</replaceable></option></term> 1942 <listitem><para> 1943 Specifies the audio controller to be used with the VM. 1944 Valid audio controller type values are: 1945 <literal>ac97</literal>, <literal>hda</literal>, and 1946 <literal>sb16</literal>. 1947 </para></listitem> 1948 </varlistentry> 1949 <varlistentry> 1950 <term><option>--audio-codec=<replaceable>codec-type</replaceable></option></term> 1951 <listitem><para> 1952 Specifies the audio codec to be used with the VM. Valid 1953 audio codec type values are: <literal>stac9700</literal>, 1954 <literal>ad1980</literal>, <literal>stac9221</literal>, 1955 and <literal>sb16</literal>. 1956 </para></listitem> 1957 </varlistentry> 1958 <varlistentry> 1959 <term><option>--audio-driver=<replaceable>type</replaceable></option></term> 1960 <listitem><para> 1961 Specifies whether which audio driver (backend) to use. 1941 1962 <literal>none</literal>, <literal>default</literal>, 1942 1963 <literal>null</literal>, <literal>dsound</literal>, … … 1945 1966 <literal>coreaudio</literal>. 1946 1967 </para><para> 1947 Note that the audio typesare dependent on the host1968 Note that the audio driver are dependent on the host 1948 1969 operating system. Use the <command>VBoxManage 1949 1970 modifyvm</command> command usage output to determine the 1950 1971 supported audio types for your host system. 1951 </para></listitem> 1952 </varlistentry> 1953 <varlistentry> 1954 <term><option>--audio-controller=<replaceable>controller-type</replaceable></option></term> 1955 <listitem><para> 1956 Specifies the audio controller to be used with the VM. 1957 Valid audio controller type values are: 1958 <literal>ac97</literal>, <literal>hda</literal>, and 1959 <literal>sb16</literal>. 1960 </para></listitem> 1961 </varlistentry> 1962 <varlistentry> 1963 <term><option>--audio-codec=<replaceable>codec-type</replaceable></option></term> 1964 <listitem><para> 1965 Specifies the audio codec to be used with the VM. Valid 1966 audio codec type values are: <literal>stac9700</literal>, 1967 <literal>ad1980</literal>, <literal>stac9221</literal>, 1968 and <literal>sb16</literal>. 1972 </para> 1973 <para> 1974 For maximum interoperability between hosts, the default 1975 audio driver can be used. The VM will then automatically select 1976 the most appropriate audio driver for the current host available. 1977 </para></listitem> 1978 </varlistentry> 1979 <varlistentry> 1980 <term><option>--audio-enabled=on|off</option></term> 1981 <listitem><para> 1982 Specifies whether to enable or disable audio for the VM. 1983 </para> 1984 <para> 1985 This option has precedence over the --audio-on and --audio-off 1986 options, i.e. turning off audio via this option will turn off 1987 both, input and output, audio. 1969 1988 </para></listitem> 1970 1989 </varlistentry> -
trunk/doc/manual/ru_RU/man_VBoxManage-modifyvm.xml
r97033 r98032 423 423 <arg choice="plain"><replaceable>IO-база</replaceable> <replaceable>IRQ</replaceable></arg> 424 424 </group></arg> 425 <arg>--audio=<group choice="plain"> 425 <arg>--audio-controller=<group choice="plain"> 426 <arg choice="plain">ac97</arg> 427 <arg choice="plain">hda</arg> 428 <arg choice="plain">sb16</arg> 429 </group></arg> 430 <arg>--audio-codec=<group choice="plain"> 431 <arg choice="plain">stac9700</arg> 432 <arg choice="plain">ad1980</arg> 433 <arg choice="plain">stac9221</arg> 434 <arg choice="plain">sb16</arg> 435 </group></arg> 436 <arg>--audio-driver=<group choice="plain"> 426 437 <arg choice="plain">none</arg> 427 438 <arg choice="plain">default</arg> … … 434 445 <arg choice="plain">coreaudio</arg> 435 446 </group></arg> 436 <arg>--audio-controller=<group choice="plain"> 437 <arg choice="plain">ac97</arg> 438 <arg choice="plain">hda</arg> 439 <arg choice="plain">sb16</arg> 440 </group></arg> 441 <arg>--audio-codec=<group choice="plain"> 442 <arg choice="plain">stac9700</arg> 443 <arg choice="plain">ad1980</arg> 444 <arg choice="plain">stac9221</arg> 445 <arg choice="plain">sb16</arg> 447 <arg>--audio-enabled=<group choice="plain"> 448 <arg choice="plain">on</arg> 449 <arg choice="plain">off</arg> 446 450 </group></arg> 447 451 <arg>--audio-in=<group choice="plain"> … … 1882 1886 </varlistentry> 1883 1887 <varlistentry> 1884 <term><option>--audio=<replaceable>тип</replaceable></option></term> 1888 <term><option>--audio-controller=<replaceable>тип-контроллера</replaceable></option></term> 1889 <listitem><para> 1890 Задает аудио контроллер, используемый в ВМ. 1891 Допустимые значения: 1892 <literal>ac97</literal>, <literal>hda</literal> и 1893 <literal>sb16</literal>. 1894 </para></listitem> 1895 </varlistentry> 1896 <varlistentry> 1897 <term><option>--audio-codec=<replaceable>тип-кодека</replaceable></option></term> 1898 <listitem><para> 1899 Указывает аудио кодек, используемый в ВМ. Допустимые 1900 значения: <literal>stac9700</literal>, 1901 <literal>ad1980</literal>, <literal>stac9221</literal> 1902 и <literal>sb16</literal>. 1903 </para></listitem> 1904 </varlistentry> 1905 <varlistentry> 1906 <term><option>--audio-driver=<replaceable>тип</replaceable></option></term> 1885 1907 <listitem><para> 1886 1908 Указывает, что ВМ имеет поддержку аудио определенного типа. … … 1896 1918 modifyvm</command> поможет определить поддерживаемые 1897 1919 типы аудио для вашей операционной системы. 1898 </para> </listitem>1899 </varlistentry>1900 <varlistentry>1901 <term><option>--audio-controller=<replaceable>тип-контроллера</replaceable></option></term>1902 <listitem><para>1903 Задает аудио контроллер, используемый в ВМ.1904 Допустимые значения:1905 <literal>ac97</literal>, <literal>hda</literal> и1906 <literal>sb16</literal>.1907 </para></listitem>1908 </varlistentry>1909 <varlistentry>1910 <term><option>--audio-codec=<replaceable>тип-кодека</replaceable></option></term>1911 <listitem><para>1912 Указывает аудио кодек, используемый в ВМ. Допустимые1913 значения: <literal>stac9700</literal>,1914 <literal>ad1980</literal>, <literal>stac9221</literal>1915 и <literal>sb16</literal>.1920 </para> 1921 <para> 1922 Для обеспечения максимальной совместимости между хостами можно 1923 использовать стандартный можно использовать аудиодрайвер по 1924 умолчанию. Затем виртуальная машина автоматически выберет 1925 наиболее подходящий аудиодрайвер для текущего доступного хоста. 1926 </para></listitem> 1927 </varlistentry> 1928 <varlistentry> 1929 <term><option>--audio-enabled=on|off</option></term> 1930 <listitem><para> 1931 Указывает, следует ли включить или отключить звук для виртуальной 1932 машины. 1933 </para> 1934 <para> 1935 Эта опция имеет приоритет над опциями --audio-on и --audio-off 1936 т.е. отключение звука с помощью этой опции приведет к отключению 1937 как входной, так и выходной звук. 1916 1938 </para></listitem> 1917 1939 </varlistentry> -
trunk/doc/manual/user_ChangeLogImpl.xml
r97981 r98032 119 119 </listitem> 120 120 121 <listitem> 122 <para>Audio: The "--audio" option in VBoxManage is now marked as 123 deprecated; please use "--audio-driver" and "--audio-enabled" 124 instead. This will allow more flexibility when changing the driver 125 and/or controlling the audio functionality</para> 126 </listitem> 127 121 128 </itemizedlist> 122 129 </sect1> -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r96888 r98032 178 178 MODIFYVM_AUDIOCONTROLLER, 179 179 MODIFYVM_AUDIOCODEC, 180 MODIFYVM_AUDIO, 180 MODIFYVM_AUDIODRIVER, 181 MODIFYVM_AUDIOENABLED, 182 MODIFYVM_AUDIO, /* Deprecated; remove in the next major version. */ 181 183 MODIFYVM_AUDIOIN, 182 184 MODIFYVM_AUDIOOUT, … … 391 393 OPT2("--audio-codec", "--audiocodec", MODIFYVM_AUDIOCODEC, RTGETOPT_REQ_STRING), 392 394 OPT1("--audio", MODIFYVM_AUDIO, RTGETOPT_REQ_STRING), 395 OPT2("--audio-driver", "--audiodriver", MODIFYVM_AUDIODRIVER, RTGETOPT_REQ_STRING), 396 OPT2("--audio-enabled", "--audioenabled", MODIFYVM_AUDIOENABLED, RTGETOPT_REQ_BOOL_ONOFF), 393 397 OPT2("--audio-in", "--audioin", MODIFYVM_AUDIOIN, RTGETOPT_REQ_BOOL_ONOFF), 394 398 OPT2("--audio-out", "--audioout", MODIFYVM_AUDIOOUT, RTGETOPT_REQ_BOOL_ONOFF), … … 2593 2597 } 2594 2598 2595 case MODIFYVM_AUDIO: 2596 { 2599 case MODIFYVM_AUDIODRIVER: 2600 RT_FALL_THROUGH(); 2601 case MODIFYVM_AUDIO: /** @todo Deprecated; remove. */ 2602 { 2603 if (c == MODIFYVM_AUDIO) 2604 RTStrmPrintf(g_pStdErr, 2605 ModifyVM::tr("Warning: --audio is deprecated and will be removed soon. Use --audio-driver instead!\n")); 2606 2597 2607 ComPtr<IAudioSettings> audioSettings; 2598 2608 CHECK_ERROR_BREAK(sessionMachine, COMGETTER(AudioSettings)(audioSettings.asOutParam())); … … 2600 2610 CHECK_ERROR_BREAK(audioSettings, COMGETTER(Adapter)(audioAdapter.asOutParam())); 2601 2611 ASSERT(audioAdapter); 2602 /** @todo r=klaus: don't unconditionally bolt together setting the audio driver2603 * and enabling the device. Doing this more cleverly allows changing the audio2604 * driver for VMs in saved state, which can be very useful when moving VMs2605 * between systems with different setup. The driver doesn't leave any traces in2606 * saved state. The GUI also might learn this trick if it doesn't use it2607 * already. */2608 2612 /* disable? */ 2609 if (!RTStrICmp(ValueUnion.psz, "none")) 2610 { 2611 CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(false)); 2612 } 2613 if ( !RTStrICmp(ValueUnion.psz, "none") 2614 || !RTStrICmp(ValueUnion.psz, "null")) 2615 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Null)); 2613 2616 else if (!RTStrICmp(ValueUnion.psz, "default")) 2614 {2615 2617 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Default)); 2616 CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));2617 }2618 else if (!RTStrICmp(ValueUnion.psz, "null"))2619 {2620 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Null));2621 CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));2622 }2623 2618 #ifdef RT_OS_WINDOWS 2624 # ifdef VBOX_WITH_WINMM2619 # ifdef VBOX_WITH_WINMM 2625 2620 else if (!RTStrICmp(ValueUnion.psz, "winmm")) 2626 {2627 2621 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_WinMM)); 2628 CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true)); 2629 } 2630 #endif 2622 # endif 2631 2623 else if (!RTStrICmp(ValueUnion.psz, "dsound")) 2632 {2633 2624 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_DirectSound)); 2634 CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));2635 }2636 2625 else if (!RTStrICmp(ValueUnion.psz, "was")) 2637 {2638 2626 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_WAS)); 2639 CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));2640 }2641 2627 #endif /* RT_OS_WINDOWS */ 2642 2628 #ifdef VBOX_WITH_AUDIO_OSS 2643 2629 else if (!RTStrICmp(ValueUnion.psz, "oss")) 2644 {2645 2630 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_OSS)); 2646 CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));2647 }2648 2631 #endif 2649 2632 #ifdef VBOX_WITH_AUDIO_ALSA 2650 2633 else if (!RTStrICmp(ValueUnion.psz, "alsa")) 2651 {2652 2634 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_ALSA)); 2653 CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));2654 }2655 2635 #endif 2656 2636 #ifdef VBOX_WITH_AUDIO_PULSE 2657 2637 else if (!RTStrICmp(ValueUnion.psz, "pulse")) 2658 {2659 2638 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Pulse)); 2660 CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));2661 }2662 2639 #endif 2663 2640 #ifdef RT_OS_DARWIN 2664 2641 else if (!RTStrICmp(ValueUnion.psz, "coreaudio")) 2665 {2666 2642 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_CoreAudio)); 2667 CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));2668 }2669 2643 #endif /* !RT_OS_DARWIN */ 2670 2644 else 2671 2645 { 2672 errorArgument(ModifyVM::tr("Invalid --audio argument '%s'"), ValueUnion.psz); 2646 errorArgument(ModifyVM::tr("Invalid %s argument '%s'"), 2647 c == MODIFYVM_AUDIO ? "--audio" : "--audio-driver", ValueUnion.psz); 2673 2648 hrc = E_FAIL; 2674 2649 } 2650 2651 if ( SUCCEEDED(hrc) 2652 && c == MODIFYVM_AUDIO) /* To keep the original behavior until we remove the command. */ 2653 CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(RTStrICmp(ValueUnion.psz, "none") == false ? false : true)); 2654 2655 break; 2656 } 2657 2658 case MODIFYVM_AUDIOENABLED: 2659 { 2660 ComPtr<IAudioSettings> audioSettings; 2661 CHECK_ERROR_BREAK(sessionMachine, COMGETTER(AudioSettings)(audioSettings.asOutParam())); 2662 ComPtr<IAudioAdapter> audioAdapter; 2663 CHECK_ERROR_BREAK(audioSettings, COMGETTER(Adapter)(audioAdapter.asOutParam())); 2664 ASSERT(audioAdapter); 2665 2666 CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(ValueUnion.f)); 2675 2667 break; 2676 2668 }
Note:
See TracChangeset
for help on using the changeset viewer.