fixed midi interrupt handling, added logs
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15578 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ccf56c61be
commit
89f3467fa1
@ -409,7 +409,7 @@ int32 echo_int(void *arg)
|
|||||||
|
|
||||||
#ifdef MIDI_SUPPORT
|
#ifdef MIDI_SUPPORT
|
||||||
if (midiReceived)
|
if (midiReceived)
|
||||||
release_sem(card->midi.midi_ready_sem);
|
release_sem_etc(card->midi.midi_ready_sem, 1, B_DO_NOT_RESCHEDULE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LIST_FOREACH(stream, &card->streams, next) {
|
LIST_FOREACH(stream, &card->streams, next) {
|
||||||
|
@ -108,6 +108,8 @@ midi_control(
|
|||||||
void * data,
|
void * data,
|
||||||
size_t len)
|
size_t len)
|
||||||
{
|
{
|
||||||
|
LOG(("midi_control()\n"));
|
||||||
|
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,6 +126,8 @@ midi_read(
|
|||||||
DWORD midiData;
|
DWORD midiData;
|
||||||
LONGLONG timestamp;
|
LONGLONG timestamp;
|
||||||
|
|
||||||
|
LOG(("midi_read()\n"));
|
||||||
|
|
||||||
if (acquire_sem(card->midi.midi_ready_sem) != B_OK)
|
if (acquire_sem(card->midi.midi_ready_sem) != B_OK)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
@ -131,6 +135,8 @@ midi_read(
|
|||||||
if (err == ECHOSTATUS_OK) {
|
if (err == ECHOSTATUS_OK) {
|
||||||
*nread = 1;
|
*nread = 1;
|
||||||
*(PDWORD)ptr = midiData;
|
*(PDWORD)ptr = midiData;
|
||||||
|
LOG(("midi_read() : 0x%lx\n", midiData));
|
||||||
|
return B_OK;
|
||||||
}
|
}
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
@ -146,6 +152,8 @@ midi_write(
|
|||||||
echo_dev *card = (echo_dev *) cookie;
|
echo_dev *card = (echo_dev *) cookie;
|
||||||
ECHOSTATUS err;
|
ECHOSTATUS err;
|
||||||
|
|
||||||
|
LOG(("midi_write()\n"));
|
||||||
|
|
||||||
err = card->pEG->WriteMidi(*nwritten, (PBYTE)ptr, nwritten);
|
err = card->pEG->WriteMidi(*nwritten, (PBYTE)ptr, nwritten);
|
||||||
return (err != ECHOSTATUS_OK) ? B_ERROR : B_OK;
|
return (err != ECHOSTATUS_OK) ? B_ERROR : B_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user