Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2003:
[Freeciv-Dev] Re: audio hotswap v3 (PR#2319)
Home

[Freeciv-Dev] Re: audio hotswap v3 (PR#2319)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: audio hotswap v3 (PR#2319)
From: "Per I. Mathisen via RT" <rt@xxxxxxxxxxxxxx>
Date: Mon, 27 Jan 2003 15:54:24 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Mon, 20 Jan 2003, Rafa³ Bursig via RT wrote:
> Dnia 2003.01.20 16:24 Per I. Mathisen via RT napisa³(a):
> > I haven't tested it with the SDL client, and I made some changes to
> > SDL initialization, so Rafal please look at this.
...
> I don't know if calling SDL_QuitSubSystem(SDL_INIT_AUDIO) to quit will
> be good method quit sdl ( normaly SDL_Quit() )

I added SDL_Quit() with atexit, ensuring that it is only called on program
exit. I think this is the right thing to do, as I don't see how the SDL
client can handle a complete shutdown with SDL_Quit when we change sound
plugin, while running SDL stuff in SDL_gui in the rest of the code... In
any case, it works fine for me using SDL_QuitSubSystem() only.

> It should work.  You might have to call the internal SDL function
> DX5_SoundFocus() with the window handle before initializing audio.
...
> In that way we can replace :
> 1) quit_sdl_audio(); =>SDL_QuitSubSystem(SDL_INIT_AUDIO);
> 1) init_sdl_audio(); =>
>
> /* check if we are in win32 envir. */
> #ifdef WIN32_NATIVE
>  DX5_SoundFocus();
> #endif
>  if ( SDL_InitSubSystem(SDL_INIT_AUDIO) < 0 )
>  {
>    return FALSE;
>  }
>  atexit(SDL_Quit);

I know nothing about this, can't test it, so I would suggest the windows
maintainer adds this afterwards. (Windows port uses a native sound plugin
in any case.)

  - Per




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: audio hotswap v3 (PR#2319), Per I. Mathisen via RT <=