This toturial was written for me by Imran Khan (email@example.com,
First add a reference of AudioVideoPlayback as we added directx and directdraw in the first tutorial.
To play sound in Directx is very simple.
First Declare a instance to the Audio Class.
Private titlesound As Audio
Simply we add this line to Init( ).
Now simply add this line where you want to play the sound.
when you want to stop call
If you want to open a file and play it when its declared then write:
If you want to open from any URL, then write:
If you want to jump to certain position in the sound you can use the CurrentPosition property.
titlesound.CurrentPostition = 100
This is all about Sound.You can add sound simply to your Game.
It is same as the Audio Class .
First declare a instance to video class,
Private titlevideo As Video
Then in whereever you want to start the move declare a new instance of the Video class
titlevideo = New Video("titlevideo.mgp", True)
to play,stop and pause use the Same method as mentioned in the Audio class.
|Correspondence about this page|
Book Shop - Further reading.
Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.
Commercial Software Shop
Where I can, I have put links to Amazon for commercial software, not directly related to this site, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them.
This site may have errors. Don't use for critical systems.