mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2025-01-30 23:00:16 -05:00
Fix pokitto sound
This commit is contained in:
parent
d06ce1c684
commit
c86d30170a
18
main_sdl.c
18
main_sdl.c
@ -244,9 +244,7 @@ void SFG_enableMusic(uint8_t enable)
|
||||
void SFG_playSound(uint8_t soundIndex, uint8_t volume)
|
||||
{
|
||||
uint16_t pos = audioPos;
|
||||
|
||||
uint8_t volumeShift = 15 - volume / 16;
|
||||
|
||||
uint16_t baseLevel = AUDIO_ZERO - (0x8000 >> volumeShift);
|
||||
|
||||
for (int i = 0; i < SFG_SFX_SAMPLE_COUNT; ++i)
|
||||
@ -256,22 +254,6 @@ void SFG_playSound(uint8_t soundIndex, uint8_t volume)
|
||||
|
||||
pos = (pos < SFG_SFX_SAMPLE_COUNT - 1) ? (pos + 1) : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
int8_t volumeShift = volume / 16 - 7; // -7 to 8
|
||||
|
||||
uint16_t baseLevel = AUDIO_ZERO - (0x0001 << (volumeShift + 7));
|
||||
|
||||
for (int i = 0; i < SFG_SFX_SAMPLE_COUNT; ++i)
|
||||
{
|
||||
audioBuff[pos] = mixSamples(audioBuff[pos],baseLevel +
|
||||
((volumeShift >= 0) ?
|
||||
(SFG_GET_SFX_SAMPLE(soundIndex,i) << volumeShift) :
|
||||
(SFG_GET_SFX_SAMPLE(soundIndex,i) >> (-1 * volumeShift))));
|
||||
|
||||
pos = (pos < SFG_SFX_SAMPLE_COUNT - 1) ? (pos + 1) : 0;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
Loading…
Reference in New Issue
Block a user