Changeset 493 for GPL/trunk/lib32/sound.c
- Timestamp:
- Jul 3, 2010, 7:26:36 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk/lib32/sound.c
r484 r493 1208 1208 struct snd_pcm_status status; 1209 1209 int ret; 1210 ULONG delta;1211 1210 1212 1211 if(pHandle == NULL || pHandle->magic != MAGIC_WAVE_ALSA32) { … … 1273 1272 struct snd_pcm_status status; 1274 1273 int ret; 1275 ULONG delta;1276 1274 1277 1275 if(pHandle == NULL || pHandle->magic != MAGIC_WAVE_ALSA32) { … … 1298 1296 return OSSERR_SUCCESS; 1299 1297 } 1300 1298 //****************************************************************************** 1299 //****************************************************************************** 1300 OSSRET OSS32_WaveGetStatus(ULONG streamid, ULONG *pStatus) 1301 { 1302 soundhandle *pHandle = (soundhandle *)streamid; 1303 struct snd_pcm_status status; 1304 int ret; 1305 1306 if(pHandle == NULL || pHandle->magic != MAGIC_WAVE_ALSA32) { 1307 DebugInt3(); 1308 return OSSERR_INVALID_STREAMID; 1309 } 1310 if(pStatus == NULL) { 1311 DebugInt3(); 1312 return OSSERR_INVALID_PARAMETER; 1313 } 1314 1315 //set operation to non-blocking 1316 pHandle->file.f_flags = O_NONBLOCK; 1317 1318 //Get the status of the stream 1319 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG)__Stack32ToFlat(&status)); 1320 1321 if(ret) { 1322 DebugInt3(); 1323 return UNIXToOSSError(ret); 1324 } 1325 1326 *pStatus = status.state; 1327 return OSSERR_SUCCESS; 1328 } 1301 1329 //****************************************************************************** 1302 1330 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.