Sound Off!

L

Larry Serflaten

I'm adding a bit of sound to a simple game I've got going, and
I want to have several sounds on at the same time, so I go looking
to use the MCISendString commands and find they CRASH MY
COMPUTER after moderate use.

After a bit of searching the web for what I might be doing wrong
I find the work around is to bring in the old MultiMedia ActiveX
control from the .Com world and use it, so I added the three I need
and no more crashes.....

But there is no decent way to make that control play a repeating
sound. The callback method sucks, (Recursive stack overflow the
first time I tried it) and even handled correctly it produces a noticable
gap in the repetition. So my question is why isn't there much in the way
of supporting sound in the .Net framework?

I don't want to hear about DirectX, no 'beginner' is going to fathom
that nightmare just to add a few bells and whistles. Aren't computers
supposed to have sound? All the early Basics I saw supported sound
in some easy way, what's up with VB.Net?

What do you think, is sound a non-issue for most of your apps, or
would you think there should be easy access to playing are few beeps
and tones, waves, and MIDI's?

I just want to plant a seed in everyones mind, the next time they have
the ear of a few MSFT developers, to mention that sound should be
made as available as pictures currently are, they are both alternate
methods of interacting with the user.....

LFS
 
C

Cor Ligthert

I'm adding a bit of sound to a simple game I've got going, and
I want to have several sounds on at the same time, so I go looking
to use the MCISendString commands and find they CRASH MY
COMPUTER after moderate use.

Do not shout that loud my speakers become defect.

(However I agree with you before you ask that.)

Some links I found searching this newsgroup

From Herfried,
Multimedia
<URL:http://www.mentalis.org/soft/class.qpx?id=1>

WaveFile
URL:http://www.mentalis.org/soft/class.qpx?id=14

From Shiva
http://www.dotnet247.com/247reference/msgs/26/134913.aspx

I hope they help you

Cor
 
L

Larry Serflaten

Cor Ligthert said:
Do not shout that loud my speakers become defect.
:)

Some links I found searching this newsgroup

Thanks, I'll look into the KPD classes, the other two
links are for single sounds, one at a time. I need up
to three separate sound sources to be occasionally
played concurrently....

LFS
 
L

Larry Serflaten

Cor Ligthert said:
Some links I found searching this newsgroup

From Herfried,
Multimedia
<URL:http://www.mentalis.org/soft/class.qpx?id=1>


While they go a bit farther than my own attempts, they
also use the MCI API interface, and that still crashes my system.

Would you like to try the project and see if it works OK
on your system? If yes, send me an email direct, and I'll
send you copy of the source code (draft version, barely
commented, etc...)

LFS
 
D

dan

You can add a Windows Media Player control to your form, set the
visible property to "False" and then use

AxWindowsMediaPlayer1.URL = "C:\sounds\mysound.wav"
AxWindowsMediaPlayer1.settings.playCount() = 6
(This would repeat the sound 6X)
AxWindowsMediaPlayer1.Ctlcontrols.play()

You're right, MS wants us to use Direct Sound. The drawback with this
approach is the time invested in developing with it may be wasted if
they decide to change, yet again. (Examples: MCI to ActiveMovie,
ActiveMovie to DirectMedia, etc.)

Using the Media Player control binds you to ensuring the user has MP
installed, and the right version of MP, at that. On the plus side,
using the MP control is pretty straightforward, and some reusable code
can be made so that when MS changes their apprach again, (not a
question of if, but when), it isn't too painful.

Hope this helps.
Dan Aunspach
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top