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:
Jérôme Duval 2005-12-18 22:53:55 +00:00
parent ccf56c61be
commit 89f3467fa1
2 changed files with 9 additions and 1 deletions

View File

@ -409,7 +409,7 @@ int32 echo_int(void *arg)
#ifdef MIDI_SUPPORT
if (midiReceived)
release_sem(card->midi.midi_ready_sem);
release_sem_etc(card->midi.midi_ready_sem, 1, B_DO_NOT_RESCHEDULE);
#endif
LIST_FOREACH(stream, &card->streams, next) {

View File

@ -108,6 +108,8 @@ midi_control(
void * data,
size_t len)
{
LOG(("midi_control()\n"));
return B_ERROR;
}
@ -124,6 +126,8 @@ midi_read(
DWORD midiData;
LONGLONG timestamp;
LOG(("midi_read()\n"));
if (acquire_sem(card->midi.midi_ready_sem) != B_OK)
return B_ERROR;
@ -131,6 +135,8 @@ midi_read(
if (err == ECHOSTATUS_OK) {
*nread = 1;
*(PDWORD)ptr = midiData;
LOG(("midi_read() : 0x%lx\n", midiData));
return B_OK;
}
return B_ERROR;
}
@ -146,6 +152,8 @@ midi_write(
echo_dev *card = (echo_dev *) cookie;
ECHOSTATUS err;
LOG(("midi_write()\n"));
err = card->pEG->WriteMidi(*nwritten, (PBYTE)ptr, nwritten);
return (err != ECHOSTATUS_OK) ? B_ERROR : B_OK;
}