Skip to content

[DXRuby 1.4.7] 64bitでは、Sound.newでエラー #4

Description

@noanoa07

64bit版では、Sound.new でエラーになります。

サンプルコード↓

require 'dxruby'

sound = Sound.new("sound.wav")  # sound.wav読み込み
#bgm = Sound.new("bgm.mid")  # bgm.mid読み込み

#bgm.play

Window.loop do
  if Input.key_push?(K_Z) then  # Zキーで再生
    sound.play
  end
end

>ruby sound.rb
sound.rb:3:in initialize': DirectMusic initialize error - CoCreateInstance (DXRuby::DXRubyError) from sound.rb:3:in new'
from sound.rb:3:in `

'

動作環境

  • Windows 10(64bit)
  • ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x64-mingw32]
  • Windows Installer for Windows で + Devkit版
  • d3dx9_40.dll(64bit)を C:\Windows\System32フォルダに配置

比較環境(こちらはエラーなく動作)

  • ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [i386-mingw32]
  • d3dx9_40.dll(32bit)を C:\Windows\SysWOW64フォルダに配置

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions