dxruby64 1.4.7.2 → 1.4.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '08d94a581f72caf876b0bb2091e2476db409abc3d2533d35f068a6bfad2001aa'
4
- data.tar.gz: fad534cf63dbd0b2745074ff7e60d9e2472956dbdb6469912ccb3d6920d3f7ab
3
+ metadata.gz: 45446ec4da97ecfebba7bc9dc17e318ebeac5d8a7491ccdd96ac2cc9d203b1a1
4
+ data.tar.gz: edd10c3df6ea36966ae5f0b04494f46a4c918d184eefdfbfab50124054d931b9
5
5
  SHA512:
6
- metadata.gz: d6abd1acc491d74b2c07cc1af34b2d56a9110da011f918971de1299383c4e43f3951b19dce44309d00f2fc00fd14e77a8d27528bccf98ae9bd0f30204c1daa47
7
- data.tar.gz: 90a4c29b14d2ed2761f99c620e749cd765dee04ad6e028ad50056ac94ef8a0800d26508276feaa50183722f5f96ec11524ec6bf4a52b2f4e7efe02908b178660
6
+ metadata.gz: 6757915617500e35c666210f7e9e5d1ad2593915b9deec550aaacfc48bcf5a9224b2e2221ec0bfd76e5e64510f16666e1edbf00ce622565a19c3b1cbe465fc11
7
+ data.tar.gz: 7c4ab82abe81d3eaafb9b37dfce7161d4d5f8f2888631e05c32396680d7356a5ddb234a7989fd7c1e6c41d83971aaf47af35faa9513ed37f83274161161c47bd
data/README-ja.md CHANGED
@@ -81,7 +81,7 @@ Windows 10/11 の 64bit 環境ではこの `DirectMusic` は正しく動作せ
81
81
 
82
82
  `DirectSound` の機能上の制約などから、改修に伴って以下のような仕様変更をおこないました。
83
83
 
84
- - Soundクラスで扱うことができるファイル形式は `.wav` および `.mp3`
84
+ - Soundクラスで扱うことができるファイル形式は `.wav` , `.mp3` および `.ogg` (Vorbisコーデックのみ)
85
85
  ([本家DXRuby](https://github.com/mirichi/dxruby) では `.wav` および `.mid`)
86
86
 
87
87
  - 再生時のループ回数の指定はできず、「1回のみ再生」または「無限ループ」のいずれか
@@ -125,6 +125,11 @@ Windows 10/11 の 64bit 環境ではこの `DirectMusic` は正しく動作せ
125
125
  ソースコードや詳細情報は、以下のリポジトリで確認できます。
126
126
  https://github.com/spoolkitamura/dxruby64
127
127
 
128
+ ## クレジット
129
+
130
+ このソフトウェアは Sean T. Barrett 氏による [stb_vorbis](https://github.com/nothings/stb) を使用しています。
131
+ stb_vorbis はパブリックドメインおよび MIT ライセンスのデュアルライセンスです。
132
+
128
133
  <br>
129
134
  <br>
130
135
  <br>
data/README.md CHANGED
@@ -84,7 +84,7 @@ Also, be sure to review the following limitations and changes.
84
84
  ### Limitations and Specification Changes
85
85
  Due to functional constraints of `DirectSound`, the following changes were made as part of the revision:
86
86
 
87
- - The Sound class supports `.wav` and `.mp3` file formats
87
+ - The Sound class supports `.wav` , `.mp3` and `.ogg`(Vorbis codec only) file formats
88
88
  (The [original DXRuby](https://github.com/mirichi/dxruby) supports `.wav` and `.mid`)
89
89
 
90
90
  - Loop count cannot be specified; only "play once" or "infinite loop" are supported
@@ -127,6 +127,11 @@ This gem is not an official successor of DXRuby, and it is not maintained by the
127
127
  For source code and further information, visit the repository:
128
128
  https://github.com/spoolkitamura/dxruby64
129
129
 
130
+ ## Credits
131
+
132
+ This software uses [stb_vorbis](https://github.com/nothings/stb) by Sean T. Barrett.
133
+ stb_vorbis is dual-licensed under public domain and the MIT license.
134
+
130
135
  <br>
131
136
  <br>
132
137
  <br>
data/lib/31/dxruby.so CHANGED
Binary file
data/lib/32/dxruby.so CHANGED
Binary file
data/lib/33/dxruby.so CHANGED
Binary file
data/lib/34/dxruby.so CHANGED
Binary file
@@ -0,0 +1,26 @@
1
+ require 'dxruby'
2
+
3
+ bgm = Sound.new("tam-g22loop.ogg") # tam-g22loop.ogg読み込み(https://www.tam-music.com/)
4
+ bgm.loop = true # BGMは繰り返す(「.loop = true|false」形式での設定)
5
+ bgm.play # BGB再生
6
+ bgm.volume = 200 # BGMの音量(「.volume = 値」形式での設定」)
7
+
8
+ Window.loop do
9
+ Window.draw_font(20, 20, "[SPACE] BGM停止", Font.default)
10
+ Window.draw_font(20, 80, "[↑] BGM音量上げ", Font.default)
11
+ Window.draw_font(20, 110, "[↓] BGM音量下げ", Font.default)
12
+ Window.draw_font(20, 140, "音量 : #{bgm.volume}", Font.default, color: [255, 255, 0])
13
+ Window.draw_font(20, 350, "[ESCAPE] 終了", Font.default)
14
+
15
+ if Input.key_push?(K_SPACE) # SPACEキーでBGM終了
16
+ bgm.stop
17
+ end
18
+ if Input.key_push?(K_UP) # [↑]キーでBGMの音量を上げる
19
+ bgm.volume = bgm.volume + 5 #「.volume = 値」形式
20
+ end
21
+ if Input.key_push?(K_DOWN) # [↓]キーでBGMの音量を下げる
22
+ bgm.volume = bgm.volume - 5 #「.volume = 値」形式
23
+ end
24
+
25
+ break if Input.key_push?(K_ESCAPE)
26
+ end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dxruby64
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.7.2
4
+ version: 1.4.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Koki Kitamura
@@ -122,6 +122,8 @@ files:
122
122
  - sample/wav_sample/dispose.rb
123
123
  - sample/wav_sample/gameover.wav
124
124
  - sample/wav_sample/sound.rb
125
+ - sample/wav_sample/sound_ogg.rb
126
+ - sample/wav_sample/tam-g22loop.ogg
125
127
  homepage: https://github.com/spoolkitamura/dxruby64
126
128
  licenses:
127
129
  - Zlib