You are not logged in.

#1 2005-08-26 21:13:10

omgpro
Member
From: Connecticut USA
Registered: 2005-08-26
Posts: 42

sdl_mixer: could not open requested file [solved]

I am new to the arch linux community, but i love arch. I'm a relative newbie to linux, but i can find my way around a command line.  I have just returned to linux after not using it for a while and I started having a problem with my sound.  I first noticed the problem when I tried playing a video in gmplayer and it wouldn't play unless i set the sound driver to null because of a sound error. Now, if I played the same video on mplayer it worked fine.  I can also play music in XMMS.  Then, today i installed the FPS engine Cube.  When I started it from root, it worked fine.  But if i started it from my normal user account, an error message saying the sound can't be initialized because the sdl mixer couldn't open the requested file.  I tried playing movies in GMplayer under root and they worked fine, but still wouldn't under my normal account.  I'm assuming it has something to do with a file's permissions, but I don't know which file or where to find it. Any help?

Offline

#2 2005-08-26 21:30:00

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: sdl_mixer: could not open requested file [solved]

Did you add your user in the audio group?
gpasswd -a omgpro audio

You should do the same for the optical (cd/dvd drive) and video  (3D accel.) groups.

And, Welcome to Arch! big_smile

Offline

#3 2005-08-26 22:55:02

omgpro
Member
From: Connecticut USA
Registered: 2005-08-26
Posts: 42

Re: sdl_mixer: could not open requested file [solved]

That's not the problem, I'm allready part of the audio group, and like I said, some things like XMMS and mplayer work fine, which makes me think it's a problem with sdl. I don't know much about the multimedia stuff though, so i could be wrong. Thanks for the tip about the optical group though, that helped me with playing cd's.

Offline

#4 2005-08-26 23:26:15

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: sdl_mixer: could not open requested file [solved]

Now that you mention it, it could be sdl related. In smc, a SDL game, I only get audio when it is runned as root.  As user it gives me a

Warning : Could not init 16-bit Audio
- Reason : Could not open requested file 

error message.  I haven't been able to find the problem. 

EDIT: xmms and mplayer works fine here. Other sdl games that I've tried works fine also.  You could try beep-media-player (pacman -S bmp) it's a GTK2 port of xmms.

Offline

#5 2005-08-27 05:42:23

omgpro
Member
From: Connecticut USA
Registered: 2005-08-26
Posts: 42

Re: sdl_mixer: could not open requested file [solved]

Well, in the meantime, playing games and watching videos under root shouldn't cause me any problems right? Multiplayer as root wouldn't be a good idea though, so I'll stay away from that. If could be the soundcard maybe? I noticed it said you have a 16 bit sound card, which I think i do too. I'm using the one out of my Mom's old old box.  Your smc error said basically the same thing my cube error did.  I need a new sound card anyways, so I could look into that to see if it fixes the problem. 

By the way, if you have gmplayer, could you try running that and see if the sound works?  I'm pretty sure it used to work for me in the past; I'm not sure what happened.

Offline

#6 2005-08-27 06:09:35

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: sdl_mixer: could not open requested file [solved]

omgpro wrote:

Well, in the meantime, playing games and watching videos under root shouldn't cause me any problems right?
Multiplayer as root wouldn't be a good idea though, so I'll stay away from that.

Ideally they should be run as a user, but here you don't have much choice.  I would guess that it's OK, but I'm not a security expert.

omgpro wrote:

If could be the soundcard maybe? I noticed it said you have a 16 bit sound card, which I think i do too. I'm using the one out of my Mom's old old box.  Your smc error said basically the same thing my cube error did.  I need a new sound card anyways, so I could look into that to see if it fixes the problem.

I'm using a Intel onboard sound card. It uses the snd_intel8x0  module.  SMC was working a while ago. It was on another laptop but at the end it also had the sound problem.  I would think that it's not a hardware issue.  I will try an old version of smc to see if I can get sound

omgpro wrote:

By the way, if you have gmplayer, could you try running that and see if the sound works?  I'm pretty sure it used to work for me in the past; I'm not sure what happened.

I get sound from gmplayer ( tried with mp3 and mpeg).  Maybe it was broke by an upgrade (check /var/log/pacman.log). Or try to update your system.

Offline

#7 2005-08-29 01:32:42

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: sdl_mixer: could not open requested file [solved]

I found out the problem with smc and a solution.  When I start an app using SDL, it creates a music.raw file in the present working directory.   It is an empty file so I don't know what it is used for.  In the case of smc,  it uses /usr/share/smc  as pwd (I guess it's because it's launched from a script) so regular uses can't read/write music.raw -> no sound.  I just gave everyone rw access to /usr/share/smc/music.raw :

chmod a+rw /usr/share/smc/music.raw

Now smc have sound as user smile .

You should check to see if you have these music.raw files on your system and chmod them.

HTH

Offline

#8 2005-08-29 05:46:21

omgpro
Member
From: Connecticut USA
Registered: 2005-08-26
Posts: 42

Re: sdl_mixer: could not open requested file [solved]

Hmm, that did it for cube,  big_smile .  Thank you so much for helping me.  I havn't quite figured out if there's one of thes music.raw files for gmplayer or why it isn't working, but it's no big deal at all.  I'm perfectly fine just using plain old mplayer with no gui.

Offline

#9 2005-08-29 06:08:11

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: sdl_mixer: could not open requested file [solved]

omgpro wrote:

Hmm, that did it for cube,  big_smile .  Thank you so much for helping me.

No problem.  That error was bugging me also.

omgpro wrote:

I havn't quite figured out if there's one of thes music.raw files for gmplayer or why it isn't working, but it's no big deal at all.  I'm perfectly fine just using plain old mplayer with no gui.

To see if gmplayer makes a music.raw (on my system it doesn't):
As root play a music/video with gmplayer. It will create the file if it needs it. Then run:
updatedb
locate music.raw
It will list all the music.raw files on your system.

There are also other GUI frontend for mplayer: kmplayer (in extra), kplayer and pymp (both in AUR). Maybe they'll work.

Offline

#10 2005-08-30 05:09:35

omgpro
Member
From: Connecticut USA
Registered: 2005-08-26
Posts: 42

Re: sdl_mixer: could not open requested file [solved]

I figured out there's a plugin for XMMS to play videos with mplayer  smile . That's actually a lot better for me, because I'm used to playing video in winamp on windows. So everything with that is fine now.

Offline

Board footer

Powered by FluxBB