Notifications
Clear all

[Closed] Audio dotnet method

Hi there. What’s the dot net method for playing audio files? Can anyone help? Thanks.

4 Replies

–ActiveX
rollout test “Test” width:350
(
ActiveXControl axmp “MediaPlayer.MediaPlayer” height:50 visible:false
on test open do
(
axmp.filename = “d:\games\xxx.wav”

    axmp.playCount =1
    axmp.play()
)

)

– .Net
SoundPlayer = DotNetObject “System.Media.SoundPlayer”
SoundPlayer.SoundLocation = “d:\games\xxx.wav”
SoundPlayer.Play()
/*
SoundPlayer.PlayLooping()
SoundPlayer.Stop()
*/

great thnx all…\Does anyone know if it takes over the thread? Can I run a sound and do other stuff at the same time?

 lo1

It should be nonblocking, you should be able to run other stuff.