Migrate start and stop delays to the node graph system.

This changes ma_sound_set_start/stop_delay() to take an absolute time
in frames based on the global clock. Previously these took a relative
time in milliseconds. To use a relative time, add it to the value
returned by ma_engine_get_time(). To use milliseconds, use a standard
sample rate to milliseconds conversion.
This commit is contained in:
David Reid
2021-01-12 12:40:22 +10:00
parent a6cd93401d
commit d5b25502c1
2 changed files with 133 additions and 159 deletions
+1
View File
@@ -115,6 +115,7 @@ int main(int argc, char** argv)
//ma_sound_set_fade_point_auto_reset(&sound, 1, MA_FALSE);
//ma_sound_set_stop_delay(&sound, 1000);
//ma_sound_set_volume(&sound, 1);
//ma_sound_set_start_delay(&sound, 48000);
ma_sound_start(&sound);
//ma_sleep(1000);