mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
CHEWY: Implement getStereoPos()
This commit is contained in:
parent
dded4e6d71
commit
f96b146a20
@ -1317,18 +1317,8 @@ int16 Atdsys::calc_inv_no_use(int16 curInv, int16 testNr, int16 mode) {
|
||||
return (_itemUseWithDesc.contains(key)) ? _itemUseWithDesc[key] : -1;
|
||||
}
|
||||
|
||||
int16 Atdsys::getStereoPos(int16 x) {
|
||||
// TODO: Convert to ScummVM's balance (-127 ... 0 ... 127)
|
||||
return 0;
|
||||
#if 0
|
||||
float fx_ = (float)x;
|
||||
|
||||
fx_ /= 2.5;
|
||||
if ((fx_ - ((float)((int16)fx_))) > 0.5)
|
||||
fx_ += 1.0;
|
||||
|
||||
return (int16)fx_;
|
||||
#endif
|
||||
int8 Atdsys::getStereoPos(int16 x) {
|
||||
return floor(x / 2.5) * 2 - 127;
|
||||
}
|
||||
|
||||
void Atdsys::saveAtdsStream(Common::WriteStream *stream) {
|
||||
|
@ -300,7 +300,7 @@ public:
|
||||
void ads_search_item(int16 itemNr, char **blkAdr);
|
||||
int16 start_ads_auto_dia(char *itemAdr);
|
||||
int16 calc_inv_no_use(int16 curInv, int16 testNr, int16 mode);
|
||||
int16 getStereoPos(int16 x);
|
||||
int8 getStereoPos(int16 x);
|
||||
void enableEvents(bool nr) {
|
||||
_atdsv._eventsEnabled = nr;
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ void Sound::setSoundChannelVolume(uint channel, uint volume) {
|
||||
_mixer->setChannelVolume(_soundHandle[channel], volume);
|
||||
}
|
||||
|
||||
void Sound::setSoundChannelBalance(uint channel, uint balance) {
|
||||
void Sound::setSoundChannelBalance(uint channel, int8 balance) {
|
||||
assert(channel < MAX_SOUND_EFFECTS);
|
||||
_mixer->setChannelBalance(_soundHandle[channel], balance);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
bool isSoundActive(uint channel);
|
||||
void setSoundVolume(uint volume);
|
||||
void setSoundChannelVolume(uint channel, uint volume);
|
||||
void setSoundChannelBalance(uint channel, uint balance);
|
||||
void setSoundChannelBalance(uint channel, int8 balance);
|
||||
|
||||
void playMusic(int num, bool loop = false);
|
||||
void playMusic(uint8 *data, uint32 size, bool loop = false, DisposeAfterUse::Flag dispose = DisposeAfterUse::YES);
|
||||
|
Loading…
Reference in New Issue
Block a user