mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-22 16:18:50 -05:00
implement audio backend fallbacks (#1857)
* audio & rendering backend option greyed out if theres only one
* add audio fallback code
* InitializeAudioPlayer/WindowManager add param
* string -> string_view
* Revert "audio & rendering backend option greyed out if theres only one"
This reverts commit e94a7fff50
.
* revert lus changes
* moved fallback function to LUS
* use audioplayerbridge
This commit is contained in:
parent
643a98244b
commit
52a976489b
@ -1242,29 +1242,19 @@ extern "C" int16_t OTRGetRectDimensionFromRightEdge(float v) {
|
||||
}
|
||||
|
||||
extern "C" bool AudioPlayer_Init(void) {
|
||||
if (OTRGlobals::Instance->context->GetAudioPlayer() != nullptr) {
|
||||
return OTRGlobals::Instance->context->GetAudioPlayer()->Init();
|
||||
}
|
||||
|
||||
return false;
|
||||
return AudioPlayerInit();
|
||||
}
|
||||
|
||||
extern "C" int AudioPlayer_Buffered(void) {
|
||||
if (OTRGlobals::Instance->context->GetAudioPlayer() != nullptr) {
|
||||
return OTRGlobals::Instance->context->GetAudioPlayer()->Buffered();
|
||||
}
|
||||
return AudioPlayerBuffered();
|
||||
}
|
||||
|
||||
extern "C" int AudioPlayer_GetDesiredBuffered(void) {
|
||||
if (OTRGlobals::Instance->context->GetAudioPlayer() != nullptr) {
|
||||
return OTRGlobals::Instance->context->GetAudioPlayer()->GetDesiredBuffered();
|
||||
}
|
||||
return AudioPlayerGetDesiredBuffered();
|
||||
}
|
||||
|
||||
extern "C" void AudioPlayer_Play(const uint8_t* buf, uint32_t len) {
|
||||
if (OTRGlobals::Instance->context->GetAudioPlayer() != nullptr) {
|
||||
OTRGlobals::Instance->context->GetAudioPlayer()->Play(buf, len);
|
||||
}
|
||||
AudioPlayerPlayFrame(buf, len);
|
||||
}
|
||||
|
||||
extern "C" int Controller_ShouldRumble(size_t slot) {
|
||||
|
Loading…
Reference in New Issue
Block a user