miniaudio 0.1.0 → 0.2.0

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/ext/miniaudio/rb-miniaudio.c +10 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95144b0d497b2bd9a0e6329cfdd673a9c82434c4a63c4204e4d1eb48d49f15a1
4
- data.tar.gz: 06de151cf458963631562b7cdda482eba9aaed3cc7fcc5639d3643ea1029a039
3
+ metadata.gz: 101569a03086e063ac575b31a171302e04aa6a4dbf10d0a7e52c5190a8f2d332
4
+ data.tar.gz: 63507f3d862f48b0962d8a35ddf1dcb63d783250644deb40241e042ab513994c
5
5
  SHA512:
6
- metadata.gz: c18d53f3c6691144152b987c27f5014083b33d6b0ffe53081f8fa8d232f3e962e89d062fe41531c2da8c7cc93568713b5a519865a181727cde6b0a0a21f727ac
7
- data.tar.gz: 878844a6c70824ad544f6f1e7f02df0034750a4b07ffd6ff50b77bf8010412b55fb15bc824b65ef1ce9529d617eacfaafce1b5dc6a1c110bd7111d10a8d5ee71
6
+ metadata.gz: b348d86e3c0d3bd22c624fdc21a673a7e64c225ee653d30aec594dd7cfa819d52398957b8b58dee110b710a48317bdb5efde63fef1778db6cb2b779904f2db0e
7
+ data.tar.gz: 5d45d419e63ef7690db2780ec1c0894d9d6df92913ef3ed17ef3637c405d0c4b395a8216906472a839d5143434e15f1c703675ea2c2dd7232b3abe67fc063623
@@ -18,7 +18,7 @@ static VALUE rb_dr ## FORMAT ## _open_file_and_read_pcm_frames_ ## CODE (VALUE m
18
18
  \
19
19
  unsigned int num_channels; \
20
20
  unsigned int sample_rate; \
21
- uint64_t total_frames; \
21
+ dr ## FORMAT ## _uint64 total_frames; \
22
22
  \
23
23
  FRAME_TYPE * frames = dr ## FORMAT ## _open_file_and_read_pcm_frames_ ## CODE (\
24
24
  StringValuePtr(filename),\
@@ -38,6 +38,7 @@ static VALUE rb_dr ## FORMAT ## _open_file_and_read_pcm_frames_ ## CODE (VALUE m
38
38
  rb_ary_push(ret, ret_str);\
39
39
  rb_ary_push(ret, INT2NUM(sample_rate));\
40
40
  rb_ary_push(ret, INT2NUM(num_channels));\
41
+ rb_ary_push(ret, INT2NUM(total_frames));\
41
42
  return ret;\
42
43
  }
43
44
 
@@ -47,7 +48,7 @@ static VALUE rb_drmp3_open_file_and_read_pcm_frames_ ## CODE (VALUE mod, VALUE f
47
48
  rb_raise(rb_const_get(rb_cObject, rb_intern("ArgumentError")), "Filename must be a string"); \
48
49
  } \
49
50
  \
50
- uint64_t total_frames; \
51
+ drmp3_uint64 total_frames; \
51
52
  \
52
53
  drmp3_config config;\
53
54
  FRAME_TYPE * frames = drmp3_open_file_and_read_pcm_frames_ ## CODE (\
@@ -63,7 +64,7 @@ static VALUE rb_drmp3_open_file_and_read_pcm_frames_ ## CODE (VALUE mod, VALUE f
63
64
  \
64
65
  VALUE ret_str = rb_str_new((char*)frames, sizeof(FRAME_TYPE)*total_frames*config.channels);\
65
66
  drmp3_free(frames, NULL);\
66
- VALUE ary = rb_ary_new_from_args(3, ret_str, INT2NUM(config.sampleRate), INT2NUM(config.channels));\
67
+ VALUE ary = rb_ary_new_from_args(4, ret_str, INT2NUM(config.sampleRate), INT2NUM(config.channels), INT2NUM(total_frames));\
67
68
  return ary;\
68
69
  }
69
70
 
@@ -75,7 +76,7 @@ static VALUE rb_dr ## FORMAT ## _open_memory_and_read_pcm_frames_ ## CODE (VALUE
75
76
  \
76
77
  unsigned int num_channels; \
77
78
  unsigned int sample_rate; \
78
- uint64_t total_frames; \
79
+ dr ## FORMAT ## _uint64 total_frames; \
79
80
  \
80
81
  FRAME_TYPE * frames = dr ## FORMAT ## _open_memory_and_read_pcm_frames_ ## CODE (\
81
82
  StringValuePtr(str),\
@@ -96,6 +97,7 @@ static VALUE rb_dr ## FORMAT ## _open_memory_and_read_pcm_frames_ ## CODE (VALUE
96
97
  rb_ary_push(ret, ret_str);\
97
98
  rb_ary_push(ret, INT2NUM(sample_rate));\
98
99
  rb_ary_push(ret, INT2NUM(num_channels));\
100
+ rb_ary_push(ret, INT2NUM(total_frames));\
99
101
  return ret;\
100
102
  }
101
103
 
@@ -105,7 +107,7 @@ static VALUE rb_drmp3_open_memory_and_read_pcm_frames_ ## CODE (VALUE mod, VALUE
105
107
  rb_raise(rb_const_get(rb_cObject, rb_intern("ArgumentError")), "Memory must be a string"); \
106
108
  } \
107
109
  \
108
- uint64_t total_frames; \
110
+ drmp3_uint64 total_frames; \
109
111
  \
110
112
  drmp3_config config;\
111
113
  FRAME_TYPE * frames = drmp3_open_memory_and_read_pcm_frames_ ## CODE (\
@@ -126,6 +128,7 @@ static VALUE rb_drmp3_open_memory_and_read_pcm_frames_ ## CODE (VALUE mod, VALUE
126
128
  rb_ary_push(ret, ret_str);\
127
129
  rb_ary_push(ret, INT2NUM(config.sampleRate));\
128
130
  rb_ary_push(ret, INT2NUM(config.channels));\
131
+ rb_ary_push(ret, INT2NUM(total_frames));\
129
132
  return ret;\
130
133
  }
131
134
 
@@ -157,6 +160,7 @@ static VALUE rb_stb_vorbis_decode_filename_s16 (VALUE mod, VALUE filename) {
157
160
  rb_ary_push(ret, ret_str);
158
161
  rb_ary_push(ret, INT2NUM(sample_rate));
159
162
  rb_ary_push(ret, INT2NUM(num_channels));
163
+ rb_ary_push(ret, INT2NUM(total_frames));
160
164
  return ret;
161
165
  }
162
166
 
@@ -189,6 +193,7 @@ static VALUE rb_stb_vorbis_decode_memory_s16(VALUE mod, VALUE str) {
189
193
  rb_ary_push(ret, ret_str);
190
194
  rb_ary_push(ret, INT2NUM(sample_rate));
191
195
  rb_ary_push(ret, INT2NUM(num_channels));
196
+ rb_ary_push(ret, INT2NUM(total_frames));
192
197
  return ret;
193
198
  }
194
199
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miniaudio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Razuvaev