WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Sound and Media

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to use PlayMedia to play enormous WAV and MIDI files

Keywords: playmedia WAV MIDI playwaveform playmidi

Winbatch has a built in function (PlayWaveForm) to play WAV files, but after some point (megabytes), Windows won't play them. However by directly controlling the multimedia subsystem, the files can be played.

This also allows the wav file to be cut off at any time and also shows how to check the status of the current playback.

It works for MID/MIDI files too.


  midiname="z:\call.wav"
  midiname=FileNameShort(midiname)   ; for 32 bit only

;Changed this line from sequencer to waveaudio for a big "WAV" file.
; PlayMedia("open sequencer!%midiname% alias abc123")	 
  PlayMedia("open waveaudio!%midiname% alias abc123")

   a=PlayMedia("status abc123 mode")	;and heres how to check status
   Message("Info",a)
    
  PlayMedia("play abc123") 
  Message("wave","playing")
  
   a=PlayMedia("status abc123 mode")	 ; checking ststus again
   Message("Info",a)
    
  PlayMedia("close abc123")
  Message("wave","stopped")
  


Article ID:   W13219
Filename:   Play big WAV files and MIDI files.txt
File Created: 1999:04:15:16:52:32
Last Updated: 1999:04:15:16:52:32