Commit d5b25502 authored by David Reid's avatar David Reid

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.
parent a6cd9340
...@@ -115,6 +115,7 @@ int main(int argc, char** argv) ...@@ -115,6 +115,7 @@ int main(int argc, char** argv)
//ma_sound_set_fade_point_auto_reset(&sound, 1, MA_FALSE); //ma_sound_set_fade_point_auto_reset(&sound, 1, MA_FALSE);
//ma_sound_set_stop_delay(&sound, 1000); //ma_sound_set_stop_delay(&sound, 1000);
//ma_sound_set_volume(&sound, 1); //ma_sound_set_volume(&sound, 1);
//ma_sound_set_start_delay(&sound, 48000);
ma_sound_start(&sound); ma_sound_start(&sound);
//ma_sleep(1000); //ma_sleep(1000);
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment