- Timestamp:
- Jan 18, 2021 2:06:59 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 142258
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp
r82968 r87299 161 161 static int alsaALSAToAudioProps(snd_pcm_format_t fmt, PPDMAUDIOPCMPROPS pProps) 162 162 { 163 /** @todo r=bird: Why isn't this code setting fSwapEndian for every case? It164 * seems to make some UNDOCUMENT ASSUMPTIONS about pProps. */165 163 switch (fmt) 166 164 { … … 168 166 pProps->cbSample = 1; 169 167 pProps->fSigned = true; 168 pProps->fSwapEndian = false; 170 169 break; 171 170 … … 173 172 pProps->cbSample = 1; 174 173 pProps->fSigned = false; 174 pProps->fSwapEndian = false; 175 175 break; 176 176 … … 178 178 pProps->cbSample = 2; 179 179 pProps->fSigned = true; 180 pProps->fSwapEndian = false; 180 181 break; 181 182 … … 183 184 pProps->cbSample = 2; 184 185 pProps->fSigned = false; 186 pProps->fSwapEndian = false; 185 187 break; 186 188 … … 204 206 pProps->cbSample = 4; 205 207 pProps->fSigned = true; 208 pProps->fSwapEndian = false; 206 209 break; 207 210 … … 209 212 pProps->cbSample = 4; 210 213 pProps->fSigned = false; 214 pProps->fSwapEndian = false; 211 215 break; 212 216 … … 231 235 } 232 236 233 Assert(pProps->cbSample > 0); 234 Assert(pProps->cChannels > 0); 237 AssertReturn(pProps->cbSample > 0, VERR_NOT_SUPPORTED); 238 AssertReturn(pProps->cChannels > 0, VERR_INVALID_PARAMETER); 239 235 240 pProps->cShift = PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(pProps->cbSample, pProps->cChannels); 236 241
Note:
See TracChangeset
for help on using the changeset viewer.