473,397 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Sound Off!

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
Nov 21 '05 #1
4 1623
> 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/247referenc...26/134913.aspx

I hope they help you

Cor


Nov 21 '05 #2

"Cor Ligthert" <no************@planet.nl> wrote

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

Nov 21 '05 #3

"Cor Ligthert" <no************@planet.nl> wrote

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

Nov 21 '05 #4
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

On Thu, 21 Oct 2004 04:20:30 -0500, "Larry Serflaten"
<se*******@usinternet.comwrote:
>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
Jul 17 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Charles Hixson | last post by:
I'm looking for a simple means of generatings sounds. Basically what I want to do is play music from the information available in sheet music. I would like to send the commands to the player in...
22
by: The Road To Utopia | last post by:
Here's one for the trolls...a common jibe from them is setting up audio/video hardware under linux. Ok, true story: at work today, someone asked me if I could tell him why his XP Home would play...
2
by: scottech | last post by:
I'm not sure if this is the 'right' place to post -- I'm just getting used to the VB newsgroups, but I need assistance and am hoping I can either get the assistance or some help in pointing me the...
1
by: Marco Krechting | last post by:
Hi All, I have a database with the timer function set to warn the user that arecord is due to expire. Is there a Win API that I can use so a loud warning will go off. Not this simpel beep in...
2
by: Sathyaish | last post by:
I am using MCI (winmm.dll) to read, record and playback sound. For now, I am doing this with disk files instead of realtime doing it straight from the memory. If I want to stream/relay/transmit...
17
by: Ben | last post by:
How do I add sound so that it plays automatically when the page is loaded? My search turned up some references to <bgsound>, but it was described as a Microsoft-designed tag. I prefer to stick to...
4
by: =?Utf-8?B?UmljaA==?= | last post by:
When I press the Enter key in a Textbox I get a beep sound. But when I press the Enter key in a combobox, I don't get the beep sound. Is there a way to suppress the beep? How to do this? ...
6
by: =?Utf-8?B?VmVybm9uIFBlcHBlcnM=?= | last post by:
I have an application that is designed for using with a bar code scanner. I want the user to know that the scan was complete and the data was entered, so I am playing a system sound after data...
1
by: OBAFGKM_RNS | last post by:
In my html, I have an embedded sound wav. I access that sound from my javascript using Play() and Stop(). However, once stopped, the sound will aways resume from where it left off, (making Stop...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.