feat(audio): so del sarcòfag amb pitch aleatori per obertura

This commit is contained in:
JailDesigner committed 2026-05-11 20:46:18 +02:00
1 parent 3e31a88f78
commit 932d195eb0
11 files changed
+112 -11

No files matched your search

+6
View File
@@ -430,6 +430,12 @@ namespace Ja {
return channel;
}
void Engine::setChannelSpeed(const int channel, const float ratio) {
if (channel < 0 || channel >= MAX_SIMULTANEOUS_CHANNELS) { return; }
if (channels_[channel].stream == nullptr) { return; }
SDL_SetAudioStreamFrequencyRatio(channels_[channel].stream, ratio);
}
void Engine::pauseChannel(const int channel) {
forEachTargetChannel(channel, [](Channel& ch) {
if (ch.state == ChannelState::PLAYING) {