|
-
Mar 13th, 2003, 11:17 AM
#1
Thread Starter
Member
Need help with Managed DirectX [SOLVED]
Can someone please help me with this:
I've recently downloaded DirectX 9 SDK, with the new manged directx feature.
Now I'm building a MP3 player program and using the Audio class of the DirectX.AudioVideoPlayblack namespace.
The Audio class is a great class to play MP3 files. You can do this like this:
Code:
Public WithEvents audio As Microsoft.DirectX.AudioVideoPlayback.Audio
Public Sub PlaySong(MP3FileName)
audio = audio.FromURL(MP3FileName)
audio.Play()
End Sub
And do this everytime the user clicks the play-button.
The problem is, that this audio object just grows and grows as it does not close the files it opened with the FromURL() method.
The class has no method Close() or something and there is no property to determine the filenumber.
Please help me!!!
Last edited by M@rtyn12345; Mar 18th, 2003 at 04:40 AM.
-
Mar 14th, 2003, 03:20 PM
#2
yay gay
try setting it to nothing or something like that :\
\m/  \m/
-
Mar 18th, 2003, 04:39 AM
#3
Thread Starter
Member
Thanks, but I already figured out what the problem was.
When I wanted to load a new file, I used the FromURL() method, but this returned a new audio object and keeps the old in memory.
The FromURL() or FromFile() methods, should be called once, to create one audio object. If you want to load a new file (with that single audio object) you have to use the OpenURL() or OpenFile() method.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|