Changeset 56516 in vbox
- Timestamp:
- Jun 18, 2015 12:34:47 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 101136
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/settings.h
r56477 r56516 696 696 : fEnabled(true), 697 697 controllerType(AudioControllerType_AC97), 698 codecType(AudioCodecType_STAC9700), 698 699 driverType(AudioDriverType_Null) 699 700 {} … … 704 705 || ( (fEnabled == a.fEnabled) 705 706 && (controllerType == a.controllerType) 707 && (codecType == a.codecType) 706 708 && (driverType == a.driverType) 707 709 && (properties == a.properties) … … 711 713 bool fEnabled; 712 714 AudioControllerType_T controllerType; 715 AudioCodecType_T codecType; 713 716 AudioDriverType_T driverType; 714 717 settings::StringsMap properties; -
trunk/src/VBox/Main/src-server/AudioAdapterImpl.cpp
r56459 r56516 33 33 mEnabled(false), 34 34 mAudioDriver(AudioDriverType_Null), 35 mAudioController(AudioControllerType_AC97) 35 mAudioController(AudioControllerType_AC97), 36 mAudioCodec(AudioCodecType_STAC9700) 36 37 {} 37 38 … … 507 508 mData->m->mEnabled = data.fEnabled; 508 509 mData->m->mAudioController = data.controllerType; 510 mData->m->mAudioCodec = data.codecType; 509 511 mData->m->mAudioDriver = data.driverType; 510 512 … … 535 537 data.fEnabled = !!mData->m->mEnabled; 536 538 data.controllerType = mData->m->mAudioController; 539 data.codecType = mData->m->mAudioCodec; 537 540 data.driverType = mData->m->mAudioDriver; 538 541 -
trunk/src/VBox/Main/xml/Settings.cpp
r56477 r56516 2651 2651 } 2652 2652 2653 if (elmAudioAdapter.getAttributeValue("codec", strTemp)) 2654 { 2655 if (strTemp == "SB16") 2656 aa.codecType = AudioCodecType_SB16; 2657 else if (strTemp == "STAC9700") 2658 aa.codecType = AudioCodecType_STAC9700; 2659 else if (strTemp == "AD1980") 2660 aa.codecType = AudioCodecType_AD1980; 2661 else if (strTemp == "STAC9221") 2662 aa.codecType = AudioCodecType_STAC9221; 2663 else 2664 throw ConfigFileError(this, &elmAudioAdapter, N_("Invalid value '%s' in AudioAdapter/@codec attribute"), strTemp.c_str()); 2665 } 2666 else 2667 { 2668 /* No codec attribute provided; use defaults. */ 2669 switch (aa.controllerType) 2670 { 2671 case AudioControllerType_AC97: 2672 aa.codecType = AudioCodecType_STAC9700; 2673 break; 2674 case AudioControllerType_SB16: 2675 aa.codecType = AudioCodecType_SB16; 2676 break; 2677 case AudioControllerType_HDA: 2678 aa.codecType = AudioCodecType_STAC9221; 2679 break; 2680 default: 2681 Assert(false); /* We just checked the controller type above. */ 2682 } 2683 } 2684 2653 2685 if (elmAudioAdapter.getAttributeValue("driver", strTemp)) 2654 2686 { … … 4716 4748 } 4717 4749 pelmAudio->setAttribute("controller", pcszController); 4750 4751 const char *pcszCodec; 4752 switch (hw.audioAdapter.codecType) 4753 { 4754 /* Only write out the setting for non-default AC'97 codec 4755 * and leave the rest alone. 4756 */ 4757 #if 0 4758 case AudioCodecType_SB16: 4759 pcszCodec = "SB16"; 4760 break; 4761 case AudioCodecType_STAC9221: 4762 pcszCodec = "STAC9221"; 4763 break; 4764 case AudioCodecType_STAC9700: 4765 pcszCodec = "STAC9700"; 4766 break; 4767 #endif 4768 case AudioCodecType_AD1980: 4769 pcszCodec = "AD1980"; 4770 break; 4771 default: 4772 /* Don't write out anything if unknown. */ 4773 pcszCodec = NULL; 4774 } 4775 if (pcszCodec) 4776 pelmAudio->setAttribute("codec", pcszCodec); 4718 4777 4719 4778 if (m->sv >= SettingsVersion_v1_10)
Note:
See TracChangeset
for help on using the changeset viewer.