-
What is the expected behavior of set_stop_time_in_pcm_frames()? Context Code Example (to illustrate context) void play(){
ma_engine_set_time(&g_engine, 0);
ma_sound_seek_to_pcm_frame(mySound, 0);
ma_sound_seek_to_pcm_frame(mySound, ma_engine_get_sample_rate(&g_engine) * 2);
ma_sound_set_stop_time_in_pcm_frames(mySound, ma_engine_get_sample_rate(&g_engine) * 2);
ma_sound_start(mySound);
} Expected Behavior (my assumptions) No sound should be heard because I sought (seeked?) to the same position that I am stopping. Actual Behavior I am hearing sound. Both |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
[Update: confusion resolved] Writing this helped me see my confusion. This little graphic explains that there is still audio to play (3) after the seek_to position and that is what I'm hearing. I would have to move the start time up to hear no audio