|
sound initialisation |
Neil Walker
Member #210
April 2000
|
Hello, There seems to be two different detection routines but only one install, so how do you know if either actually fails at the install_sound call? Thanks. Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
Sirocco
Member #88
April 2000
|
From the manual: Quote: Returns zero if the sound is successfully installed, and -1 on failure. If it fails it will store a description of the problem in allegro_error. Hopefully that will be enough to work with, but I understand where you're coming from. Seems like if either one fails, install_sound fails. --> |
scriptX
Member #6,574
November 2005
|
Is this what you're asking? if (detect_digi_driver(ABC) && detect_digi_driver(ABCD)) { install_sound(ABC, ABCD); } else if (detect_digi_driver(ABC)) { install_sound(ABC, MIDI_NONE); } else if (detect_digi_driver(ABCD)) { install_sound(DIGI_NONE, ABCD); } Might be wrong, I've never done that before.. just thought of it on the spot. |
Synapse Jumps
Member #3,073
December 2002
|
can you pass DIGITAL_AUTODETECT to detect_digi_driver? If you can, I'd say that a call to install_sound with any paramter as the digital (save DIGI_NONE) paramter would fail. Same goes for MIDI. |
Neil Walker
Member #210
April 2000
|
Cheers, never thought of reading the manual to see if there was a MIDI_NONE Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
|