Fix the new Miniaudio audio_stream_set_position
This commit is contained in:
parent
9e4599ecb3
commit
82cd4176a3
|
@ -316,9 +316,7 @@ void audio_stream_set_position(struct ModAudio* audio, f32 pos) {
|
||||||
if (!audio_sanity_check(audio, true, "setpos")) {
|
if (!audio_sanity_check(audio, true, "setpos")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
u64 length;
|
ma_sound_seek_to_pcm_frame(&audio->sound, pos * ma_engine_get_sample_rate(&gModAudioEngine));
|
||||||
ma_sound_get_length_in_pcm_frames(&audio->sound, &length);
|
|
||||||
ma_sound_seek_to_pcm_frame(&audio->sound, (u64)(length * pos));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool audio_stream_get_looping(struct ModAudio* audio) {
|
bool audio_stream_get_looping(struct ModAudio* audio) {
|
||||||
|
|
Loading…
Reference in New Issue