aboutsummaryrefslogtreecommitdiff
path: root/audio/softsynth/fmtowns_pc98
diff options
context:
space:
mode:
Diffstat (limited to 'audio/softsynth/fmtowns_pc98')
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_audio.cpp4
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_audio.h16
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);