Ignore:
Timestamp:
May 28, 2000, 6:50:46 PM (25 years ago)
Author:
sandervl
Message:

update

File:
1 edited

Legend:

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

    r147 r151  
    3030#include <asm/uaccess.h>
    3131#include <asm/hardirq.h>
     32#include "..\sblive\icardmid.h"
     33#include "..\sblive\cardmi.h"
     34#include "..\sblive\midi.h"
    3235
    3336#define LINUX
     
    563566//******************************************************************************
    564567//******************************************************************************
     568unsigned long OSS32_StreamMidiWrite(unsigned long streamid, unsigned long midiByte)
     569{
     570 struct emu10k1_mididevice *midi_dev = (struct emu10k1_mididevice *)streamid;
     571
     572  return emu10k1_mpu_write_data(midi_dev->card, (u8)midiByte) == 0;
     573}
     574//******************************************************************************
     575//******************************************************************************
     576unsigned long OSS32_StreamMidiRead(unsigned long streamid, char near *buffer, unsigned long bufsize)
     577{
     578 struct emu10k1_mididevice *midi_dev = (struct emu10k1_mididevice *)streamid;
     579 int count = 0;
     580 u8  MPUIvalue;
     581
     582  while(TRUE) {
     583        if(emu10k1_mpu_read_data(midi_dev->card, &MPUIvalue) == 0) {
     584                buffer[count] = MPUIvalue;
     585                count++;
     586        }
     587        else    break;
     588
     589        if(count >= bufsize) {
     590                break;
     591        }
     592  }
     593  return count;
     594}
     595//******************************************************************************
     596//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.