Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / No Sound? Help T.T
- - By Azurazen Date 2014-12-07 12:38
Ok, i've tried just about everything I can think of. I can't seem to get any sounds to play?

I'm running Windows 7 64bit, i've re-installed drivers, used the tutorial code, that's in the examples file. and not a sound.

I can play the .wav outside the game... just not through gosu.

Any suggestions?
Parent - - By jlnr (dev) Date 2014-12-07 17:54
That's curious. Do you happen to own any of these games? Do they work?

http://en.wikipedia.org/wiki/OpenAL#Games

I don't understand why OpenAL is so problematic on Windows... :(
Parent - - By Azurazen Date 2014-12-07 18:22
Minecraft, I've played Wurm Online on this pc before as well. No issues?
Parent - - By jlnr (dev) Date 2014-12-07 20:52
Do you know the specs (mostly, the mainboard) of your machine? I am really at a loss how to debug this :) It seems Wurm Online uses OpenAL Soft just as I do. The only difference I can imagine is that they might be using a 64-bit version.
Parent - - By Azurazen Date 2014-12-08 18:41 Edited 2014-12-08 18:54
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
#################################################   Specs   ##############################################
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
OS Name  Microsoft Windows 7 Ultimate
Version  6.1.7601 Service Pack 1 Build 7601
Other OS Description   Not Available
OS Manufacturer  Microsoft Corporation
System Name  MICHAEL-PC
System Manufacturer  MSI
System Model  MS-7522
System Type  x64-based PC
Processor  Intel(R) Core(TM) i7 CPU         950  @ 3.07GHz, 3068 Mhz, 4 Core(s), 8 Logical Processor(s)
BIOS Version/Date  American Megatrends Inc. V25.0, 11/16/2010
SMBIOS Version  2.5
Windows Directory  C:\Windows
System Directory  C:\Windows\system32
Boot Device  \Device\HarddiskVolume1
Locale  United States
Hardware Abstraction Layer  Version = "6.1.7601.17514"
User Name  Michael-PC\Michael
Time Zone  Central Standard Time
Installed Physical Memory (RAM)  12.0 GB
Total Physical Memory  12.0 GB
Available Physical Memory  7.94 GB
Total Virtual Memory  24.0 GB
Available Virtual Memory  19.0 GB
Page File Space  12.0 GB
Page File  C:\pagefile.sys

--------------------------------------------------------------------------------------------------------------------------------------------------------------------
###############################################   Sound Card   ############################################
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Name  Creative X-Fi Audio Processor (WDM)
Manufacturer  Creative Technology, Ltd.
Status  OK
PNP Device ID  PCI\VEN_1102&DEV_000B&SUBSYS_00431102&REV_04\4&25692928&0&00E0
Memory Address  0xFBCE0000-0xFBCEFFFF
Memory Address  0xFBA00000-0xFBBFFFFF
Memory Address  0xF4000000-0xF7FFFFFF
IRQ Channel  IRQ 16
Driver  c:\windows\system32\drivers\ctaud2k.sys (6.0.240.8, 686.90 KB (703,384 bytes), 2/28/2014 9:19 PM)
 
Name  High Definition Audio Device
Manufacturer  Microsoft
Status  OK
PNP Device ID  HDAUDIO\FUNC_01&VEN_1002&DEV_AA01&SUBSYS_00AA0100&REV_1002\5&17F3152E&0&0001
Driver  c:\windows\system32\drivers\hdaudio.sys (6.1.7601.17514, 342.00 KB (350,208 bytes), 6/22/2013 11:48 PM)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------

this help?

Im re-installing Wurm, that way I can check to see if something changed since the last time I played it.
Parent - - By jlnr (dev) Date 2014-12-08 23:32
I was curious if you'd have a Creative audio chip and you do. They're the company behind OpenAL (mostly), so I wonder if that makes it somehow use different code on your computer? Maybe some hardware acceleration that fails, because I use a custom build of OpenAL soft? Hmm.
Parent - By Azurazen Date 2014-12-09 00:07
eck... this sound card hates me it seams, nothing but trouble since day one -face desk-
Parent - By Azurazen Date 2014-12-09 00:22
Ok Wurm plays and there is sound...
Parent - - By Cassy Date 2014-12-08 23:24
I'm not sure if this will help you, but I had a similar problem when I started with gosu.

I followed the Gosu tutorial, and tried to add some songs to the game. It said it has to be .wav, but I converted them (I had them in .mp3) and didn't play (or at least, didn't sound).

What I did to solve it was coding the songs and sounds I wanted to use in .ogg format. The oggs played really nice.

Have you tried this?
Parent - By Azurazen Date 2014-12-09 00:07
Just tried it, but didn't change anything v.v;
Parent - - By jlnr (dev) Date 2014-12-10 19:46
Can you please try the 64-bit version of Ruby 2.1.5 from http://rubyinstaller.org/? I have just released a 64-bit version of Gosu that uses an updated OpenAL32.dll. The next 32-bit version will also have a more recent DLL, but I didn't want to re-release the 32-bit gem of 0.8.6 just for that.
Parent - - By RunnerPack Date 2014-12-11 06:13 Edited 2014-12-11 06:34
Sorry to hijack this thread, but I'm having a related problem (and I also want to help test the 64-bit Gosu).

I am also running Win 7 64-bit, but I have no problem with sounds in any recent version of Gosu under (32-bit) Ruby 1.9.x (I have Realtek audio hardware). However, I can't try the new 64-bit Gosu, because 'gem' refuses to install it. Here's the error message:

C:\Ruby21-x64\bin>.\gem ins gosu --source http://rubygems.org
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing gosu:
        ERROR: Failed to build gem native extension.

    C:/Ruby21-x64/bin/ruby.exe extconf.rb
This gem is not meant to be installed on Windows. Instead, please use:
gem install gosu --platform=i386-mingw32

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/gosu-0.8.6 for inspection.
Results logged to C:/Ruby21-x64/lib/ruby/gems/2.1.0/extensions/x64-mingw32/2.1.0/gosu-0.8.6/gem_make.out


So, taking a cue from the "--platform=" thing, I tried using --platform=x64-mingw32, but there was no change in the response.

So, what am I supposed to tell 'gem' to get it to install the 64-bit version of Gosu? Could this be caused by Ruby 2.1 and its devkit not being on the path (or that the 32-bit stuff is on the path)? I installed the 64-bit devkit according to the FAQ, and it seemed to work. Would using "pik" to manage the two versions help? (I don't feel comfortable going "all-in" with either Ruby 2.x or 64-bit, at this time.)

Also, does anyone know how to fix the SSL certificate problem (in Windows) so I can stop using the --source http://rubygems.org work-around?
Parent - - By jlnr (dev) Date 2014-12-11 09:46
What is the output of ruby -e "puts RUBY_PLATFORM"?

I am using the x64 RubyInstaller build of Ruby 2.1, but no DevKit. The only thing I did before installing Gosu was gem update --system.
Parent - - By RunnerPack Date 2014-12-11 19:30

> What is the output of ruby -e "puts RUBY_PLATFORM"?


x64-mingw32

> I am using the x64 RubyInstaller build of Ruby 2.1, but no DevKit. The only thing I did before installing Gosu was gem update --system.


That got it to install, but there seems to be a problem with gosu itself.

Actually, I wasn't able to update rubygems, at first. Even when I included the "--source" thing, I still got the SSL connect error. I solved it by getting "cacerts.pem" from: http://curl.haxx.se/docs/caextract.html and putting it in the "C:\Ruby21-x64\lib\ruby\2.1.0\rubygems\ssl_certs" folder.

Even though "gem" reports gosu as being installed, I get a LoadError when I try to 'require' it (even if I "require 'rubygems'" first):

D:\devgosu>ruby -e "require 'gosu'"
C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in require': cannot load such file -- gosu.so (LoadError)
        from C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in
require'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/gosu-0.8.6-x64-mingw32/lib/gosu.rb:16:in rescue in <top (required)>'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/gosu-0.8.6-x64-mingw32/lib/gosu.rb:11:in
<top (required)>'
        from C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in require'
        from C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in
rescue in require'
        from C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:39:in require'
        from -e:1:in
<main>'


I looked for 'gosu.so' and found it in "C:\Ruby21-x64\lib\ruby\gems\2.1.0\gems\gosu-0.8.6-x64-mingw32\lib64\2.1", which seems to be where "C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/gosu-0.8.6-x64-mingw32/lib/gosu.rb" is looking for it, and it appears to be a proper, 64-bit, Windows PE DLL, so I'm confused.
Parent - - By jlnr (dev) Date 2014-12-11 20:08
If you look at C:\Ruby21-x64\lib\ruby\gems\2.1.0\gems\gosu-0.8.6-x64-mingw32\lib\gosu.rb you can see that it tries to require the version-specific binary first, and then below rescue LoadError it tries to fall back to gosu.so (which is built by the extconf.rb on other platforms).

If you comment out the rescue LoadError and the line directly below it, what is the error message?
Parent - - By RunnerPack Date 2014-12-12 04:50

ruby -e "require 'gosu'"
C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in require': cannot load such file -- ../lib64/2.1/gosu.so (LoadError)
        from C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in
rescue in require'
        from C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:39:in require'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/gosu-0.8.6-x64-mingw32/lib/gosu.rb:16:in
<top (required)>'
        from C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in require'
        from C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in
rescue in require'
        from C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:39:in require'
        from -e:1:in
<main>'

But, AFAICT, the file it's trying to load is actually there, and it's a valid, executable file. Does it need an absolute path, instead of a relative one, perhaps?
Parent - By jlnr (dev) Date 2014-12-12 09:56
I think the first step would be to verify that the gosu.so actually works. For that I usually require it from irb using an absolute filename, then I verify that Gosu::Window.new(100,100,false).show() shows a window as expected.

If the gosu.so works and it's only that require can't find it, maybe you could play around with the path - it might be something really silly like the difference between / and \? (So far I've been lucky and / has worked consistently)

Sorry for the trouble, anyway. I can't believe that there is only ONE!! distribution of Ruby 2.1-x64 for Windows and even that behaves differently on different machines %)

(And I also had to do the SSL certificate dance...)
Parent - - By lol_o2 Date 2014-12-12 11:49
I had the same problem and I fixed it by moving gosu.so to lib. It is then loaded when rescue happens.
Parent - - By jlnr (dev) Date 2014-12-12 16:31
I don't understand the bug but I've fixed it. :) You should be able to install 0.8.7 without any further trouble.
Parent - - By RunnerPack Date 2014-12-12 19:34
I just tried to "gem update gosu" and it can't find 0.8.7. I even tried to force the version number, and I got an "access is denied" message.

If you just want to wait and release 0.8.7 with some other, less windows-specific fixes, I can just use something like lol_o2's cludge to get it working in the mean time.
Parent - - By jlnr (dev) Date 2014-12-13 00:24
Oops, that wasn't very clear. Yes, you will be able to install 0.8.7 once it's out! Which it isn't yet :) Sorry.

The C++ build files are in a pretty bad state, so I'll try to polish those a little before releasing 0.8.7.
Parent - By RunnerPack Date 2014-12-13 02:53
Yes, I kind of thought that might have been what you meant, after I posted. No harm done, so you're forgiven ;)

In the meantime, I applied lol_o2's fix, and Gosu does indeed work great with 2.1-x64, so... yay! :D

I'll need to come up with some kind of benchmark to see if it was worth all the rigmarole ;)
Parent - - By jlnr (dev) Date 2014-12-12 16:31
See my answer to lol_o2 - I've been able to reproduce and fix the issue. Thanks for reporting this!
Parent - By RunnerPack Date 2014-12-12 19:50
Any time; glad to be of help.
Parent - By Azurazen Date 2014-12-29 18:46
Sorry bout the delay, was moving and just got my rig set back up..

But after installing and setting up the 2.1.5 Ruby and getting everything situated the sound now works, so thanks for the help,
now back to working on my game again lol.
Up Topic Gosu / Gosu Exchange / No Sound? Help T.T

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill