mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-06-18 21:43:37 -04:00
46 lines
1.3 KiB
C++
46 lines
1.3 KiB
C++
#include "AudioCommon.hpp"
|
|
|
|
namespace audio
|
|
{
|
|
audio::RetCode GetDeviceError(bsp::AudioDevice::RetCode retCode)
|
|
{
|
|
if (retCode == bsp::AudioDevice::RetCode::Success) {
|
|
return RetCode::Success;
|
|
}
|
|
|
|
return RetCode::DeviceFailure;
|
|
}
|
|
|
|
const char *c_str(RetCode retcode)
|
|
{
|
|
switch (retcode) {
|
|
case RetCode::Success:
|
|
return "Success";
|
|
case RetCode::InvokedInIncorrectState:
|
|
return "InvokedInIncorrectState";
|
|
case RetCode::UnsupportedProfile:
|
|
return "UnsupportedProfile";
|
|
case RetCode::UnsupportedEvent:
|
|
return "UnsupportedEvent";
|
|
case RetCode::InvalidFormat:
|
|
return "InvalidFormat";
|
|
case RetCode::OperationCreateFailed:
|
|
return "OperationCreateFailed";
|
|
case RetCode::FileDoesntExist:
|
|
return "FileDoesntExist";
|
|
case RetCode::FailedToAllocateMemory:
|
|
return "FailedToAllocateMemory";
|
|
case RetCode::OperationNotSet:
|
|
return "OperationNotSet";
|
|
case RetCode::ProfileNotSet:
|
|
return "ProfileNotSet";
|
|
case RetCode::DeviceFailure:
|
|
return "DeviceFailure";
|
|
case RetCode::Failed:
|
|
return "Failed";
|
|
}
|
|
return "";
|
|
}
|
|
|
|
} // namespace audio
|