[Media_api] PortMidi reports success on init but ALSA ouputs
errormessage
Sebastien Frippiat
sebastien.frippiat at alterface.com
Fri Feb 17 09:39:53 PST 2006
Roger Dannenberg wrote:
>Sebastien,
>
> Cpr is right -- it should not be an error to initialize PortMidi
>even if there are no devices available. But did you get the console error
>message after initialization or when you try to open a device? You may be
>right that there's a problem.
> I'm definitely behind on putting out a new release with some mostly
>minor fixes, but on the other hand, a lot of people seem to be using
>PortMidi without complaints, so low activity levels is seen as a virtue. I
>certainly want to track down and fix bugs as they are discovered, so let me
>know.
>
> -Roger
>
>
>
>
>
>
Hi.
Thanks for your quick answers. At least, now, I know for sure that there
is support for the PortMidi library :-)
I understand your answer and I realize now that I should have tested
further my program. About your question, the error message come when I'm
initialize : I call Pm_Initialize() and Alsa directly ouput its message.
I checked and Pm_CountDevices() returns 0 as it should. Great.
Now, another problem. If I initialize PortMidi when I have no MIDI
device, I get the Alsa message and I can bear with it. Another problem
arises when I call Pm_Terminate (as I should because it IS initialized)
: Alsa complains again and EXIT my program. Here is the output I have :
- ALSA lib seq_hw.c:446:(snd_seq_hw_open) open /dev/snd/seq failed: No
such file or directory
This one come from the initialization.
- AlterMidiIO::MidiIO::initialize() - No MIDI device has been found
This is a message I output just before calling Pm_Terminate.
- Salto_DBG: seq.c:1014: snd_seq_close: Assertion `seq' failed.
Again a message from Alsa ("Salto_DBG" is the name of my executable
- Aborted
Again from Alsa.
It is obviously not a clean way of exiting my program as I cannot
prevent it and none of my destructors are called.
I tried with a simple program which only does the following :
Pm_Initialize(), Pm_CountDevices() and Pm_Terminate() if no device has
been found. The problem arises. So I'm sure the problem doesn't come
from my program.
By the way, I compile by adding the -lportmidi -lporttime -lasound flags
(I am obliged to add -lasound to avoid unresolved externals).
Thanks for your help.
Sebastien
More information about the media_api
mailing list