Previous Thread
Next Thread
Print Thread
Joined: Feb 2014
Posts: 1,225
Likes: 224
G
Very Senior Member
Very Senior Member
G Offline
Joined: Feb 2014
Posts: 1,225
Likes: 224
I just did a git pull of master and the compile failed with:



../../../../../src/osd/modules/sound/sdl_sound.cpp:110:13: error: ‘SDL_GetDefaultAudioInfo’ was not declared in this scope; did you mean ‘SDL_GetDefaultCursor’?
110 | if(!SDL_GetDefaultAudioInfo(&def_name, &def_spec, 0)) {
| ^~~~~~~~~~~~~~~~~~~~~~~
| SDL_GetDefaultCursor
make[2]: *** [osd_sdl.make:1387: ../../../../linux_gcc/obj/x64/Release/osd_sdl/src/osd/modules/sound/sdl_sound.o] Error 1


I'm still on Ubuntu 22.04.05 which has 2.0.20 libsdl2

from packages.ubuntu.com search:

jammy (22.04LTS) (libs): Simple DirectMedia Layer
2.0.20+dfsg-2build1: amd64 arm64 armhf i386 ppc64el riscv64 s390x


I see this pull at https://github.com/mamedev/mame/pull/13632

Joined: Feb 2014
Posts: 1,225
Likes: 224
G
Very Senior Member
Very Senior Member
G Offline
Joined: Feb 2014
Posts: 1,225
Likes: 224
/*
char *def_name;
SDL_AudioSpec def_spec;

if(!SDL_GetDefaultAudioInfo(&def_name, &def_spec, 0)) {
uint32_t idx;
for(idx = 0; idx != m_devices.size() && m_devices[idx].m_name != def_name; idx++);
if(idx == m_devices.size())
m_devices.emplace_back(def_name, def_spec.freq, def_spec.channels, true);
m_default_sink = idx+1;
SDL_free(def_name);
} else
*/


I commented this out and it compiles and runs fine, however I have to go into the menus to set the audio mixer to "built in analog audio stereo" to get sound.

Joined: Apr 2006
Posts: 825
Likes: 3
D
Senior Member
Senior Member
D Offline
Joined: Apr 2006
Posts: 825
Likes: 3
I get this message on the Nobara OS. (Fedora OS clone)

While parsing /home/mitchell/.mame/mame.ini:
Out-of-range float value for audio_latency: "2" (must be between 0.000000 and 0.500000, inclusive); reverting to 0.0

The sound does works. Current MAME beta.

No error on the 0.277 released.


Nobara OS / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 64 GB
Joined: Mar 2001
Posts: 17,294
Likes: 272
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,294
Likes: 272
Yes, the meaning of audio_latency changed, which is a really terrible idea.

Joined: Feb 2004
Posts: 2,641
Likes: 351
Very Senior Member
Very Senior Member
Joined: Feb 2004
Posts: 2,641
Likes: 351
There’s a draft PR for fixing support for older SDL versions: https://github.com/mamedev/mame/pull/13632

Maybe you want to clean up and test it a bit more? I’ve been pretty busy with the Windows side of things.

Joined: Feb 2004
Posts: 2,641
Likes: 351
Very Senior Member
Very Senior Member
Joined: Feb 2004
Posts: 2,641
Likes: 351
I cribbed the part relevant to getting it building with older versions of SDL in d2bfb8c3f4f. I haven’t tested this extensively.

Joined: Feb 2014
Posts: 1,225
Likes: 224
G
Very Senior Member
Very Senior Member
G Offline
Joined: Feb 2014
Posts: 1,225
Likes: 224
Thanks Vas, it builds fine now.

On my system, I get two output choices, Built-in audio analog stereo and simultaneous output to built-in analog stereo.

Before I wasn't getting sound with the "simultaneous output to built-in analog stereo", but launching pavucontrol lets me set the volume up and now I can get sound output from both of these outputs.

Joined: Apr 2006
Posts: 825
Likes: 3
D
Senior Member
Senior Member
D Offline
Joined: Apr 2006
Posts: 825
Likes: 3
The audio_latency error is gone now. Nobara OS. (Fedora OS clone.)


Nobara OS / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 64 GB

Moderated by  R. Belmont 

Link Copied to Clipboard
Who's Online Now
2 members (AJR, Kale), 238 guests, and 4 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,381
Posts122,712
Members5,085
Most Online1,529
Jun 7th, 2025
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Powered by UBB.threads™ PHP Forum Software 8.0.0