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: W13219Filename: Play big WAV files and MIDI files.txt