Re: [hatari-devel] SDL1 vs. SDL2 sound pausing

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Nicolas,

I already have FS-UAE installed for when I want to play an Amiga game. It appears he is somehow pausing the video, but not pausing the audio. When I loaded Winter Games, the audio kept playing but the video stopped when I selected the menu bar. I assume they get back into sync after I clicked away from the menu bar.

I do not have the programming ability to do it, but I am wondering whether a simple OS X program can be written that simply plays a sound and attempts to pause the sound when the menu bar is pressed. If that simple case was given to the SDL mailing list, someone would either say it was an SDL bug or we are doing something wrong.

It is very possible this would not occur in Linux where you can pick different desktop environments based on your taste. In OS X, the desktop and underlying OS are much more tightly linked. I would still assume some event is generated when you click the menu bar. I just do not know if we can control this or whether it has to be done by SDL itself.

Bob C


> On Sep 9, 2016, at 4:17 AM, Nicolas Pomarède <npomarede@xxxxxxxxxxxx> wrote:
> 
> Le 08/09/2016 à 23:05, Jerome Vernet a écrit :
>> Le 08/09/2016 à 21:14, Eero Tamminen a écrit :
>>> Hi,
>>> 
>> 
>>> I read the SDL2 docs & Hatari source a bit and while
>>> Hatari uses the legacy SDL_PauseAudio() function, that
>>> should work fine with SDL2.  It does work fine for me
>>> with SDL2, sound is paused when emulation is paused.
>> SDL_PauseAudio is not called when only click on a menu title. Because
>> nothing is called then.
>> OSX Gui will only call GuiOsx_Pause() (wich call
>> Main_PauseEmulation(true) from Hatari core) only when you have selected
>> a menu item like Preferences, Create Floppy, etc.
>> 
>> What is curious is that the emulation itself seems to be paused. Only
>> some noise happen.
>>> 
>>> I suspect that your SDL2 version is buggy.
>> It's 2.0.4 up to date from current developpement sources. It happen
>> since the very first SDL2 build, with SDL 2.0.1.
>> 
>> I think that I should fill a bug report on the SDL lists.
>> 
> 
> Hi
> 
> IIRC, FS-UAE also uses SDL2 on OSX. Maybe some here with OSX could try to install it and see if the UI has the same sound problem ?
> 
> If not, then the problem is related to OSX version of Hatari, not SDL2 itself. Then maybe a look at the FS-UAE sources could tell if some specifc SDL2 calls are made to ensure sound will be stopped when interacting with the menus / UI.
> Or send a email to Frode (fs-uae author), maybe that's sthg he already encounters and knows how to fix it.
> 
> Nicolas
> 
> 
> 




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/