Page MenuHomeFreeBSD

D45773.id140346.diff
No OneTemporary

D45773.id140346.diff

diff --git a/sys/dev/sound/midi/midi.h b/sys/dev/sound/midi/midi.h
--- a/sys/dev/sound/midi/midi.h
+++ b/sys/dev/sound/midi/midi.h
@@ -39,15 +39,13 @@
#define M_RXEN 0x04
#define M_TXEN 0x08
-#define MIDI_TYPE unsigned char
-
struct snd_midi;
struct snd_midi *
midi_init(kobj_class_t _mpu_cls, int _unit, int _channel, void *cookie);
int midi_uninit(struct snd_midi *_m);
-int midi_out(struct snd_midi *_m, MIDI_TYPE *_buf, int _size);
-int midi_in(struct snd_midi *_m, MIDI_TYPE *_buf, int _size);
+int midi_out(struct snd_midi *_m, uint8_t *_buf, int _size);
+int midi_in(struct snd_midi *_m, uint8_t *_buf, int _size);
kobj_t midimapper_addseq(void *arg1, int *unit, void **cookie);
int midimapper_open(void *arg1, void **cookie);
diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c
--- a/sys/dev/sound/midi/midi.c
+++ b/sys/dev/sound/midi/midi.c
@@ -277,7 +277,7 @@
struct snd_midi *m;
int i;
int inqsize, outqsize;
- MIDI_TYPE *buf;
+ uint8_t *buf;
MIDI_DEBUG(1, printf("midiinit: unit %d/%d.\n", unit, channel));
sx_xlock(&midistat_lock);
@@ -326,14 +326,14 @@
mtx_lock(&m->qlock);
if (inqsize)
- buf = malloc(sizeof(MIDI_TYPE) * inqsize, M_MIDI, M_NOWAIT);
+ buf = malloc(sizeof(uint8_t) * inqsize, M_MIDI, M_NOWAIT);
else
buf = NULL;
MIDIQ_INIT(m->inq, buf, inqsize);
if (outqsize)
- buf = malloc(sizeof(MIDI_TYPE) * outqsize, M_MIDI, M_NOWAIT);
+ buf = malloc(sizeof(uint8_t) * outqsize, M_MIDI, M_NOWAIT);
else
buf = NULL;
m->hiwat = outqsize / 2;
@@ -443,12 +443,12 @@
#define MIDI_SYSEX_END 0xF7
int
-midi_in(struct snd_midi *m, MIDI_TYPE *buf, int size)
+midi_in(struct snd_midi *m, uint8_t *buf, int size)
{
/* int i, sig, enq; */
int used;
- /* MIDI_TYPE data; */
+ /* uint8_t data; */
MIDI_DEBUG(5, printf("midi_in: m=%p size=%d\n", m, size));
/*
@@ -573,7 +573,7 @@
* midi_out: The only clearer of the M_TXEN flag.
*/
int
-midi_out(struct snd_midi *m, MIDI_TYPE *buf, int size)
+midi_out(struct snd_midi *m, uint8_t *buf, int size)
{
int used;
diff --git a/sys/dev/sound/midi/mpu401.c b/sys/dev/sound/midi/mpu401.c
--- a/sys/dev/sound/midi/mpu401.c
+++ b/sys/dev/sound/midi/mpu401.c
@@ -118,7 +118,7 @@
mpu401_intr(struct mpu401 *m)
{
#define MPU_INTR_BUF 16
- MIDI_TYPE b[MPU_INTR_BUF];
+ uint8_t b[MPU_INTR_BUF];
int i;
int s;

File Metadata

Mime Type
text/plain
Expires
Fri, May 15, 7:12 PM (21 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33095648
Default Alt Text
D45773.id140346.diff (2 KB)

Event Timeline