Duke4.net Forums: No Sound eduke32 Linux Mint - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

No Sound eduke32 Linux Mint

User is offline   Spirrwell 

  • tile 1018

#1

Well as the title says I'm getting no sound in eduke32. These are the only two lines I consider relevant in the eduke32.log:

Initializing music...
Initializing sound... failed! SDL Audio: error in OpenAudio.


But I'll attach the log anyway:
Attached File  eduke32.log (1.29K)
Number of downloads: 244

Well first off when I went to build eduke32 I did have a problem with sdl_inc.h trying to include SDL_mixer.h. On line 37 my initial reaction was to modify it to "SDL/SDL_mixer.h" but I had the same problem with other files trying to include SDL_mixer.h so I just copied it from /usr/include/SDL to /usr/include to fix that problem. I don't think that this has anything to do with my problem, I'm pretty sure it has something to do with pulseaudio given past experiences.

I believe I was fiddling with pulseaudio trying to disable it or something a while back when I was trying to get a Steam game to run properly under wine. As far as I know pulseaudio doesn't run when I start Linux Mint. I actually can't access sound options because there's apparently no sound device, but I know that sound DOES in fact work. If I run pulseaudio from the terminal it seems I can access some sound options, but it doesn't do anything for eduke32.

Anybody have an idea?
0

User is offline   Spirrwell 

  • tile 1018

#2

Alright I actually tried to write my own program using SDL_mixer and I got the error "No available audio device." From this code:
#include <SDL/SDL.h>
#include <SDL_mixer.h>

int main (int argc, char* argv[])
{
    if (Mix_OpenAudio(22050, MIX_DEFAULT_FORMAT, 2, 4096) < 0)
    {
        printf("%s\n", Mix_GetError());
        return -1;
    }
    atexit(Mix_CloseAudio);
    return 0;
}


So clearly the problem is definitely on my end. I'll poke about a bit around the SDL forums.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #3

Don't you need to SDL_Init and Mix_Init at the top of your main()?
0

User is offline   Spirrwell 

  • tile 1018

#4

View PostHendricks266, on 16 December 2012 - 06:26 PM, said:

Don't you need to SDL_Init and Mix_Init at the top of your main()?

Mix_Init() is for decoding non-WAV format audio. Although I've had it working fine without ever using it so I'm not sure if there's a point to it. Other than that the code I provided compiles just fine under Windows, no error returned. I even went as far as to modify it play music in Windows, works fine. I also know that the SDL wiki says to use SDL_Init(SDL_INIT_AUDIO) even though SDL_INIT_AUDIO is a standard SDL constant, it's still required, but it works fine without it under Windows.

I'll clean up the code to meet those standards and see if it makes a difference, but this is the first time I've ever had this issue with SDL_Mixer even under Linux as I've done the same under Ubuntu with no problem.

Edit:
No change, still "No available audio device." from Mix_OpenAudio().

This post has been edited by Spirrwell: 17 December 2012 - 12:26 PM

0

User is offline   TerminX 

  • el fundador

  #5

I just wanted to post and give you a pat on the back for figuring out that the problem is on your end instead of just expecting someone else to do it for you. Thanks for that.
0

User is offline   Spirrwell 

  • tile 1018

#6

View PostTerminX, on 17 December 2012 - 12:35 PM, said:

I just wanted to post and give you a pat on the back for figuring out that the problem is on your end instead of just expecting someone else to do it for you. Thanks for that.

Thanks, my programming experience has come in very handy in a variety of situations, and I already figured the problem was on my end, I was hoping someone may have had a similar experience with audio not working.

I was pretty sure the problem had to do with pulseaudio. I know a while back I tried to remove it and purge any additional files in the event that it may have been conflicting with my ability to run a Steam Source based game under Wine that had some CAudioBlaBlaBla errors. I've been looking for a way to make SDL use ALSA but I haven't figured anything out. I may try compiling SDL and SDL_mixer on my own. Right now I know for certain that pulseaudio doesn't run unless I explicitly type pulseaudio in the terminal. Also interestingly enough, if I go into System Settings -> Sound, there's no sound device shown or sometimes the settings don't even load unless I run PA from the terminal. When I test audio after running PA in the sound settings, it doesn't work. Although everything else still works such as music.

I'm curious if you guys ever considered using OpenAL with libvorbis and libogg. Although I'm not sure about the licensing... Oh well, I'll keep poking around for solving my problem and if somebody has a useful tip as to helping me solve it, let me know.

This post has been edited by Spirrwell: 18 December 2012 - 05:42 PM

0

User is offline   Plagman 

  • Former VP of Media Operations

#7

export SDL_AUDIODRIVER=alsa?
0

User is offline   Hendricks266 

  • Weaponized Autism

  #8

View PostSpirrwell, on 18 December 2012 - 05:36 PM, said:

I'm curious if you guys ever considered using OpenAL with libvorbis and libogg. Although I'm not sure about the licensing... Oh well, I'll keep poking around for solving my problem and if somebody has a useful tip as to helping me solve it, let me know.

Ogg support actually used OpenAL way back when Hunter_rus originally hacked it in. When jaudiolib got proper support, we didn't need that any more.
0

User is offline   Spirrwell 

  • tile 1018

#9

View PostPlagman, on 18 December 2012 - 08:39 PM, said:

export SDL_AUDIODRIVER=alsa?

Already tried that. No change.
0

User is offline   NY00123 

#10

A bump of a few years.


So I've just gotten the same problem on a Xubuntu 12.04 (32-bit) installation. It turns out the cause of this is the missing SDL_INIT_AUDIO flag, indeed.

An older revision of driver_sdl.c has commented out code, which is supposed to take care of this, but there's a caveat:

http://svn.eduke32.c...v=1481&peg=1481 (See SDLDrv_PCM_Init)

    inited = SDL_WasInit(SDL_INIT_EVERYTHING);

    if (inited == 0) {
        // nothing was initialised
        err = SDL_Init(SDL_INIT_AUDIO);
        StartedSDL = 0;
    } else if (inited & SDL_INIT_AUDIO) {
        err = SDL_InitSubSystem(SDL_INIT_AUDIO);
        StartedSDL = 1;
    }

    if (err < 0) {
        ErrorCode = SDLErr_InitSubSystem;
        return SDLErr_Error;
    }


Basically, the condition "(inited & SDL_INIT_AUDIO)" should be replaced with "(!(inited & SDL_INIT_AUDIO))".

Once the commented out code is added (should include minor updates for the definitions of StartedSDL and inited), and the above change is applied, I get working audio (at least on start-up and in the menus).

This post has been edited by NY00123: 31 January 2017 - 02:40 PM

1

User is offline   NY00123 

#11

I'm updating that I can reproduce the same issue on Ubuntu 14.04. It seems to come from a change to SDL2_mixer as available from https://hg.libsdl.org/SDL_mixer/ (tested with a custom build of SDL2_mixer).

I've attached a patch to EDuke32 which resolves this issue (renamed to .txt so I can attach it). It's based on my description from the preceding post.

Side-note: I'm not sure why was the error reproduced in Spirrwell's case (during 2012), since the above change to SDL2_mixer is more recent, but let's ignore this for now.

Some more details about the change to SDL2_mixer:
Spoiler

Attached File(s)


2

User is offline   Micky C 

  • Honored Donor

#12

I haven't had any sound issue on Ubuntu 16.04 LTS.
1

User is offline   NY00123 

#13

View PostMicky C, on 26 February 2017 - 06:57 PM, said:

I haven't had any sound issue on Ubuntu 16.04 LTS.


Thanks for confirming; I assume you're using SDL2 and SDL2_mixer as downloaded with apt-get (or whatever you've used)?

Even SDL_mixer v2.0.1 isn't expected to reproduce the issue; It's only a later revision (from Mercurial) that will do so.
0

User is offline   Micky C 

  • Honored Donor

#14

I can't recall doing anything special besides what's stated on the wiki.

Actually I recall there being no sound at first, but some time later for absolutely no reason there was sound, which is bizarre.
1

User is offline   Hendricks266 

  • Weaponized Autism

  #15

Thanks for the patch, and I'm sorry about the wait. Pushed.
1

User is offline   NY00123 

#16

View PostHendricks266, on 01 March 2017 - 01:36 AM, said:

Thanks for the patch, and I'm sorry about the wait. Pushed.


Thanks for applying the patch; No need to hurry that I observe.

I'm wondering if my observation on that change to SDL2_mixer should be considered a regression in SDL2_mixer to be reported as a bug. It might be, when compared to SDL_OpenAudio, and also since it broke EDuke32.

EDIT: SDL2_mixer regression has been reported: https://bugzilla.lib...bug.cgi?id=3596

This post has been edited by NY00123: 01 March 2017 - 10:53 AM

0

User is offline   NY00123 

#17

Just updating that the SDL2_mixer regression has been resolved: https://bugzilla.lib...bug.cgi?id=3596

This basically means that older revisions of EDuke32 should work with sound again (assuming SDL2_mixer is updated to the last revision, from one of the few nearby preceding revisions).

This post has been edited by NY00123: 27 May 2017 - 01:31 PM

1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options