bass_audioplayer 0.0.1 → 0.0.2
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/bass_audioplayer/bass_handle.c +6 -0
- data/lib/bass_audioplayer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adc5a52a6e95307da6bd8832f56c0abe0fae28ff
|
4
|
+
data.tar.gz: b793af4b5a47d7ffd820707669af1e3e8be074fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0fb2f58d113a874e6fc7fdb7c21472d7a77a83eb39933a4de479e14d17f757ae57a7a25c73cc3ae7bc9ad5c2bdedb989d3dcb8a5725c04edf24899afcb86f11
|
7
|
+
data.tar.gz: 04c87f14bf8f7fc91af9bfdd220afbeb87bdd564ca57288b963f7b3d589a9f798442f2c0dcc1acc7e8bb3aa3dce129a0cfeced3e0e9c665d490778dff6554d70
|
@@ -28,6 +28,7 @@ void bass_handle_cleanup(bass_handle* handle)
|
|
28
28
|
|
29
29
|
void bass_handle_stream_create_from_file(bass_handle* handle, const char* file)
|
30
30
|
{
|
31
|
+
bass_handle_stream_stop(handle);
|
31
32
|
handle->stream = BASS_StreamCreateFile(FALSE, file, 0, 0, 0);
|
32
33
|
if (handle->stream == 0) {
|
33
34
|
raise_error();
|
@@ -36,6 +37,7 @@ void bass_handle_stream_create_from_file(bass_handle* handle, const char* file)
|
|
36
37
|
|
37
38
|
void bass_handle_stream_create_from_url(bass_handle* handle, const char* url)
|
38
39
|
{
|
40
|
+
bass_handle_stream_stop(handle);
|
39
41
|
handle->stream = BASS_StreamCreateURL(url, 0, 0, NULL, 0);
|
40
42
|
if (handle->stream == 0) {
|
41
43
|
raise_error();
|
@@ -59,6 +61,10 @@ void bass_handle_stream_play(bass_handle* handle)
|
|
59
61
|
|
60
62
|
void bass_handle_stream_stop(bass_handle* handle)
|
61
63
|
{
|
64
|
+
if (handle->stream == 0) {
|
65
|
+
return;
|
66
|
+
}
|
67
|
+
|
62
68
|
if (BASS_ChannelStop(handle->stream) == FALSE) {
|
63
69
|
raise_error();
|
64
70
|
}
|