Changeset 71765 in vbox for trunk/src/VBox
- Timestamp:
- Apr 9, 2018 10:56:03 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevSB16.cpp
r71763 r71765 363 363 pCfg->Props.cShift = PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(pCfg->Props.cBits, pCfg->Props.cChannels); 364 364 365 RTStrPrintf(pCfg->szName, sizeof(pCfg->szName), "Output");365 strcpy(pCfg->szName, "Output"); 366 366 367 367 sb16CloseOut(pThis); … … 509 509 pCfg->Props.cShift = PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(pCfg->Props.cBits, pCfg->Props.cChannels); 510 510 511 RTStrPrintf(pCfg->szName, sizeof(pCfg->szName), "Output");511 strcpy(pCfg->szName, "Output"); 512 512 513 513 sb16CloseOut(pThis); … … 1061 1061 } 1062 1062 1063 static void sb16 ResetLegacy(PSB16STATE pThis)1063 static void sb16CmdResetLegacy(PSB16STATE pThis) 1064 1064 { 1065 1065 LogFlowFuncEnter(); … … 1085 1085 pCfg->Props.cShift = PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(pCfg->Props.cBits, pCfg->Props.cChannels); 1086 1086 1087 RTStrPrintf(pCfg->szName, sizeof(pCfg->szName), "Output"); 1087 AssertCompile(sizeof(pCfg->szName) > sizeof("Output")); 1088 strcpy(pCfg->szName, "Output"); 1088 1089 1089 1090 sb16CloseOut(pThis); 1090 1091 } 1091 1092 1092 static void sb16 Reset(PSB16STATE pThis)1093 static void sb16CmdReset(PSB16STATE pThis) 1093 1094 { 1094 1095 PDMDevHlpISASetIrq(pThis->pDevInsR3, pThis->irq, 0); … … 1115 1116 1116 1117 sb16Control(pThis, 0); 1117 sb16 ResetLegacy(pThis);1118 sb16CmdResetLegacy(pThis); 1118 1119 } 1119 1120 … … 1144 1145 } 1145 1146 else 1146 sb16 Reset(pThis);1147 sb16CmdReset(pThis); 1147 1148 } 1148 1149 pThis->v2x6 = 0; … … 1160 1161 1161 1162 case 0xb8: /* Panic */ 1162 sb16 Reset(pThis);1163 sb16CmdReset(pThis); 1163 1164 break; 1164 1165 1165 1166 case 0x39: 1166 1167 dsp_out_data(pThis, 0x38); 1167 sb16 Reset(pThis);1168 sb16CmdReset(pThis); 1168 1169 pThis->v2x6 = 0x39; 1169 1170 break; … … 1756 1757 } 1757 1758 1759 /** 1760 * @callback_method_impl{FNTMTIMERDEV} 1761 */ 1758 1762 static DECLCALLBACK(void) sb16TimerIO(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser) 1759 1763 { … … 2037 2041 pCfg->Props.cShift = PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(pCfg->Props.cBits, pCfg->Props.cChannels); 2038 2042 2039 RTStrPrintf(pCfg->szName, sizeof(pCfg->szName), "Output");2043 strcpy(pCfg->szName, "Output"); 2040 2044 2041 2045 sb16CloseOut(pThis); … … 2121 2125 return VERR_NO_MEMORY; 2122 2126 2123 if (!RTStrPrintf(pCfgHost->szName, sizeof(pCfgHost->szName), "%s", pCfg->szName))2124 {2125 RTMemFree(pCfgHost);2126 return VERR_BUFFER_OVERFLOW;2127 }2128 2129 2127 LogFunc(("[LUN#%RU8] %s\n", pDrv->uLUN, pCfgHost->szName)); 2130 2128 … … 2471 2469 sb16SpeakerControl(pThis, 0); 2472 2470 sb16Control(pThis, 0); 2473 sb16 ResetLegacy(pThis);2471 sb16CmdResetLegacy(pThis); 2474 2472 } 2475 2473 … … 2653 2651 LogFunc(("cLUNs=%RU8, rc=%Rrc\n", uLUN, rc)); 2654 2652 2655 sb16 ResetLegacy(pThis);2653 sb16CmdResetLegacy(pThis); 2656 2654 2657 2655 #ifdef VBOX_WITH_AUDIO_SB16_ONETIME_INIT … … 2679 2677 LogRel(("SB16: Falling back to NULL backend (no sound audible)\n")); 2680 2678 2681 sb16 ResetLegacy(pThis);2679 sb16CmdResetLegacy(pThis); 2682 2680 sb16Reattach(pThis, pDrv, pDrv->uLUN, "NullAudio"); 2683 2681
Note:
See TracChangeset
for help on using the changeset viewer.