> Can I turn the question around and ask why you wanted to 
> retrieve a certain
> system sound, instead of the full list and/or the one 
> currently selected by
> the user?

Well, I needed a nice sound in my application Bullshit Bingo
(http://linkesoft.com/english/bbingo/b/bbingo.prc)
The "Concerto" sound (#4) seemed to be just perfect for this. Recently I
found out that in the German version of the system midi sounds the returned
list is in different order because of localized names.

A much better way would be to link my own midi resource into my program but
I haven't figured out how to do this in CodeWarrior. Sure, I could do a
DmCreateDatabaseFromImage() etc. but I was looking for a really simple
solution.

What I do now is to loop through the midi record list and search for
"Concerto" or "Konzert" (will probably catch 80% of the cases), if this
fails, take the record where the unique ID ends in 0x04 (99%) and if this
fails, take the first record.

There are predefined constants for the "simple" sounds like sndWarning,
sndError etc, but unfortunately not for the built-in system midi sounds. 
Of course, if applications are supposed to add/modify/delete system midi
sounds, my current approach is wrong :-(

Andreas

Reply via email to