feat(audio): so del sarcòfag amb pitch aleatori per obertura
This commit is contained in:
1 parent
3e31a88f78
commit
932d195eb0
11 files changed
+112
-11
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user