Codechange: convert printf DEBUG statements to fmt Debug statements
This commit is contained in:
@@ -53,20 +53,20 @@ extern int _allegro_instance_count;
|
||||
const char *SoundDriver_Allegro::Start(const StringList &parm)
|
||||
{
|
||||
if (_allegro_instance_count == 0 && install_allegro(SYSTEM_AUTODETECT, &errno, nullptr)) {
|
||||
DEBUG(driver, 0, "allegro: install_allegro failed '%s'", allegro_error);
|
||||
Debug(driver, 0, "allegro: install_allegro failed '{}'", allegro_error);
|
||||
return "Failed to set up Allegro";
|
||||
}
|
||||
_allegro_instance_count++;
|
||||
|
||||
/* Initialise the sound */
|
||||
if (install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, nullptr) != 0) {
|
||||
DEBUG(driver, 0, "allegro: install_sound failed '%s'", allegro_error);
|
||||
Debug(driver, 0, "allegro: install_sound failed '{}'", allegro_error);
|
||||
return "Failed to set up Allegro sound";
|
||||
}
|
||||
|
||||
/* Okay, there's no soundcard */
|
||||
if (digi_card == DIGI_NONE) {
|
||||
DEBUG(driver, 0, "allegro: no sound card found");
|
||||
Debug(driver, 0, "allegro: no sound card found");
|
||||
return "No sound card found";
|
||||
}
|
||||
|
||||
|
@@ -118,7 +118,7 @@ void SoundDriver_Cocoa::Stop()
|
||||
|
||||
/* stop processing the audio unit */
|
||||
if (AudioOutputUnitStop(_outputAudioUnit) != noErr) {
|
||||
DEBUG(driver, 0, "cocoa_s: Core_CloseAudio: AudioOutputUnitStop failed");
|
||||
Debug(driver, 0, "cocoa_s: Core_CloseAudio: AudioOutputUnitStop failed");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -126,12 +126,12 @@ void SoundDriver_Cocoa::Stop()
|
||||
callback.inputProc = 0;
|
||||
callback.inputProcRefCon = 0;
|
||||
if (AudioUnitSetProperty(_outputAudioUnit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, 0, &callback, sizeof(callback)) != noErr) {
|
||||
DEBUG(driver, 0, "cocoa_s: Core_CloseAudio: AudioUnitSetProperty (kAudioUnitProperty_SetRenderCallback) failed");
|
||||
Debug(driver, 0, "cocoa_s: Core_CloseAudio: AudioUnitSetProperty (kAudioUnitProperty_SetRenderCallback) failed");
|
||||
return;
|
||||
}
|
||||
|
||||
if (AudioComponentInstanceDispose(_outputAudioUnit) != noErr) {
|
||||
DEBUG(driver, 0, "cocoa_s: Core_CloseAudio: AudioComponentInstanceDispose failed");
|
||||
Debug(driver, 0, "cocoa_s: Core_CloseAudio: AudioComponentInstanceDispose failed");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -130,7 +130,7 @@ const char *SoundDriver_XAudio2::Start(const StringList &parm)
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
DEBUG(driver, 0, "xaudio2_s: CoInitializeEx failed (%08x)", (uint)hr);
|
||||
Debug(driver, 0, "xaudio2_s: CoInitializeEx failed ({:08x})", (uint)hr);
|
||||
return "Failed to initialise COM";
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ const char *SoundDriver_XAudio2::Start(const StringList &parm)
|
||||
{
|
||||
CoUninitialize();
|
||||
|
||||
DEBUG(driver, 0, "xaudio2_s: Unable to load " XAUDIO2_DLL_A);
|
||||
Debug(driver, 0, "xaudio2_s: Unable to load " XAUDIO2_DLL_A);
|
||||
return "Failed to load XAudio2 DLL";
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ const char *SoundDriver_XAudio2::Start(const StringList &parm)
|
||||
FreeLibrary(_xaudio_dll_handle);
|
||||
CoUninitialize();
|
||||
|
||||
DEBUG(driver, 0, "xaudio2_s: Unable to find XAudio2Create function in DLL");
|
||||
Debug(driver, 0, "xaudio2_s: Unable to find XAudio2Create function in DLL");
|
||||
return "Failed to load XAudio2 DLL";
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ const char *SoundDriver_XAudio2::Start(const StringList &parm)
|
||||
FreeLibrary(_xaudio_dll_handle);
|
||||
CoUninitialize();
|
||||
|
||||
DEBUG(driver, 0, "xaudio2_s: XAudio2Create failed (%08x)", (uint)hr);
|
||||
Debug(driver, 0, "xaudio2_s: XAudio2Create failed ({:08x})", (uint)hr);
|
||||
return "Failed to inititialise the XAudio2 engine";
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ const char *SoundDriver_XAudio2::Start(const StringList &parm)
|
||||
FreeLibrary(_xaudio_dll_handle);
|
||||
CoUninitialize();
|
||||
|
||||
DEBUG(driver, 0, "xaudio2_s: CreateMasteringVoice failed (%08x)", (uint)hr);
|
||||
Debug(driver, 0, "xaudio2_s: CreateMasteringVoice failed ({:08x})", (uint)hr);
|
||||
return "Failed to create a mastering voice";
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ const char *SoundDriver_XAudio2::Start(const StringList &parm)
|
||||
FreeLibrary(_xaudio_dll_handle);
|
||||
CoUninitialize();
|
||||
|
||||
DEBUG(driver, 0, "xaudio2_s: CreateSourceVoice failed (%08x)", (uint)hr);
|
||||
Debug(driver, 0, "xaudio2_s: CreateSourceVoice failed ({:08x})", (uint)hr);
|
||||
return "Failed to create a source voice";
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ const char *SoundDriver_XAudio2::Start(const StringList &parm)
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
DEBUG(driver, 0, "xaudio2_s: _source_voice->Start failed (%08x)", (uint)hr);
|
||||
Debug(driver, 0, "xaudio2_s: _source_voice->Start failed ({:08x})", (uint)hr);
|
||||
|
||||
Stop();
|
||||
return "Failed to start the source voice";
|
||||
@@ -238,7 +238,7 @@ const char *SoundDriver_XAudio2::Start(const StringList &parm)
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
DEBUG(driver, 0, "xaudio2_s: _voice_context->SubmitBuffer failed (%08x)", (uint)hr);
|
||||
Debug(driver, 0, "xaudio2_s: _voice_context->SubmitBuffer failed ({:08x})", (uint)hr);
|
||||
|
||||
Stop();
|
||||
return "Failed to submit the first audio buffer";
|
||||
|
Reference in New Issue
Block a user