Help Contents / Sound programming / Wave Sound / playWave

playWave wavefile flags
playWave wavedata flags

The wavefile must be a filename of a .WAV file. The wavedata can be an IntArray or an Int16Array loaded with a correct wave file contents including the header. 

The flags describe how the sound should be played. 

However this command does not require a true sound card to enjoy. 

There is a publicly available driver from Microsoft called SPEAKER(.EXE, .DRV, .ZIP ?) which will emulate the wave file capabilities over the pc speaker. 



wavefile(String): The name of .WAV file. 

flags(Integer): A flag to indicate how you want the sound played. 

	0 = Synchronous does not return until completed. 
	1 = Asynchronous returns immediately while sound is still playing. 
	2 = Dont use the default sound if the specified one cannot be found. 
	4 = In memory sound (automatically set if wavedata is given). 
	8 = Continue to loop the sound until another sound command is issued. 
	16 = Dont stop an already playing sound. 

Note: these flags can be combined by adding them together. 

Under Linux those flags have no meaning at the moment. 

Hint: You can write portable sounds if you check the LogoVersion. 

Example: 

	playwave "c:\\windows\\tada.wav 1+8 
	playwave [] 0 

See also makewav3.lg. 


next: playWaveFast
