Resume wav

From Bennu Wiki
Revision as of 07:57, 13 March 2012 by 82.74.128.190 (talk) (Created page with 'Category:functions Category:sound Category:mod_sound ==Definition== '''INT''' resume_wav ('''INT''' < channel > ) Resumes the currently paused wave channel, that wa…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Definition

INT resume_wav (INT < channel > )

Resumes the currently paused wave channel, that was paused by Pause_wav().


Parameters

INT channel - The WAV sound channel.


Returns

INT : Error.

-1 - Error: sound inactive.
0 - No error.

Example

// import modules
IMPORT "mod_say";
IMPORT "mod_debug";
IMPORT "mod_proc";
IMPORT "mod_key";
IMPORT "mod_sound";

GLOBAL
   int wav;
   int channel;
  
PROCESS main();  
BEGIN

  wav=load_wav("wav.wav");
  
  say("Test pause_wav...");
  say("ENTER = Pause Sound...");
  say("Press ESC to quit...");
  
  channel=play_wav(wav,-1);
  
  REPEAT
  
    IF(key(_enter))
      pause_wav(channel);
      FRAME(2500);
      resume_wav(channel);
    END
    
    FRAME;
  UNTIL(key(_esc))
END

Used in example: key(), say(), pause_wav(), play_wav(), load_wav().


Sound Functions
Fade_music_in()Fade_music_off()Is_playing_song()Is_playing_wav()Load_song()Load_wav()Pause_song()Pause_wav()Play_song()Play_wav()Reserve_channels()Resume_song()Resume_wav()Reverse_stereo()Set_channel_volume()Set_distance()Set_music_position()Set_panning()Set_position()Set_song_volume()Set_Wav_Volume()Sound_close()Sound_init()Stop_song()Stop_wav()Unload_song()Unload_wav()