Project

General

Profile

Bug #705553

SDL Audio, playing only 1 sound

Added by ᳇ Ϻ⚸Яℨ⚔ ᳇ 9 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Category:
Client
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

With SDL1 or SDL2 audio I always get only first sound of moving. Later there is silence.
I tested on all clients.

Im not really sure which one is used.
Sound plugin says just SDL.
but config.log shows like SDL2:

SDL2MIXER_CFLAGS='-D_REENTRANT -I/usr/include/SDL2'
SDL2MIXER_LIBS='-lSDL2_mixer -lSDL2'
SDL2_CFLAGS='-I/usr/include/SDL2 -D_REENTRANT'
SDL2_CONFIG='/usr/bin/sdl2-config'
SDL2_LIBS='-L/usr/lib64 -lSDL2'
SDLMIXER_CFLAGS=''
SDLMIXER_LIBS=''
SDL_CFLAGS=''
SDL_CONFIG=''
SDL_LIBS=''
SOUND_CFLAGS=' -D_REENTRANT -I/usr/include/SDL2'
SOUND_LIBS=' -lSDL2_mixer -lSDL2'
#define AUDIO_SDL 1
#define AUDIO_SDL2 1
#define SDL2_PLAIN_INCLUDE 1

It works ok with 2.5

audio_fix.patch (557 Bytes) audio_fix.patch ᳇ Ϻ⚸Яℨ⚔ ᳇, 2017-10-22 08:44 PM
audio_fixV2.patch (553 Bytes) audio_fixV2.patch ᳇ Ϻ⚸Яℨ⚔ ᳇, 2017-10-22 08:48 PM

History

#1 Updated by ᳇ Ϻ⚸Яℨ⚔ ᳇ 9 months ago

Music is ok.

#2 Updated by ᳇ Ϻ⚸Яℨ⚔ ᳇ 9 months ago

I forced SDL1 by adding --with-sdl2-prefix=/XX --with-sdl2-exec-prefix=/XXX
.config log shows
SDLMIXER_CFLAGS='-D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL'
SDLMIXER_LIBS='-lSDL_mixer -lSDL -lpthread'
SDL_CFLAGS='-I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT'
SDL_CONFIG='/usr/bin/sdl-config'
SDL_LIBS='-lSDL -lpthread'
SOUND_CFLAGS=' -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL'
SOUND_LIBS=' -lSDL_mixer -lSDL -lpthread'
#define AUDIO_SDL 1
#define AUDIO_SDL1_2 1

but it doesnt work too

#3 Updated by ᳇ Ϻ⚸Яℨ⚔ ᳇ 9 months ago

Seems I broke it in commit 353a515d689bc54dd1959e9601c6d22e5bf8dfe6.
Fix attached.

#5 Updated by ᳇ Ϻ⚸Яℨ⚔ ᳇ 9 months ago

  • Status changed from Resolved to Closed

I applied patch, it asked me to pull, then it came some merge mumbojumbo, but everything looks ok. Just strange merges like "Merge branch 'S2_6' of https://github.com/freeciv/freeciv into S2_6"

Also available in: Atom PDF