Start and stop the waave engine.

Init SDL

Waave is based on the SDL library so you need initialize the SDL environment first. So include the SDL headers followed by the waave headers.

#include <SDL.h>
#include <WAAVE.h>

Waave require that you initialize SDL with support for audio, video and timer.

  /************/
  /* init sdl */
  /************/
  if( SDL_Init( SDL_INIT_VIDEO|SDL_INIT_AUDIO|SDL_INIT_TIMER ) < 0 ) {
    fprintf( stderr, "Video initialization failed: %s\n", SDL_GetError( ) );
    SDL_Quit( );
    exit(0);
  }

If you don't know SDL check the SDL wiki. A complete SDL base program can be found here : sdl_base program

Start waave engine

The waave engine have a separated audio and video components, so start what you need. You can call again WV_waaveInit at any time to start/stop each component.
  /* init waave*/
  WV_waaveInit(WAAVE_INIT_AUDIO|WAAVE_INIT_VIDEO);

Stop waave engine

To stop the waave you just have to launch the close function. This will close also all the opened streams.

  /* close waave engine */
  WV_waaveClose();