AUDIO: (FM-TOWNS) - add error codes
This commit is contained in:
parent
a39377724f
commit
cc25424dae
2 changed files with 17 additions and 3 deletions
|
@ -1940,14 +1940,14 @@ bool TownsAudioInterface::init() {
|
||||||
return _intf->init();
|
return _intf->init();
|
||||||
}
|
}
|
||||||
|
|
||||||
int TownsAudioInterface::callback(int command, ...) {
|
TownsAudioInterface::ErrorCode TownsAudioInterface::callback(int command, ...) {
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, command);
|
va_start(args, command);
|
||||||
|
|
||||||
int res = _intf->processCommand(command, args);
|
int res = _intf->processCommand(command, args);
|
||||||
|
|
||||||
va_end(args);
|
va_end(args);
|
||||||
return res;
|
return (TownsAudioInterface::ErrorCode)res;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TownsAudioInterface::setMusicVolume(int volume) {
|
void TownsAudioInterface::setMusicVolume(int volume) {
|
||||||
|
|
|
@ -40,9 +40,23 @@ public:
|
||||||
TownsAudioInterface(Audio::Mixer *mixer, TownsAudioInterfacePluginDriver *driver, bool externalMutexHandling = false);
|
TownsAudioInterface(Audio::Mixer *mixer, TownsAudioInterfacePluginDriver *driver, bool externalMutexHandling = false);
|
||||||
~TownsAudioInterface();
|
~TownsAudioInterface();
|
||||||
|
|
||||||
|
enum ErrorCode {
|
||||||
|
kSuccess = 0,
|
||||||
|
kInvalidChannel,
|
||||||
|
kUnavailable,
|
||||||
|
kArgumentOutOfRange,
|
||||||
|
kNotImplemented,
|
||||||
|
kOutOfWaveMemory,
|
||||||
|
kInvalidWaveTable,
|
||||||
|
kChannelNotReserved,
|
||||||
|
kNoteOutOfRangeForInstrument,
|
||||||
|
kNoMatchingWaveTable,
|
||||||
|
kDuplicateWaveTable
|
||||||
|
};
|
||||||
|
|
||||||
bool init();
|
bool init();
|
||||||
|
|
||||||
int callback(int command, ...);
|
ErrorCode callback(int command, ...);
|
||||||
|
|
||||||
void setMusicVolume(int volume);
|
void setMusicVolume(int volume);
|
||||||
void setSoundEffectVolume(int volume);
|
void setSoundEffectVolume(int volume);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue