Changeset 151 for sbliveos2/trunk/lib32/sound.c
- Timestamp:
- May 28, 2000, 6:50:46 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sbliveos2/trunk/lib32/sound.c
r147 r151 30 30 #include <asm/uaccess.h> 31 31 #include <asm/hardirq.h> 32 #include "..\sblive\icardmid.h" 33 #include "..\sblive\cardmi.h" 34 #include "..\sblive\midi.h" 32 35 33 36 #define LINUX … … 563 566 //****************************************************************************** 564 567 //****************************************************************************** 568 unsigned 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 //****************************************************************************** 576 unsigned 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.