native_audio 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/audio/audio.c +4 -11
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8ba1115278418cb8e450777a6f99843bfb5a1510979e2d44979786aef4e0f86d
|
|
4
|
+
data.tar.gz: 903c73d6e09842504d851406db41a18dc7a6f7a3b579092f32a43481438bc205
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e05701f74ee36749bf0fa7c51dc61dd84f79a95c736d59fb7d067507f31b7b4ad4f741b28e1370698a434292110701bb51dcf0fdfcb3076a91e1874a5947c88a
|
|
7
|
+
data.tar.gz: 13226093d8f6923944f1a83ea3651075d1a388c1fb0e5897b15dbd8772dd84de6ab26e6897f39646495ae3b16eeb2a56ac9eb91732b3270e017d974bd2e4daa2
|
data/ext/audio/audio.c
CHANGED
|
@@ -331,22 +331,15 @@ VALUE audio_stop(VALUE self, VALUE channel_id)
|
|
|
331
331
|
return Qnil;
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
+
ma_uint64 now = ma_engine_get_time_in_pcm_frames(&engine);
|
|
335
|
+
ma_uint32 sample_rate = ma_engine_get_sample_rate(&engine);
|
|
336
|
+
|
|
334
337
|
ma_sound_stop(channels[channel]);
|
|
335
338
|
ma_sound_uninit(channels[channel]);
|
|
336
339
|
free(channels[channel]);
|
|
337
340
|
channels[channel] = NULL;
|
|
338
341
|
|
|
339
|
-
|
|
340
|
-
multi_tap_delay_uninit(delay_nodes[channel]);
|
|
341
|
-
free(delay_nodes[channel]);
|
|
342
|
-
delay_nodes[channel] = NULL;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
if (reverb_nodes[channel] != NULL) {
|
|
346
|
-
reverb_uninit(reverb_nodes[channel]);
|
|
347
|
-
free(reverb_nodes[channel]);
|
|
348
|
-
reverb_nodes[channel] = NULL;
|
|
349
|
-
}
|
|
342
|
+
drain_until_frame[channel] = now + (ma_uint64)(REVERB_DRAIN_SECONDS * sample_rate);
|
|
350
343
|
|
|
351
344
|
return Qnil;
|
|
352
345
|
}
|