Ignore:
Timestamp:
Apr 24, 2000, 9:45:21 PM (25 years ago)
Author:
sandervl
Message:

Fixed wave volume, recording gain + wave recording

File:
1 edited

Legend:

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

    r142 r147  
    329329        return 0;
    330330  }
     331  if(ossfile.f_mode == FMODE_READ && *fStart == PCM_ENABLE_INPUT) {
     332        //need to call poll to really start the stream
     333        int rc;
     334        struct poll_table_struct poll = {0};
     335
     336        rc = oss_devices[ossid].poll(&ossfile, &poll);
     337        if(rc & POLLERR)
     338                return 0;
     339        return 1;
     340  }
     341  else
    331342  if(oss_devices[ossid].ioctl(&ossinode, &ossfile, cmd, (ULONG)fStart)) {
    332343        return 0;
     
    459470  case MIX_SETWAVEVOL:
    460471        ioctl = SOUND_MIXER_WRITE_PCM;
    461         // channel volume ranges from 0 to 0x7FFFFFFF (linear)
    462         volume = volume >> 16;
    463         volume = (volume*100)/0x7FFF;
    464         volume = (volume << 8) | volume; //l&r
    465472        break;
    466473  case MIX_SETMIDIVOL:
     
    495502        break;
    496503  case MIX_SETINPUTGAIN:
    497         ioctl = SOUND_MIXER_WRITE_IGAIN;
     504        ioctl = SOUND_MIXER_WRITE_RECLEV;
    498505        break;
    499506  case MIX_SETLINEINVOL:
Note: See TracChangeset for help on using the changeset viewer.