Forums Archived

The forums are being archived. See this topic for more information.

Sound in Windows 7 64-bit?

Get help and support with Rubygame

Sound in Windows 7 64-bit?

Postby cfaftw » Wed Mar 10, 2010 10:45 pm

Has anyone been able to get sound to work with Rubygame in Windows 7 64-bit? I'm using a simple script to play a sound file that works fine in Linux, but produces no sound (and no error) in Windows. I tried first creating a screen before opening sound, per this site's instructions (though not related to Rubygame): http://osdl.sourceforge.net/main/docume ... wareissues

Can't figure it out. Am I missing something? Also, yes I have the DLLs in the right place for 64-bit Win7.
cfaftw
 
Posts: 4
Joined: Wed Mar 10, 2010 9:49 pm

Re: Sound in Windows 7 64-bit?

Postby cfaftw » Wed Mar 10, 2010 11:52 pm

It's probably just my code. I ran the chimp.rb sample and sound works fine. Interestingly the sound in my script works on linux, but not in windows. I'll look into it more and post a followup later.
cfaftw
 
Posts: 4
Joined: Wed Mar 10, 2010 9:49 pm

Re: Sound in Windows 7 64-bit?

Postby cfaftw » Thu Mar 11, 2010 12:30 am

Yeah it was my code. You do have to create a screen before sound will work with SDL in Windows. So that link I posted was correct. Something to do with the way DirectSound binds to an application.

Anyway, I got sound working fine.
cfaftw
 
Posts: 4
Joined: Wed Mar 10, 2010 9:49 pm

Re: Sound in Windows 7 64-bit?

Postby brandon » Thu Mar 11, 2010 12:47 am

It's probably because Screen.new eventually calls SDL_Init() with SDL_INIT_AUDIO.
brandon
 
Posts: 9
Joined: Wed Mar 10, 2010 7:07 pm

Re: Sound in Windows 7 64-bit?

Postby jacius » Thu Mar 11, 2010 4:44 am

brandon wrote:It's probably because Screen.new eventually calls SDL_Init() with SDL_INIT_AUDIO.

In Rubygame 2.6, SDL is initialized with SDL_INIT_EVERYTHING automatically when you 'require "rubygame"', so I don't think that's the issue. From reading the page cfaftw linked to, it just seems that a screen must be opened before the sound will work, even if the video and sound systems were already initialized. Silly Windows.
User avatar
jacius
Site Admin
 
Posts: 131
Joined: Fri Feb 06, 2009 11:13 pm


Return to Help & Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron