Android fixing logs
This commit is contained in:
1 parent
adf9871861
commit
9f812f0318
2 files changed
+10
-8
No files matched your search
@@ -90,21 +90,16 @@ void AudioPlayerAsync::playSoundAsync(const std::string& filePath, int loops, in
|
||||
sound = it->second;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!sound) {
|
||||
#ifdef __ANDROID__
|
||||
|
||||
__android_log_print(ANDROID_LOG_ERROR, "Game",
|
||||
"AudioPlayerAsync::playSoundAsync step x2");
|
||||
std::vector<char> buffer = FRG::readFile(filePath);
|
||||
if (buffer.empty()) {
|
||||
__android_log_print(ANDROID_LOG_ERROR, "Game",
|
||||
"AudioPlayerAsync::playSoundAsync step x3");
|
||||
|
||||
FRG::logger() << "Failed to read sound file into buffer: " << filePath << std::endl;
|
||||
return;
|
||||
}
|
||||
__android_log_print(ANDROID_LOG_ERROR, "Game",
|
||||
"AudioPlayerAsync::playSoundAsync step x4");
|
||||
SDL_RWops* rw = SDL_RWFromMem(buffer.data(), buffer.size());
|
||||
if (!rw) {
|
||||
FRG::logger() << "Failed to create RWops from buffer for " << filePath << ": " << SDL_GetError() << std::endl;
|
||||
|
||||
Reference in new issue
Block a user