#include <assert.h>
#include "vl.h"
-#define USE_SDL_AUDIO
#define USE_WAV_AUDIO
#include "audio/audio_int.h"
return 0;
}
-
void pcm_hw_fini (HWVoice *hw)
{
if (hw->active) {
{
if (hw) {
return (((uint8_t *) hw - (uint8_t *) hw_voices)
- / audio_state.voice_size) + 1;
+ / audio_state.drv->voice_size) + 1;
}
else {
return 0;
}
}
-#define ADVANCE(hw) hw ? advance (hw, audio_state.voice_size) : hw_voices
+#define ADVANCE(hw) \
+ ((hw) ? advance (hw, audio_state.drv->voice_size) : hw_voices)
HWVoice *pcm_hw_find_any (HWVoice *hw)
{
#ifdef CONFIG_OSS
&oss_output_driver,
#endif
-#ifdef USE_FMOD_AUDIO
+#ifdef CONFIG_FMOD
&fmod_output_driver,
#endif
#ifdef CONFIG_SDL
&sdl_output_driver,
#endif
+ &no_output_driver,
#ifdef USE_WAV_AUDIO
&wav_output_driver,
#endif
register_savevm ("audio", 0, 1, audio_save, audio_load, NULL);
if (!done) {
dolog ("Can not initialize audio subsystem\n");
- return;
+ voice_init (&no_output_driver);
}
}