Ignore:
Timestamp:
Jul 3, 2010, 7:26:36 PM (15 years ago)
Author:
David Azarewicz
Message:

Added status idc function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/lib32/sound.c

    r484 r493  
    12081208    struct snd_pcm_status    status;
    12091209    int                 ret;
    1210     ULONG               delta;
    12111210
    12121211    if(pHandle == NULL || pHandle->magic != MAGIC_WAVE_ALSA32) {
     
    12731272    struct snd_pcm_status    status;
    12741273    int                 ret;
    1275     ULONG               delta;
    12761274
    12771275    if(pHandle == NULL || pHandle->magic != MAGIC_WAVE_ALSA32) {
     
    12981296    return OSSERR_SUCCESS;
    12991297}
    1300 
     1298//******************************************************************************
     1299//******************************************************************************
     1300OSSRET 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}
    13011329//******************************************************************************
    13021330//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.