-
-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sound stuck after using ma_sound_stop_with_fade_in_milliseconds()
#714
Comments
This is a good question, and something I should look at now that you've pointed this out. First of all, you'll need to fade your sound back in. You've faded it out, but not faded it back in. That, however, is not the bigger problem. When using
That, plus fading back in, I think should get you going. I should probably add a |
So i tried Example: ma_sound_stop_with_fade_in_milliseconds(sound, 0);
ma_sound_set_stop_time_in_pcm_frames(sound, ~(ma_uint64)0);
// ma_sound_set_fade_in_milliseconds(sound, 0, 1, 0); // This is not really needed
ma_sound_seek_to_pcm_frame(sound, 0);
ma_sound_start(sound); // Restart OK The problem that I have with this solution is that there is no way of knowing with just a |
Yes, If you used |
I've just got a hit with this issue. |
I think that in my case I will reset the stop time using |
If it helps, I am using the inline static void sound_reset(ma_sound *sound, f32 volume)
{
ma_sound_set_volume(sound, volume);
ma_sound_set_stop_time_in_milliseconds(sound, ~(ma_uint64)0);
ma_sound_set_fade_in_milliseconds(sound, 0.0f, 1.0f, FADE_IN_MS);
ma_sound_seek_to_pcm_frame(sound, 0);
ma_sound_start(sound);
}
inline static void sound_stop_with_fade(ma_sound *sound)
{
ma_sound_stop_with_fade_in_milliseconds(sound, FADE_IN_MS);
} |
Hi, when using
ma_sound_stop_with_fade_in_milliseconds()
I cannot restart/reuse the sound afterwards.Also after
ma_sound_stop_with_fade_in_milliseconds()
ma_sound_is_playing(sound)
andma_sound_at_end(sound)
always return false.Is this normal behavior? Do I need to restart in another way when using
ma_sound_stop_with_fade_in_milliseconds()
?Here is an example:
Thanks
The text was updated successfully, but these errors were encountered: