diff options
author | athrxx | 2015-11-02 21:16:07 +0100 |
---|---|---|
committer | athrxx | 2018-11-14 17:22:19 +0100 |
commit | cc25424dae4b0accad45cc40280f99cca384a15d (patch) | |
tree | 96538c7b8f03503ae516b6edd160b48209d95875 | |
parent | a39377724f8ba6466818b0d4e16f58d289284350 (diff) | |
download | scummvm-rg350-cc25424dae4b0accad45cc40280f99cca384a15d.tar.gz scummvm-rg350-cc25424dae4b0accad45cc40280f99cca384a15d.tar.bz2 scummvm-rg350-cc25424dae4b0accad45cc40280f99cca384a15d.zip |
AUDIO: (FM-TOWNS) - add error codes
-rw-r--r-- | audio/softsynth/fmtowns_pc98/towns_audio.cpp | 4 | ||||
-rw-r--r-- | audio/softsynth/fmtowns_pc98/towns_audio.h | 16 |
2 files changed, 17 insertions, 3 deletions
diff --git a/audio/softsynth/fmtowns_pc98/towns_audio.cpp b/audio/softsynth/fmtowns_pc98/towns_audio.cpp index 42824d8423..2506e02c2b 100644 --- a/audio/softsynth/fmtowns_pc98/towns_audio.cpp +++ b/audio/softsynth/fmtowns_pc98/towns_audio.cpp @@ -1940,14 +1940,14 @@ bool TownsAudioInterface::init() { return _intf->init(); } -int TownsAudioInterface::callback(int command, ...) { +TownsAudioInterface::ErrorCode TownsAudioInterface::callback(int command, ...) { va_list args; va_start(args, command); int res = _intf->processCommand(command, args); va_end(args); - return res; + return (TownsAudioInterface::ErrorCode)res; } void TownsAudioInterface::setMusicVolume(int volume) { diff --git a/audio/softsynth/fmtowns_pc98/towns_audio.h b/audio/softsynth/fmtowns_pc98/towns_audio.h index 0003f02777..ba13bd10f6 100644 --- a/audio/softsynth/fmtowns_pc98/towns_audio.h +++ b/audio/softsynth/fmtowns_pc98/towns_audio.h @@ -40,9 +40,23 @@ public: TownsAudioInterface(Audio::Mixer *mixer, TownsAudioInterfacePluginDriver *driver, bool externalMutexHandling = false); ~TownsAudioInterface(); + enum ErrorCode { + kSuccess = 0, + kInvalidChannel, + kUnavailable, + kArgumentOutOfRange, + kNotImplemented, + kOutOfWaveMemory, + kInvalidWaveTable, + kChannelNotReserved, + kNoteOutOfRangeForInstrument, + kNoMatchingWaveTable, + kDuplicateWaveTable + }; + bool init(); - int callback(int command, ...); + ErrorCode callback(int command, ...); void setMusicVolume(int volume); void setSoundEffectVolume(int volume); |