mirror of
https://github.com/wiiu-env/AutobootModule.git
synced 2024-11-01 01:25:05 +01:00
Improve logging
This commit is contained in:
parent
3505afad72
commit
c02f4d7262
@ -32,7 +32,7 @@ SplashSoundPlayer::SplashSoundPlayer(std::string_view meta_dir) {
|
|||||||
|
|
||||||
void SplashSoundPlayer::Play() {
|
void SplashSoundPlayer::Play() {
|
||||||
if (mBuffer.empty() || mBuffer.size() < 8) {
|
if (mBuffer.empty() || mBuffer.size() < 8) {
|
||||||
DEBUG_FUNCTION_LINE_WARN("mBuffed is empty or too small");
|
DEBUG_FUNCTION_LINE_WARN("mBuffer is empty or too small");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
AXTransitionAudioBuffer transitionAudioBuffer = {};
|
AXTransitionAudioBuffer transitionAudioBuffer = {};
|
||||||
@ -44,10 +44,10 @@ void SplashSoundPlayer::Play() {
|
|||||||
AXGetDeviceMode(1, &drcMode);
|
AXGetDeviceMode(1, &drcMode);
|
||||||
AXQuit();
|
AXQuit();
|
||||||
|
|
||||||
WHBLogPrintf("TV mode before transition = %d\n", tvMode);
|
WHBLogPrintf("TV mode before transition = %d", tvMode);
|
||||||
transitionAudioBuffer.tv.mode = tvMode;
|
transitionAudioBuffer.tv.mode = tvMode;
|
||||||
|
|
||||||
WHBLogPrintf("DRC mode before transition = %d\n", drcMode);
|
WHBLogPrintf("DRC mode before transition = %d", drcMode);
|
||||||
transitionAudioBuffer.drc.mode = drcMode;
|
transitionAudioBuffer.drc.mode = drcMode;
|
||||||
|
|
||||||
transitionAudioBuffer.unk1 = 1;
|
transitionAudioBuffer.unk1 = 1;
|
||||||
@ -78,13 +78,13 @@ void SplashSoundPlayer::Play() {
|
|||||||
uint32_t audioBufferLen = 0;
|
uint32_t audioBufferLen = 0;
|
||||||
auto res = __OSGetTransitionAudioBuffer(&audioBuffer, &audioBufferLen);
|
auto res = __OSGetTransitionAudioBuffer(&audioBuffer, &audioBufferLen);
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
DEBUG_FUNCTION_LINE_ERR("Could not get access to audio buffer from foreground bucket\n");
|
DEBUG_FUNCTION_LINE_ERR("Could not get access to audio buffer from foreground bucket");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::span<uint8_t> audioBufferIn(mBuffer.data() + 8, mBuffer.size() - 8);
|
std::span<uint8_t> audioBufferIn(mBuffer.data() + 8, mBuffer.size() - 8);
|
||||||
|
|
||||||
DEBUG_FUNCTION_LINE("Got audio buffer from foreground bucket @ %8.8x len = %d\n", audioBuffer, audioBufferLen);
|
DEBUG_FUNCTION_LINE("Got audio buffer from foreground bucket @ %8.8x len = %d", audioBuffer, audioBufferLen);
|
||||||
if (audioBufferLen < mBuffer.size()) {
|
if (audioBufferLen < mBuffer.size()) {
|
||||||
DEBUG_FUNCTION_LINE_ERR("buffer not big enough");
|
DEBUG_FUNCTION_LINE_ERR("buffer not big enough");
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user